Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path →
Agents that
call agents.
One team builds a research agent; another builds a coding agent; a third wants to combine them. Today that means bespoke glue for every pairing — a brittle integration written by hand. Agent-to-agent interop replaces the glue with a protocol: agents advertise what they can do so others can find them, and speak a shared format so one's output slots into another's input. It's the same move that turned isolated services into the web. Get the two agreements right — discovery and schema — and independent agents compose into an ecosystem. Here's how the handshake works.
From glue to protocol
As agents proliferate, the interesting systems are ones where agents use other agents — a coordinator delegating a sub-task to a specialist built by someone else. But if every pair of agents needs custom integration code, the effort grows with the number of pairs (the same quadratic wall that bites multi-agent systems), and nothing composes. The web solved this exact problem for services with shared protocols; A2A interop is the analogous move for agents.
The idea is to replace bespoke glue with two standard agreements. First, agents must be findable: each publishes what it can do, so another agent can discover a suitable partner without prior knowledge of it. Second, agents must be speakable-to: they share a message format, so one agent's output can be consumed directly by another. Discovery answers "who can do this?"; the shared schema answers "how do I talk to them?". Both are required — a capable agent you can't communicate with is as useless as a reachable one that can't do the task.
A2A interop needs two agreements — agents advertise capabilities so others can discover and route to them, and share a message schema so one agent's output chains into another's input.
Advertise and discover
The first half is capability discovery. Each agent publishes a capability card — a machine-readable description of its skills: what tasks it handles, what inputs it needs, what it returns. To delegate a task, a coordinator looks up the registry of cards, finds agents whose advertised skills include the required capability, and routes the task to one of them.
The rule is crisp: an agent can handle a task if and only if the required capability appears in its advertised skills. So discovery is a lookup — scan the registry for agents that list the capability, and route to a capable one (or report that none exists). This decouples the caller from the callee: the coordinator doesn't need to know which agents exist ahead of time, only what capability it needs; new agents can join the registry and become usable without changing the caller. But finding the right agent is only half the handshake — you still have to be able to talk to it.
Speak the same language
The second half is a shared message schema. Discovery finds a capable agent, but delegation still fails if the two agents can't understand each other's messages. If agent A emits results in one format and agent B expects another, A's output can't feed B's input — the capability match is wasted. So A2A protocols standardize the message envelope: an agreed structure for requests, results, streaming updates, and errors.
With a shared schema, one agent's output is directly consumable as another's input, so tasks can chain across agents — research agent produces a report in the standard format, coding agent consumes it, and so on. This is the same discipline as structured outputs applied at the agent boundary: agree on the shape so machines can hand work to each other without a translator. The interop condition is simple and unforgiving — two agents can chain only if their schemas line up. Mismatch the versions or the format and the pipeline breaks even when every capability is present.
The interop rules
Capability discovery is set membership. An agent with advertised skills S can handle a task requiring capability c exactly when c ∈ S; discovery collects all such agents from the registry:
Routing picks a member of that set; if it's empty, there's no agent for the task — fail explicitly rather than guessing.
But delegation succeeds only if both conditions hold — a capable partner and a compatible schema:
Capability without a shared schema can't chain; a shared schema without the capability has nothing to do. Both are necessary. The runnable version below discovers capable agents, routes a task, and checks schema compatibility.
Discover, route, chain
A2A interop is two lookups. Discovery scans a registry of capability cards and returns every agent whose advertised skills include the required capability; routing picks one, or reports none exists. That decouples the caller from the callee — it names a capability, not a specific agent. But delegation also needs a shared message schema: two agents can chain their output-to-input only if their schemas match, so a capability match with mismatched formats still fails. Change the registry, the required capability, or the schemas and watch routing and compatibility decide.
The A2A stack
A working A2A protocol standardizes a handful of things so heterogeneous agents compose:
| Element | What it standardizes |
|---|---|
| Capability card | How an agent advertises its skills, inputs, and outputs so others can discover it. |
| Message envelope | The shared schema for requests, results, streaming updates, and errors. |
| Task lifecycle | How a delegated task is created, tracked, streamed, and completed or cancelled. |
| Identity & auth | How agents authenticate each other and authorize a delegation — trust across boundaries. |
| Discovery mechanism | How agents publish and find cards (a registry, a well-known endpoint). |
A2A sits alongside MCP in the protocol picture: MCP standardizes the agent-to-tool interface (how an agent reaches a database or API), while A2A standardizes the agent-to-agent interface (how an agent delegates to a peer). An agent might use MCP to call a tool and A2A to hand a sub-task to another agent. Both share one philosophy — agree on discovery plus a message schema so independently-built components compose without custom glue. And the trust dimension is real: delegating to an agent you didn't build means authenticating it and bounding what it can do, so identity and authorization are first-class, not afterthoughts.
Pitfalls
The interop-specific trap is schema drift: two agents that once chained stop working when one updates its message format, silently. Version the schema and negotiate versions at connect time, so a mismatch is a clear error, not a corrupted payload. A close cousin is capability lies: an agent advertises a skill it does poorly (or maliciously), and discovery routes to it in good faith — so advertised capability is a claim to be verified, not trusted, with evals and reputation, not just the card.
Two more. Trust across boundaries: delegating to a third-party agent means its output flows back into your system and possibly your model's context — treat it as untrusted, authenticate the peer, and bound what a delegation can do (an agent you didn't build is a guardrail and sandbox concern). And over-federating: not every system needs an agent mesh — the coordination cost of many agents still applies, so reach for A2A when you genuinely want independently-built agents to compose, not to over-engineer a task one agent could do. Used where it fits, A2A turns a pile of bespoke integrations into an open ecosystem — the difference between wiring two agents together and letting any agent find and use any other.
An advertised capability is a claim, not a guarantee — discovery routes on trust, so verify partners with evals and reputation, version schemas so drift is a clear error, and treat a third-party agent's output as untrusted (authenticate it, bound the delegation).
Worked example: research a bug, then fix it, step by step
A coordinator gets the task “find why checkout fails, then patch it”. It needs search first, then code. The registry holds four cards (illustrative): R1 skills {search, summarize}, outputs report-v1. C2 skills {code}, accepts report-v2. C1 skills {code, test}, accepts report-v1. L1 skills {contract-review}. Trace it with the page’s own functions.
| Step | Call | What happens | Result |
|---|---|---|---|
| 1 | discover(reg, "search") | Only R1 lists search | [R1] |
| 2 | route(reg, "search") | First match; R1 runs and returns a report-v1 | R1 |
| 3 | discover(reg, "code") | C2 and C1 both list code; registry order puts C2 first | [C2, C1] |
| 4 | route(reg, "code") | First match is C2, chosen on capability alone | C2 |
| 5 | compatible("report-v1", "report-v2") | R1’s output does not fit C2’s input | False: the chain breaks |
| 6 | Filter step 3 by schema first | Keep agents where both conditions hold | [C1] |
| 7 | Delegate to C1 | R1’s report goes straight in; C1 returns a patch | Task done |
| 8 | route(reg, "draw") | No card lists draw | None: fail out loud, don’t guess |
Steps 4 and 5 are the bug the page’s delegable rule warns about. route picks on capability only, so the outcome depends on registry order. Add C2 to the registry a day later and a pipeline that worked starts failing, with no code change. The fix is to route on the full condition, capability and schema, as in step 6. If no agent passes both, report that, exactly as step 8 does for a missing capability.
Cost and trade-offs: glue, lookups and hops
For a protocol, read Time as the work to build or run it and Space as what it grows with.
| Case | Time | Space | Why |
|---|---|---|---|
| Bespoke glue, n agents | One integration per pair: n(n−1)/2 | 10 agents: 45; 30 agents: 435 | Every new agent needs code for each agent it talks to. This is the quadratic wall. |
| Shared protocol, n agents | One adapter per agent: n | 10 agents: 10; 30 agents: 30 | Each agent learns the protocol once, then reaches every other agent that speaks it. |
| Discovery as a scan | O(R) per lookup over R cards | One card per agent | Fine for dozens of agents. The page’s discover works this way. |
| Discovery by index | About O(1) per lookup | An entry per (capability, agent) pair | Map each capability to its agents. You must update it when cards change. |
| Strict schema equality | One string compare | Nothing extra | Simple, but any version bump breaks every caller at once. |
| Negotiated versions | One handshake per connection | Both sides keep old versions alive | Lets agents upgrade on their own schedule. Drift becomes a clear error. |
| A chain of k delegations | k network hops, each with auth and serialisation | Success is the product: 0.95 per hop gives 0.86 at 3 hops and 0.77 at 5 | Each hop is a failure point. Keep chains short and retry each hop on its own. |
The protocol turns a quadratic integration cost into a linear one. That is the whole case for A2A. The chain row is the case against using it everywhere: a task one agent could finish has no hops to fail.
Where this shows up in production and interviews
- The A2A protocol
Google announced the Agent2Agent protocol in April 2025, and it is now a Linux Foundation project. It maps directly onto this page: an Agent Card is the capability card, messages are JSON-RPC 2.0 over HTTP, and long tasks stream progress with server-sent events.
- Next to MCP
A common split in one system: MCP connects each agent to its own tools and data, and A2A connects agents that different teams own. The coordinator from the worked example might reach the code repo over MCP and hand the patch work to C1 over A2A.
- It is service discovery again
Microservices solved the same two problems with a service registry and a published API schema. The lessons carry over: health-check the registry so dead agents drop out, version the contract, and never let the caller hard-code who answers.
- The interview version
In “design a multi-agent system across teams”, name the two agreements (discovery and schema), then go straight to trust. How is the peer authenticated? What can a delegated task touch? What happens to its output before it reaches your model? Treating peer output as untrusted is the answer interviewers listen for.
Check yourself
A registry has 12 agents and a coordinator needs "translate". Three agents list it, but only one accepts your output schema. What should the router return?
That one agent. Discovery gives three candidates, but delegable needs capability and a matching schema. Picking the first of the three on capability alone works or fails depending on registry order, which is the bug in steps 4 and 5 of the worked example.
Your team runs 30 agents with hand-written glue between every pair. How many integrations is that, and how many adapters after moving to a shared protocol?
30 × 29 ÷ 2 = 435 integrations, against 30 adapters. The 31st agent would need up to 30 new integrations under glue, but only one adapter under the protocol.
An agent you have chained to for months upgrades its output to v2 without telling you. With strict equality, what do you see? With version negotiation?
Strict equality turns the drift into a hard failure on every call, which is at least visible. Without any check at all you could get a payload parsed wrongly and passed along silently, which is worse. Negotiation lets the two sides agree on v1 while it is still supported, or fail at connect time with a clear message.
A third-party agent’s card claims {"legal-review"}. Discovery routes a contract to it. What else must be true before you trust the result?
The card is a claim. You need evidence it does the job well (evals or a track record), an authenticated peer, a bounded delegation (it sees only this contract), and its output treated as untrusted input before it reaches your model or your users.
Quick answers
What is A2A interop?
Letting agents built by different teams work together — one delegating a sub-task to another — via a protocol for discovery and messaging, not bespoke glue.
What is capability discovery?
Agents advertise their skills in a capability card; a coordinator matches a task's required capability and routes to an agent that lists it.
Why a shared schema?
Finding a capable agent isn't enough — a shared message format lets one agent's output feed another's input, so tasks chain across agents.
A2A vs MCP?
MCP standardizes agent-to-tool connections; A2A standardizes agent-to-agent connections. Same philosophy: agree on a protocol so components compose.
Explore the topic
See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.
More Handbooks
- The Agentic AI Interview HandbookTwenty topics every senior AI engineer should be able to reason about live — from eval pipelines to reliability patterns for generative systems.Read →
- The Agent Evaluations HandbookA self-contained handbook on evaluating AI agents — theory, interactive widgets, and practical guidance. Trajectory evals, tool-use scoring, LLM-as-judge, observability, and reliability for PMs, engineers, and founders.Read →
- The Agent Patterns HandbookThe design patterns behind every LLM agent — the ReAct Thought–Action–Observation loop, tool/function calling, plan-and-execute, reflection, memory, multi-agent orchestration, and the failure modes (loops, hallucinated tools, recovery, human-in-the-loop) that break agents in production.Read →
- The Model Context Protocol (MCP) HandbookThe open standard connecting AI agents to the outside world — why M×N bespoke integrations collapse to M+N, the host/client/server roles over JSON-RPC, the three primitives (tools, resources, prompts), the connect→discover→call session lifecycle, when MCP earns its keep, and the security sharp edges (a server's output is untrusted input).Read →
- The Loop Engineering HandbookStop prompting your agents — design the system that prompts them for you. The inner vs outer loop, the four loop types (heartbeat, cron, hook, goal), the six building blocks (automations, worktrees, skills, MCP connectors, subagents, external memory), stopping conditions and the verification split, state across runs, cost engineering, and the six failure modes that burn tokens at 3am.Read →
- The Context Engineering HandbookThe discipline that replaced prompt-tweaking: curating everything the model sees under a finite attention budget. The anatomy of a production context window, the three taxes on an overstuffed one (context rot, cost, behavioral drift), the four operations (write, select, compress, isolate), agent-specific patterns like compaction and just-in-time retrieval, six production habits, and where it sits in the prompt → context → loop → harness stack.Read →