← All topics
Knowledge

Inter-agent comms: how agents talk (A2A)

Inter-agent comms lets independent agents hand off work and share results through structured messages, a shared blackboard, or protocols like A2A.

What it is

Inter-agent comms is how independent agents hand work to each other and share results — instead of one agent doing everything, several specialists coordinate.

  • Direct messages: one agent sends a structured request to another and gets a structured reply.
  • Shared state (blackboard): agents read and write a common workspace instead of messaging point-to-point.
  • Protocols (A2A): an agreed envelope — message format, identity, capabilities — so agents built by different teams or frameworks can still talk.

When to use it

Reach for it when work splits cleanly across specialists or across machines:

  • A pipeline where a researcher agent feeds a writer agent feeds an editor agent.
  • Agents owned by different teams or vendors that must interoperate — that's what protocols like A2A standardize.
  • Long-running tasks where one agent delegates and polls for results.

This builds on multi agent structure; once they talk, agent comms is the wire.

Skip it when a single agent with the right tools already does the job — extra agents add latency, cost, and failure points for no gain.

How it works

Agents exchange typed messages instead of free text. Keep the envelope explicit.

  • A coordinator sends {from, to, task_id, intent: "summarize", payload} to a worker.
  • The worker replies with {task_id, status: "done", result} — or status: "failed" with a reason.
  • The task_id ties request to response so async replies don't get crossed.
  • With a blackboard, agents skip addressing entirely: the worker writes result to a shared key and the coordinator watches for it.
  • A protocol like A2A pins down the schema, identity, and a capability list so an agent can discover what another can do before sending.

Watch out for

  • Free-text handoffs: passing raw prose between agents loses structure and invites misreads. Use a schema and validate it — see guardrails.
  • Lost or duplicate messages: without a task_id and acks, async replies get dropped or double-processed. Treat the channel as unreliable and design for retries; reliability applies.
  • Silent failures: a worker that errors but never reports stalls the whole chain. Make failure a first-class message, not a timeout.
  • Chatter cost: every hop is tokens and latency. Fewer, richer messages beat many tiny ones — watch cost control.

Related patterns

Ask the swarm