Skip to content

Multi-Agent Systems and Agent-to-Agent Protocols

Three orchestration patterns

SAB
S delegates to A and B and receives their results. Arrows show permitted message routes, not measured traffic.

So far, the arc has described one model context and one tool loop. A single loop can already use several tools and manage a substantial task. Adding workers changes where intermediate work happens and how results return.

Before adding workers, identify what limits the single-agent version: the context it must retain, the responsibilities it must handle, or the work it could run concurrently.

Agents can act as subroutines with private context. Delegation moves intermediate work out of the caller’s transcript, but adds prompts, coordination, and a boundary where information can be lost. Whether that trade saves money or improves results depends on the task.


Why reach for a second agent at all?

The first concern is context. A finite window limits what one generation can receive. Fitting within the token limit does not establish that the model can use every part effectively. Context engineering manages that constraint; delegation provides another place to do intermediate work.

The second concern is specialization. Separate instructions and tool sets can make a worker’s responsibility clearer. Compare those separate roles with a single agent using the same instructions and tools.

The third is parallelism. A single agent can already request independent tools concurrently. Multiple workers add something different: independent reasoning-and-tool loops can run at the same time, each with its own context.


Prereqs

This post builds on three earlier topics:

  • The agent loop — the generate / parse / execute / resume cycle that runs inside every agent.
  • MCP — the host-to-tool-server protocol. We'll contrast it with A2A shortly.
  • Tool use and function calling — because the simplest way to "call another agent" is to dress it up as a tool.

Arc 9 material (retrieval, context engineering) helps too but isn't strictly required.


Three topologies: supervisor, swarm, pipeline

The three diagrams below are useful recurring shapes rather than an exhaustive taxonomy.

SAB
When it fits
A coordinator can assign separate research and coding subtasks, then integrate the results.
What breaks
Collecting every worker transcript can fill the supervisor’s context. Returning summaries saves space but can omit needed evidence.
Coordination cost
O(n) messages if a coordinator exchanges once with each of n workers. One coordinator integrates the results.

Three multi-agent topologies. Supervisor delegates to workers and integrates their results. Swarm is peer agents talking directly. Pipeline processes each item through ordered stages; multiple items can overlap.

Supervisor is one agent delegating to workers and integrating their results. This is the shape in Anthropic’s research-system account and the manager pattern in the OpenAI Agents SDK. It provides one place to inspect the overall plan.

Swarm here means peers exchanging messages without a single fixed supervisor. Debate and critique are examples. Such a system needs explicit rules for disagreement, stopping, and recording why a decision was made. AutoGen supports configurable agent conversations; MetaGPT uses more structured workflows between specialized roles.

Pipeline is sequential handoff. Stage 1 finishes, hands its artifact to stage 2, stage 2 finishes, hands to stage 3. For a fixed sequence such as transcribe → summarize → translate, stages can pass their outputs directly without negotiating the order of work.

A system can combine these arrangements: a supervisor might delegate a fixed sequence of transformations to a worker pipeline.


A minimal formalism: agents as graph nodes, tasks as state

A graph can represent agents as nodes and communication links as edges. Messages carry tasks, results, and status changes along those links.

A2A, originally introduced by Google, defines agent cards, messages, task states, and artifacts. A task may be submitted, working, waiting for input or authorization, or end as completed, failed, canceled, or rejected. This is a set of possible states, not a mandatory sequence through every state.

An agent card advertises capabilities, endpoints, and authentication requirements. A2A supports messages and long-running tasks with status and artifacts. MCP focuses on exposing tools, resources, and prompts; newer MCP versions also support task-oriented execution. The distinction is their intended integration surface, not a rule that one side must be stateless or must contain an LLM.


Runtime: what actually moves between agents

In the simplest case, the supervisor treats the worker as a tool. The worker's "function signature" is a task description. The supervisor emits a tool call, the runtime dispatches it to the worker (either in-process, as a subroutine, or over the network via A2A), the worker runs its own agent loop in its own context, and returns a result. From the supervisor's perspective, one tool call happened. From the worker's perspective, a whole agent loop ran.

In this example, the worker starts from the supplied task and explicitly passed context. The supervisor receives a summary rather than the worker’s full transcript. Other designs can share histories, references, or artifacts; isolation is a runtime configuration, not an inherent property of delegation.

Occupancies are assumed fractions of an example window, not counts derived from the abbreviated transcript lines.

Toy trace · assumed occupancy · step 1 / 6
user task arrives
SUPERVISOR
5% of ctx
user: write a report on LLM inference engines
WORKER
0% of ctx
(idle — no context)
The worker reads the source material in its own context and returns a summary. The supervisor receives that summary without the full reading history.

Follow the caller’s transcript while the worker runs. Only the task and returned summary cross the boundary in this example.

A summary can omit evidence that matters to the caller. Return citations, tests, or exact artifacts when they are needed to check the result. A supervisor can inspect those outputs without reproducing every internal step, but a plausible summary alone is weak evidence.


A2A and MCP

MCP and A2A emphasize different integration surfaces and can be used together. Their capabilities can overlap.

Two integration surfaces

MCP · Tools, resources, and prompts

Host clientMCP server

The host translates between model calls and the server contract. The server may itself contain an agent.

A2A · Messages, task status, and artifacts

Calling clientRemote agent

The caller uses the exposed interface without needing to know the callee’s model or execution loop.

Capabilities can overlap. Neither protocol determines the backend architecture.

MCP connects a host’s client to a server exposing tools, resources, and prompts. The host mediates between the model and that server. A server can contain ordinary application code, an agent, or another service; MCP does not require a passive or stateless implementation.

A2A lets clients exchange work with remote agents through messages, task status, and artifacts. It does not prescribe the callee’s model, context implementation, or tools. A caller can use that interface without knowing how the result is produced.

A supervisor agent can speak MCP to its filesystem and A2A to its researcher worker, in the same loop, at the same time. The researcher worker can, in turn, speak MCP to its web-search tool and A2A to a third-party fact-check agent.


Coordination costs

Delegation adds instructions, handoffs, and result integration to the work performed by each agent.

Toy assumptions: each worker receives 500 instruction tokens, returns 200 summary tokens, and runs for 12 seconds. Coordination adds 4 seconds.

Repeated worker instructions1500 input tokens

Scale: 0–2500 input tokens

Returned summaries600 output tokens

Scale: 0–2500 output tokens

Sequential workers + coordination40 seconds

Scale: 0–64 seconds

Parallel workers + coordination16 seconds

Scale: 0–64 seconds

This counts only the stated overhead and elapsed time. Worker reasoning, tool output, cache effects, manager generation, and the manager’s input cost for reading summaries are omitted. Information loss needs task-specific checks; it is not a percentage implied by agent count.

An explicit toy accounting example: adjust the number of workers to compare repeated instructions, returned summaries, and sequential versus parallel elapsed time. These are assumed costs, not benchmark measurements.

Token tax: workers need instructions and task context; the supervisor consumes their returned results. Some context can be cached, but delegation still adds work. Count input, cached input, output, and reasoning tokens separately when comparing designs.

Latency tax: every handoff is a round trip. Even if the work is parallelized, the orchestration overhead (wait for all workers, reconcile results, possibly re-delegate) adds wall-clock time. In a pipeline, latency stacks strictly. For one concurrent round in which the supervisor waits for every worker, elapsed time is the slowest worker's duration plus orchestration overhead. Dependencies or further delegation add rounds. Peer exchange adds communication rounds until its stopping condition is met.

Handoff loss: summaries omit information. Define which evidence and artifacts must cross the boundary, and how the receiving agent can retrieve anything omitted. Passing complete data or stable references changes the tradeoff.

Cognition’s “Don’t Build Multi-Agents” argues for shared context and warns about fragmented decisions. Anthropic’s research-system writeup describes a supervisor with parallel researchers and reports benefits for its research workload, alongside higher token use.


Worked example

Consider the task: "Write a short blog post about the vLLM paper's key contributions, with a working Python snippet showing the PagedAttention idea."

A single agent can attempt this task. To illustrate delegation, split paper research from snippet implementation and compare the resulting artifacts and costs with that baseline.

A supervisor with two specialist workers decomposes the work as follows.

  • Supervisor: holds the plan. Has a short system prompt: "You are a writing supervisor. Delegate research and coding subtasks. Integrate results. Output one blog post."
  • Researcher: receives the paper and returns cited findings. System prompt: "You extract key claims from technical papers. You return a bulleted summary with citations."
  • Coder: receives the implementation task and source findings. System prompt: "You write small, correct, self-contained Python snippets. You never hand-wave."

The supervisor emits two delegations: delegate(researcher, "summarize 2309.06180") and, once the summary returns, delegate(coder, "implement a minimal PagedAttention block from this summary"). It then drafts prose around the two artifacts and returns one post.

The researcher keeps the full paper in its own context, while the coder receives the summary and implementation task. The supervisor receives their artifacts. These workers run sequentially because the code depends on the research summary; this example gains no parallel speedup.

If the summary omits a detail the code needs, the coder may produce an incorrect implementation. Diagnosing the error requires checking the code against both the summary and the original paper.


Implementation sketch

Here is the manager pattern in the OpenAI Agents SDK. as_tool() runs a specialist and returns its result to the manager. A handoff() transfers control to another active agent instead; it is not a returning subroutine. The tools below are application-provided adapters, so this is an integration sketch.

from agents import Agent, Runner
 
# Two specialists. Each has a narrow system prompt and owns a fresh context.
researcher = Agent(
    name="researcher",
    instructions=(
        "You extract key claims from technical papers. "
        "Return a bulleted summary with section citations. "
        "Be terse. Facts over flourish."
    ),
    tools=[web_search, read_url],   # MCP-backed tools, defined elsewhere
)
 
coder = Agent(
    name="coder",
    instructions=(
        "You write small, correct, self-contained Python. "
        "No pseudocode, no TODOs. If you can't do it cleanly, say so."
    ),
    tools=[run_python],
)
 
# Each worker is a tool that returns to the supervisor.
supervisor = Agent(
    name="supervisor",
    instructions=(
        "You coordinate a researcher and a coder to produce one blog post. "
        "Delegate, integrate, return one coherent piece."
    ),
    tools=[
        researcher.as_tool(tool_name="research", tool_description="Research a paper and return cited findings."),
        coder.as_tool(tool_name="write_code", tool_description="Implement and check a snippet from the supplied findings."),
    ],
)
 
# Run it. The SDK manages the context-isolated worker loops for you.
result = Runner.run_sync(
    supervisor,
    "Write a short post on vLLM's PagedAttention, with a working Python snippet.",
)
print(result.final_output)

The manager receives each specialist’s output as a tool result and remains responsible for the final answer. Configure context inheritance and result extraction to pass the evidence each role needs.

Traces should record what each worker received and returned so a reviewer can locate missing information.


Misconceptions

"Multi-agent always beats single-agent." More workers add both capacity and coordination. Evaluate task success, latency, and token use against a single-agent baseline instead of treating the number of agents as a quality measure.

"A2A and MCP are interchangeable." Their intended surfaces differ, even though both can represent extended work. Choose according to the client/server contract you need, and inspect the versioned specification rather than assuming the backend’s architecture from the protocol name.

"A more connected message graph must be more effective." More edges permit more communication, but also create more decisions about routing, disagreement, and stopping. The useful topology depends on the task and coordination policy.

"A handoff preserves everything the next worker needs." That depends on what is passed. A summary may drop a crucial detail; a complete artifact may be too large or poorly organized. Make the contract explicit and check the receiving worker’s result against the original evidence.

What's next

The series map links these agent interfaces to the earlier posts on generation, training, inference, and retrieval.


Additional reading (and watching)