Skip to main content

06. Multi-Agent Systems

Agent Communication, Collaboration and Coordination

Communication is how agents exchange messages or artifacts. Collaboration is working together on a shared goal with roles. Coordination is controlling who acts when β€” order, barriers, locks β€” so the crew does not race or deadlock. Multi-agent products need all three designed explicitly.

What you will learn

  • Define communication, collaboration, and coordination separately
  • Choose channels (direct, blackboard, bus, artifact)
  • Apply coordination patterns (sequence, parallel+join, barrier, lock)
  • Design stop rules that prevent chat storms
  • Answer interview questions with short, solid answers
Communication collaboration and coordination as three distinct ideas
Interview staple: communicate = exchange; collaborate = shared goal; coordinate = who acts when.

Definition

Communication is the exchange of information between agents β€” messages, events, or artifacts β€” over a channel with an agreed schema. Collaboration is joint work toward a shared objective where roles contribute complementary skills. Coordination is the control of timing and access so concurrent agents do not conflict, starve, or loop forever.

Teams often say β€œagents collaborate” when they only mean β€œagents chat.” Interview answers should separate the three: channel/schema (communication), joint goal/roles (collaboration), and sync rules (coordination).

Introduction

This lesson (#3 in Multi-Agent Systems) follows Single vs Multi-Agent Architecture. You chose a topology; now you design how agents talk and sync.

Next: Agent Delegation β€” handing work to another agent with clear ownership.

Why these three matter

  • Prevents endless free-form chat between agents
  • Makes ownership of writes and merges explicit
  • Cuts race conditions on shared tickets/docs/DBs
  • Gives ops a protocol to trace and budget

Communication channels

Prefer typed artifacts over long chat transcripts. Chat is fine for negotiation; the durable handoff should be a schema or file.

Direct message blackboard event bus and artifact handoff channels
Direct, blackboard, event bus, artifact β€” pick one primary channel per hop.
  • Direct message - A sends structured payload to B
  • Blackboard - shared board agents read/write (needs locks)
  • Event bus - publish/subscribe for loose coupling
  • Artifact handoff - pass doc/diff/ticket id as the contract
  • Always include - sender, task_id, schema version, deadline

Collaboration patterns

  • Pipeline - research then write then review (ordered roles)
  • Peer specialists - parallel contributions then merge
  • Debate / critique - proposer vs critic with a judge
  • Shared workspace - co-edit an artifact under coordination rules
  • Require - shared goal statement + success metric for the crew

Coordination patterns

Coordination is where multi-agent systems look like distributed systems β€” because they are.

Sequential parallel join barrier and lock coordination patterns
Sequence for dependencies; parallel+join for speed; barrier for checkpoints; lock for writes.
  • Sequential - A completes before B starts
  • Parallel + join - independent work then merge with a policy
  • Barrier - all agents reach a checkpoint before continuing
  • Lock / lease - serialize conflicting shared writes
  • Timeouts - every wait needs an expiry and fallback

Protocol checklist

  • Who may speak to whom (allowed edges)
  • Message / artifact schema and validators
  • Turn-taking or scheduler policy
  • Conflict resolution (judge, vote, escalate)
  • Stop: max hops, max tokens, wall-clock budget

Failure modes

  • Chat storms - uncapped back-and-forth; cap hops
  • Schema drift - agents invent fields; validate contracts
  • Deadlock - mutual waits without timeout
  • Lost updates - blackboard races; use locks or CRDTs carefully
  • Silent drop - events with no subscriber / ack

Program / implementation notes

Implement a MessageBus or HandoffStore with schemas. Drive coordination from the orchestrator (graph edges, barriers), not from hope inside prompts.

  • Log task_id, from_agent, to_agent, msg_type on every hop
  • Prefer artifact URLs over pasting huge contexts between agents
  • Next: Agent Delegation

Advantages and limitations

  • Advantage: clear separation of talk vs sync vs shared goals
  • Advantage: safer concurrency with locks and joins
  • Advantage: debuggable traces when schemas are strict
  • Limitation: protocol design is real engineering work
  • Limitation: over-coordination serializes everything and kills speed
  • Limitation: chatty channels inflate cost without quality gains

Key points

  • Communication = exchange; collaboration = shared goal; coordination = who acts when.
  • Prefer typed artifacts over endless chat transcripts.
  • Channels: direct, blackboard, event bus, artifact handoff.
  • Coordinate with sequence, parallel+join, barriers, and locks.
  • Every wait needs a timeout and fallback.
  • Cap hops and tokens to stop chat storms.

FAQs

Are collaboration and coordination the same?

No. Collaboration is joint work on a goal. Coordination is the timing/access control that makes concurrent work safe and ordered.

Is ACL / FIPA still relevant?

Classic agent languages inspired structured performatives (inform, request). Modern LLM crews usually use JSON schemas and graph edges β€” same idea, lighter packaging.

When should I use a blackboard?

When many agents contribute to one evolving artifact. Add ownership rules and locks so updates do not clobber each other.

How do I stop agents arguing forever?

Max debate rounds, a designated judge/approver, and escalate or ship-with-warning when the budget ends.

Interview questions

  1. Differentiate communication, collaboration, and coordination.

    Answer Communication exchanges info; collaboration pursues a shared goal with roles; coordination controls order, barriers, and access so agents do not conflict.

  2. Name common agent communication channels.

    Answer Direct messages, blackboards, event buses, and artifact handoffs β€” each needs a schema and tracing fields.

  3. What is a coordination barrier?

    Answer A checkpoint where agents wait until all (or n-of-m) arrive before continuing β€” always with a timeout.

  4. Why prefer artifacts over chat between agents?

    Answer Artifacts are typed, auditable, and cheaper to validate; chat transcripts bloat context and hide contracts.

  5. Give a failure mode of poor coordination.

    Answer Two agents write the same ticket concurrently and lose updates β€” fix with locks/leases or a single writer role.

  6. What belongs in a multi-agent protocol checklist?

    Answer Allowed edges, message schemas, turn policy, conflict resolution, and hard stop budgets.

Related topics

Practice task

Complete each numbered practice step in a notebook or doc before opening the next lesson.

  1. For a research→write→review crew, pick a channel for each hop and write the artifact schema.
  2. Mark which steps are sequential vs parallel+join in that crew.
  3. Define a lock rule for any shared doc both writer and reviewer might edit.
  4. Set max hops and a debate stop rule if reviewer rejects twice.
  5. Answer interview questions 1, 2, and 4 in two sentences each.