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
researcheragent feeds awriteragent feeds aneditoragent. - 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}— orstatus: "failed"with a reason. - The
task_idties request to response so async replies don't get crossed. - With a blackboard, agents skip addressing entirely: the worker writes
resultto 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_idand 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
Multi-agent: split roles, coordinate the work
Break a hard job into specialized agents with narrow roles and separate context windows, then coordinate their work through an orchestrator or a structured exchange.
MCP: a standard port for tools and context
MCP is a standard client/server protocol that exposes tools, resources, and prompts to an agent, so you build an integration once and reuse it across every host.