Skip to content

Ch 16: Multi-Agent Systems Architecture - Intermediate

Track: Advanced | Try code in Playground | Back to chapter overview

Read online or run locally

You can read this content here on the web. To run the code interactively, either use the Playground or clone the repo and open chapters/chapter-16-multi-agent-systems-architecture/notebooks/02_coordination.ipynb in Jupyter.


Chapter 16: Multi-Agent Systems — Notebook 02 (Coordination & Consensus)

With agents that can talk, the question becomes who does what and how do they agree. We implement the Contract-Net Protocol for allocation and gossip averaging plus voting for consensus.

What you'll learn

Topic Section
Contract-Net: announce, bid, award §1
Greedy vs optimal allocation §2
Gossip consensus and convergence §3
Majority voting and its failure modes §4

Time estimate: 3.5 hours


Key concepts

  • Contract-Net Protocol — a manager announces a task, agents bid, the best bid wins.
  • Bid — a self-reported cost; honest bids make greedy allocation near-optimal.
  • Gossip consensus — local averaging that converges to the global mean on a connected graph.
  • Voting — cheap aggregation, but vulnerable to correlated errors among agents.

Contract-Net turns allocation into a simple auction; gossip averaging reaches consensus with only local communication; voting aggregates cheaply but assumes independent errors. Coordination is where multi-agent value — and risk — concentrates.

Run the full notebook in the chapter folder for code and outputs.


Generated by Berta AI