Multi-agent systems
Topologies, communication, the share-context debate, failure taxonomy and frameworks
Splitting work across agents buys parallelism, context isolation and specialization — and costs roughly 15× the tokens of a chat turn plus a whole new class of coordination failures. In 2025 two credible teams published opposite advice (Anthropic's parallel research agents vs Cognition's "don't build multi-agents"), and a careful study showed most multi-agent failures are design failures, not model failures. This lesson gives you the topologies, the evidence and a decision procedure.
You'll be able to
- Describe the main multi-agent topologies (orchestrator–workers, hierarchical, handoffs, debate, pipelines) and their communication mechanisms
- Reconstruct the Anthropic vs Cognition debate and state when each side is right
- Use the MAST failure taxonomy to diagnose a failing multi-agent trace
- Decide when a multi-agent design is justified and pick a framework accordingly
Key ideas
- Multi-agent systems buy context isolation, parallelism and specialization at ~15× the tokens of chat plus new coordination failures.
- Topologies: orchestrator–workers, hierarchical, handoffs, debate/voting, role pipelines, mixture-of-agents — each with a characteristic weakness.
- Communication channels (messages, structured outputs, shared state, artifacts) all compress information; shared artifacts carry decisions best.
Show 4 more key ideas
- Anthropic's research system: detailed delegation specs, effort scaled to complexity, parallel tool calls, early evals — a 90.2% gain over single-agent on their eval.
- Cognition's counter-argument: share full context and avoid parallel decision-makers; actions carry implicit decisions that conflict.
- Resolution: parallelize read-heavy breadth-first work; serialize or partition writes to shared artifacts.
- MAST: 14 failure modes in specification/design, inter-agent misalignment and verification/termination — mostly fixed structurally, not with prompt tweaks.
Suggested path through this lesson
Why more than one agent?
A single agent is bounded by one context window (10.4 Memory and context engineering), one set of tools, one sequence of steps. Multiple agents offer:
- Context isolation. Each sub-agent gets a clean window for its subtask and returns a summary — the parent's context stays small.
- Parallelism. Independent subtasks run at once; Anthropic reported that parallel sub-agents and parallel tool calls cut research time for complex queries by up to 90%.
- Specialization. Different prompts, tools, models (cheap workers, expensive planner) and permissions per role (10.10 Agent safety and security).
- Separation of concerns. A reviewer agent that never sees the author's reasoning gives a more independent check (10.5 Agentic workflow patterns).
The bill: Anthropic measured multi-agent systems at about 15× the tokens of chat, and coordination introduces failures that do not exist in a single loop.
Topologies
| topology | how it works | strengths | weaknesses |
|---|---|---|---|
| orchestrator–workers (supervisor) | a lead agent plans, spawns workers with task specs, synthesizes | parallel breadth-first work; isolation | lead must delegate precisely; synthesis bottleneck |
| hierarchical | supervisors of supervisors; teams per domain | scales organizationally | latency and cost stack; blame is hard to assign |
| handoffs | an agent transfers the whole conversation to a specialist (OpenAI Agents SDK's primitive) | simple mental model; one active agent at a time | ping-pong loops; context grows with each hop |
| peer debate / voting | several agents answer, critique, converge (Du et al. 2023) | catches individual errors; calibrates | correlated errors; 3–10× cost |
| role pipelines | fixed roles with standard operating procedures (MetaGPT, ChatDev: PM → architect → engineer → QA) | reproducible structure; artifacts at each stage | rigid; failures in early stages propagate |
| mixture-of-agents | layers of models whose outputs feed an aggregator | ensemble gains | heavy; mostly a quality trick for single answers |
Communication and shared state
Agents talk through messages (natural language — flexible, lossy), structured outputs (9.6 Generation side: context assembly, citations, structured outputs and tool calling — precise, brittle to schema gaps), shared state objects (a typed state passed along graph edges, as in LangGraph), or artifacts (files, documents, repositories) that everyone reads and writes. The last is underrated: a shared repository with commits, or a shared notes file, carries decisions without the "telephone game" degradation of message passing. Whatever the channel, every hop compresses information; the question is whether what is lost matters for the receiver's decisions.
The 2025 debate
Anthropic — How we built our multi-agent research system (June 2025). A lead agent (a frontier model) plans, spawns 3–5 sub-agents in parallel with explicit task descriptions — objective, output format, tool guidance, boundaries — and synthesizes their condensed findings. On their internal research eval, the multi-agent system with a stronger lead and capable workers outperformed a single-agent configuration by 90.2%. Hard-won lessons: teach the orchestrator to delegate with detail; scale effort to query complexity (one sub-agent for a fact, ten for a survey); let sub-agents call tools in parallel; start evals early with ~20 queries; use LLM-as-judge rubrics plus end-state checks; make the system observable; treat deployment of agents as stateful, resumable processes.
Cognition — Don't build multi-agents (June 2025). Two principles: share full context (including the trace of decisions, not just messages), and actions carry implicit decisions, so parallel agents make conflicting decisions that compound into incoherent results. Their recommendation: a single-threaded agent with context compression (10.4 Memory and context engineering) rather than parallel sub-agents, especially for building things.
Both are right about their domain. Research is read-heavy and breadth-first: sub-agents gather independent evidence and the synthesis step reconciles it. Software construction is write-heavy and coherence-bound: two agents editing one codebase make incompatible choices. Experiments that did use many parallel coding agents — Anthropic's 2026 write-up on building a C compiler with a team of Claudes is the notable public example — relied on strict task partitioning and verification rather than free coordination. The rule that falls out: parallelize reads freely; serialize writes or partition them so no two agents touch the same artifact.
Why multi-agent systems fail (MAST)
Cemri et al. (March 2025) analysed more than 150 traces across several popular frameworks and built the Multi-Agent System Failure Taxonomy: 14 failure modes in three categories.
- Specification and system design — disobeying task or role specifications, step repetition, loss of conversation history, not knowing when to terminate.
- Inter-agent misalignment — conversation resets, failing to ask for clarification, task derailment, withholding information, ignoring another agent's input, reasoning–action mismatch.
- Task verification and termination — premature termination, no or incomplete verification, incorrect verification.
Two findings matter for you: the failures spread across all three categories rather than clustering on model capability, and simple prompt fixes produced limited gains — the fixes that worked were structural (clear roles and termination conditions, verification steps, better orchestration). The taxonomy is also a debugging checklist: when a multi-agent run fails, classify the first failure and fix that layer.
Intuition. A multi-agent system is an organization. Organizations fail from unclear roles, bad hand-offs and no QA far more often than from unintelligent employees. Design the org chart, the meeting notes and the review process; then hire the models.
Frameworks in 2026
- LangGraph — explicit graphs with typed shared state, conditional edges, checkpoints and human interrupts; supervisor and hierarchical templates (10.11 Building production agents).
- OpenAI Agents SDK — agents with tools, handoffs, guardrails and tracing; a thin, code-first layer over the API.
- Claude Agent SDK — the harness behind Claude Code exposed as a library: tools, file/shell access, sub-agents, permissions, MCP.
- AutoGen / AG2 — conversational agents exchanging messages; the origin of much multi-agent research.
- CrewAI — role-based "crews" with tasks and processes; fast to prototype.
- smolagents (Hugging Face) — minimal agents whose actions are code; good for learning.
- Google ADK — multi-agent hierarchies, workflow agents and A2A integration (10.7 MCP and interoperability (plus Agent Skills and A2A)).
Frameworks encode a topology; pick the one whose topology matches your decision below, and read its code — the loops are small.
Decision checklist
Build multi-agent only if (a) the task is parallelizable or exceeds one context window, (b) sub-results can be verified or reconciled by the parent, (c) writes to shared artifacts are partitioned or serialized, (d) you have a trace viewer and an eval set, and (e) the 10–15× cost is justified by the value of the task. Otherwise, a single agent with compaction and good tools wins (10.5 Agentic workflow patterns).
Where this shows up later
- Interoperability between agents built by different teams is A2A's job in 10.7 MCP and interoperability (plus Agent Skills and A2A).
- Trajectory-level evaluation and the cost-per-success metric in 10.9 Evaluating agents are how you test topologies against each other.
- Permission separation between roles and the confused-deputy problem appear in 10.10 Agent safety and security; durable, resumable multi-agent execution in 10.11 Building production agents.
Common pitfalls (4)
- Letting two agents edit the same files or document concurrently; incompatible implicit decisions produce incoherent results.
- Delegating with a one-line instruction; workers duplicate or miss work and the orchestrator cannot verify.
- Passing raw worker transcripts back to the orchestrator, which defeats context isolation and explodes cost.
- Blaming the model for failures that are really missing termination conditions, verification or role clarity (MAST categories 1 and 3).
Recap: all 7 key points
- Multi-agent systems buy context isolation, parallelism and specialization at ~15× the tokens of chat plus new coordination failures.
- Topologies: orchestrator–workers, hierarchical, handoffs, debate/voting, role pipelines, mixture-of-agents — each with a characteristic weakness.
- Communication channels (messages, structured outputs, shared state, artifacts) all compress information; shared artifacts carry decisions best.
- Anthropic's research system: detailed delegation specs, effort scaled to complexity, parallel tool calls, early evals — a 90.2% gain over single-agent on their eval.
- Cognition's counter-argument: share full context and avoid parallel decision-makers; actions carry implicit decisions that conflict.
- Resolution: parallelize read-heavy breadth-first work; serialize or partition writes to shared artifacts.
- MAST: 14 failure modes in specification/design, inter-agent misalignment and verification/termination — mostly fixed structurally, not with prompt tweaks.
Watch
Talks and walkthroughs of the orchestrator–workers research architecture and its lessons.
Read
Exercises
- Reproduce the debate on a small scale
Pick a read-heavy task (summarize the state of a topic from 8 web pages) and a write-heavy task (implement a 3-module Python package). Run each as (a) a single agent with compaction and (b) an orchestrator with 3 workers. Measure quality (rubric), tokens and wall-clock. Expected: (b) wins or ties on the research task; (a) is more coherent on the coding task.
- Diagnose with MAST
Collect five failing multi-agent traces (your own or from a framework's examples). Label the first failure in each with the MAST category and mode. Expected: most labels fall in specification/termination or verification, and each suggests a structural fix rather than a prompt tweak.
- Write a delegation template
Design the task-spec format an orchestrator must fill for each worker (objective, output schema, allowed tools, boundaries, budget, done-criteria). Re-run your orchestrator with and without it. Expected: fewer duplicated or missing subtasks; count them.
Quiz
Flashcards
These cards are now in your spaced-repetition queue. Review all due cards →