Simple definition#
A multi-agent system splits work among several agents, each with its own instructions, tools and context, which coordinate to reach a goal. It is the AI equivalent of a team: a lead delegates to specialists.
Why use more than one agent?#
| Reason | Explanation |
|---|---|
| Separation of concerns | Each agent has a focused prompt and a small tool set — easier to build, test and own |
| Context isolation | A sub-agent explores in its own context window and returns only a short summary, keeping the lead’s context clean |
| Parallelism | Independent research or analysis runs concurrently |
| Different models | A frontier model plans; cheaper models execute |
| Organisational ownership | Teams own “their” agent (HR agent, IT agent), like microservices |
| Security boundaries | An agent that reads untrusted content has no access to sensitive tools |
Topologies#
Supervisor (orchestrator)#
flowchart TB
U["User"] --> SUP["Supervisor agent<br/>plans, delegates, synthesises"]
SUP --> A1["Research agent<br/>search tools"]
SUP --> A2["Data agent<br/>SQL tools"]
SUP --> A3["Writer agent<br/>no tools"]
A1 --> SUP
A2 --> SUP
A3 --> SUP
SUP --> U
The most common production topology. Sub-agents are often exposed to the supervisor as tools (“agents as tools”).
Hierarchical#
flowchart TB
TOP["Top-level supervisor"] --> M1["Finance team lead"]
TOP --> M2["Legal team lead"]
M1 --> W1["AP agent"]
M1 --> W2["Forecast agent"]
M2 --> W3["Contract agent"]
M2 --> W4["Regulation agent"]
Supervisors of supervisors, for large problem spaces. Each level keeps a manageable number of direct reports.
Sequential pipeline#
flowchart LR
A["Intake agent"] --> B["Analysis agent"] --> C["Drafting agent"] --> D["Compliance-check agent"] --> OUT["Output"]
Fixed order, like an assembly line — really a prompt chain of agents. Predictable and easy to test.
Handoff (swarm)#
flowchart LR
T["Triage agent"] -->|"handoff: billing"| B["Billing agent"]
T -->|"handoff: tech"| TS["Tech support agent"]
B -->|"handoff: needs refund approval"| R["Refunds agent"]
TS -->|"handoff back"| T
The active agent transfers the conversation (and control) to another agent. No central supervisor; good for customer-service flows where the user talks to one agent at a time.
Network / peer-to-peer#
Any agent can call any other. Flexible but hard to reason about, debug and bound — rarely the right choice in enterprises.
Debate and voting#
Several agents answer independently, critique each other, and a judge or majority decides. Improves accuracy on hard reasoning at high cost.
Blackboard (shared workspace)#
Agents read and write a shared state (the “blackboard”); a controller picks which agent acts next based on the state. Good for incremental problem-solving such as incident investigation.
Communication and state#
| Approach | How | Notes |
|---|---|---|
| Agents as tools | Supervisor calls sub-agent like a function; gets a result | Simple, clear ownership of control |
| Message passing | Agents send messages / tasks to each other | Needs protocols, correlation IDs |
| Shared state | Common state object or blackboard | Needs a schema; risk of conflicting writes |
| Handoff | Transfer conversation and control | Pass a concise summary, not the full history |
Design rules:
- Give each agent a clear contract: input, expected output format, scope, tools.
- Pass concise, structured summaries between agents — not entire transcripts.
- Keep a single owner of the user conversation.
- Propagate identity and permissions: a sub-agent acts with the original user’s rights, not more.
- Use correlation IDs and distributed tracing across agents.
Agent-to-agent protocols#
A2A (Agent2Agent) is an open protocol, started by Google in 2025 and now under the Linux Foundation, for agents built by different teams or vendors to collaborate:
sequenceDiagram
participant CA as Client agent (e.g. procurement)
participant RA as Remote agent (e.g. supplier's quoting agent)
CA->>RA: GET /.well-known/agent-card.json
RA-->>CA: Agent Card: name, skills, endpoint, auth requirements
CA->>RA: send message: create task "quote 500 units of PX-9"
RA-->>CA: task {id, status: working}
RA--)CA: status update / streaming events
RA-->>CA: task completed + artifact (quote document)
- Agent Card — a JSON description of an agent’s skills, endpoint and auth.
- Task — a unit of work with a lifecycle (submitted, working, input-required, completed, failed…).
- Messages and artifacts — communication and outputs (text, files, structured data).
- Runs over HTTP with JSON-RPC, streaming via server-sent events, and push notifications for long tasks.
MCP vs A2A: MCP connects an agent to tools and data; A2A connects agents to agents, treating the remote agent as an opaque peer that owns its own tools and reasoning.
Failure modes#
Research on multi-agent failures groups them into three families:
| Family | Examples |
|---|---|
| Specification problems | Vague roles, overlapping responsibilities, unclear stop conditions |
| Inter-agent misalignment | Agents ignore each other’s output, withhold information, duplicate work, talk in loops |
| Verification failures | Nobody checks the final result; premature termination; errors amplified down the chain |
Mitigations: explicit contracts and output schemas, a single coordinator, step and token budgets, a verification step with real checks, tracing of every agent hop, and evaluation of whole trajectories.
Single agent or multi-agent?#
flowchart TD
A{"Can one agent with a<br/>focused tool set do it?"} -->|"yes"| S["Single agent"]
A -->|"no"| B{"Are sub-tasks independent<br/>and parallelisable?"}
B -->|"yes"| SUPV["Supervisor + parallel workers"]
B -->|"no"| C{"Distinct domains owned<br/>by different teams?"}
C -->|"yes"| HO["Handoff or agents-as-tools,<br/>A2A across organisations"]
C -->|"no"| D{"Too many tools<br/>for one agent?"}
D -->|"yes"| SPEC["Supervisor with<br/>specialised sub-agents"]
D -->|"no"| S
Common mistakes#
Review questions#
When would you use a multi-agent architecture? When a task needs parallel exploration, distinct specialised tool sets, context isolation, different models for planning and execution, or separate team ownership — and the value justifies the extra cost and complexity. Otherwise a single agent is better.
Describe the supervisor pattern. A supervisor agent receives the task, decomposes it, delegates sub-tasks to specialised agents (often exposed as tools), collects their results and synthesises the final answer. It owns the user conversation and stop conditions.
What is the difference between handoff and supervisor? In handoff, control transfers from one peer agent to another, which then talks to the user directly. In supervisor, a central agent stays in control and calls sub-agents, which return results to it.
What is A2A and how does it relate to MCP? A2A is an open protocol for agents to discover each other through agent cards and delegate tasks with a defined lifecycle. MCP connects an agent to tools and data. They are complementary: an agent may use MCP for its tools and A2A to collaborate with other agents.
What are common failure modes of multi-agent systems? Poor specification (unclear roles and stop conditions), misalignment between agents (ignored outputs, loops, duplicated work) and missing verification. Mitigate with contracts, schemas, a coordinator, budgets, verification steps and tracing.
Summary#
- Multi-agent systems split work across specialised agents: supervisor, hierarchical, pipeline, handoff, debate, blackboard.
- Benefits: focus, context isolation, parallelism, ownership, security boundaries. Costs: tokens, latency, coordination failures.
- Use clear contracts, summaries not transcripts, identity propagation, budgets and tracing.
- A2A connects agents across teams and vendors; MCP connects agents to tools.
References#
- Anthropic, How we built our multi-agent research system, 2025.
- Cemri et al., Why Do Multi-Agent LLM Systems Fail?, 2025.
- Agent2Agent (A2A) protocol specification.
- Du et al., Improving Factuality and Reasoning in Language Models through Multiagent Debate, 2023.