Chapter 5 · Multi-Agent Systems¶
5.1 Why Multi-Agent ★★¶
What a multi-agent system is ★¶
A multi-agent system (MAS) is one in which several LLM-driven agents work together on a task. Each agent has its own system prompt (which sets its role and behavior), its own tools and, most importantly, its own context window. They collaborate by sending each other messages or by reading and writing shared state (the basic loop of a single agent is covered in Chapter 1).
One point needs clarifying up front: these agents are often instances of the same model. So in terms of compute, "multiple agents" is not fundamentally different from "one agent called several times". The real difference is how information is organized: what each agent sees and doesn't see, who is responsible for what, and how results are combined. Once you understand this, it becomes clear where the benefits of multi-agent systems come from and where their costs lie.
Interview questions
- ★ If all agents use the same model, what is the essential difference between "multiple agents" and "one agent called many times"?
Four motivations ★★¶
- Specialization. Cram every role and every tool into one agent, and the prompt keeps growing while its instructions start to conflict (e.g. "be creative" versus "follow the output format strictly"); with many tools, the chance of picking the wrong one also rises. Split into several agents, each agent does one job with only a few relevant tools, so its instructions are focused and its behavior more stable. Different roles can also use different models, e.g. a cheap small model for simple retrieval sub-tasks. The cost is that the interfaces between agents must be clearly defined, or things go wrong at handoffs.
- Parallelism. If a task splits into independent sub-tasks, such as researching five companies, a single agent has to do them one after another, so the total time is the sum of all sub-task times; multiple agents can work at the same time, so the total is roughly the planning time plus the slowest sub-task plus the synthesis time (see the formula, where \(T_i\) is the time for sub-task \(i\) and \(T_{\text{plan}}\) and \(T_{\text{synth}}\) are the planning and synthesis times). But this requires the sub-tasks to be truly independent; if a later step depends on an earlier result, there's nothing to parallelize.
- Separate contexts. This is often the most important point. Each agent has its own context window, so the whole system can "read" far more than one window holds: five sub-agents each read tens of thousands of tokens and each returns only a short summary, so the main agent's context stays clean. Separate contexts also bring "fresh eyes": a reviewer who hasn't seen the author's reasoning is less likely to be led along by it and more likely to spot problems. The cost is that information is lost when passed between agents, and each agent sees only part of the picture.
- Debate and verification. When a model checks its own answer, it tends to repeat the same mistakes, because its biases are consistent. Having several agents answer independently and then challenge each other, or adding a dedicated verifier, can catch errors a single agent misses (see 5.4). The cost is more compute, and if all agents use the same model, their errors are still correlated.
One last caution: many of the gains from multi-agent systems really come from "spending more tokens". When evaluating a multi-agent system, always ask: if a single agent were given the same number of tokens, could it do just as well? (see 5.6)
Interview questions
- ★★ Why use a multi-agent system, and what advantages does it have over a single agent?
- ★ Why are separate contexts considered one of the most important benefits of multiple agents?
5.2 Architectures ★★¶
| Centralized (orchestrator–workers) | Decentralized (peer-to-peer) | Hierarchical | |
|---|---|---|---|
| Structure | One orchestrator plans, delegates and aggregates; workers don't talk to each other | Agents talk directly, by turns or by broadcast; no single boss | A tree: a top orchestrator, mid-level leads, leaf workers |
| Control flow | Explicit and easy to trace | Emergent; needs an explicit stopping rule | Explicit at each level |
| Strengths | Clear task decomposition; one natural place to verify results; easy to debug | Diverse views; no single point of failure; suits debate and negotiation | Scales to large tasks; each manager has a small span of control |
| Weaknesses | The orchestrator is a bottleneck and single point of failure; its context fills up with reports | Communication grows as \(O(N^2)\); can loop or drift; hard to debug | Information is distorted across levels; latency and cost add up |
| Typical use | Research agents, Magentic-One | Multi-agent debate, group discussion | Very large projects, organization-style simulations |
Multi-agent systems fall into three basic architectures, depending on who controls the flow and who talks to whom (see the table). Real systems are often a mix.
Centralized: orchestrator and workers ★★¶
A centralized architecture has one orchestrator (also called a manager or lead agent) that understands the task, splits it into sub-tasks, assigns them to workers, collects the results and decides what to do next; workers usually don't talk to each other directly. The typical flow is: the orchestrator makes a plan → writes a task brief for each worker → the workers execute (usually with their own tools) → return results → the orchestrator aggregates and checks them, then decides whether to finish or dispatch more work. From the orchestrator's point of view, calling a worker is much like calling a tool, except that inside this "tool" is a full agent loop (agent-as-tool; tool calling is covered in Chapter 3).
Task decomposition can be static, with the developer writing the flow in advance, e.g. "retrieve, then write, then review"; or dynamic, with the orchestrator deciding on the spot how many pieces to split the task into and how many workers to send. Dynamic decomposition is more flexible but leans harder on the orchestrator's planning ability (planning is covered in Chapter 2).
A typical example is Magentic-One (Fourney et al. 2024). Its orchestrator keeps two "ledgers": the task ledger records known facts, guesses and the overall plan; the progress ledger checks at every step whether the task is done, whether progress is being made, and whom to assign next. If several steps pass with no progress, the orchestrator goes back to the task ledger and revises the plan. It directs four specialist agents: WebSurfer, which operates a browser; FileSurfer, which reads local files; Coder, which writes code; and ComputerTerminal, which runs the code.
The benefits of centralization are a clear control flow, easy diagnosis when something goes wrong, and the orchestrator serving as a natural checkpoint where workers' results can be verified during aggregation. The downside is that the orchestrator is both a bottleneck and a single point of failure: if it misunderstands the task, every worker's effort is wasted, and its context gradually fills up with the reports the workers send back.
Interview questions
- ★★ What are the common multi-agent architectures, and what are their pros and cons?
- ★ What are the main responsibilities of the orchestrator in a centralized architecture?
- ★ Is static or dynamic task decomposition better?
- ★ What roles do Magentic-One's task ledger and progress ledger play?
Decentralized: peer-to-peer ★¶
A decentralized architecture has no commander: agents talk to each other directly, taking turns, broadcasting to everyone, or messaging one another point to point. Multi-agent debate (5.4) is a typical example: several agents of equal standing read each other's answers and correct one another.
Its benefits are diverse viewpoints and no dependence on any single agent: when one agent errs, others have a chance to correct it. The downsides are just as clear. First, communication grows quickly with the number of agents: \(N\) agents have \(O(N^2)\) pairwise channels, every agent has to read everyone else's messages each round, and contexts balloon. Second, nobody is in charge of "ending", so the system can go round in circles of pleasantries or repeated arguments; explicit stopping conditions are required, such as a maximum number of rounds or reaching consensus. Third, when something goes wrong it's hard to tell whose fault it was, so debugging is difficult.
In practice, many "decentralized" systems still keep a lightweight coordinator; for example, in AutoGen's group chat a manager decides who speaks next. So centralized and decentralized are better seen as two ends of a spectrum than as an either-or choice.
Interview questions
- ★ Why are decentralized architectures hard to terminate and hard to debug?
Hierarchical ★¶
A hierarchical architecture is the recursive version of centralization: a top orchestrator manages several mid-level leads, and each lead manages its own workers, like a tree, or like a human company's org chart. The motivation is span of control: an orchestrator can effectively manage only so many workers, so for very large tasks you add levels, so that each manager deals with only a few direct reports.
The cost is that every extra level means one more round of paraphrasing and compression: the top-level intent may be distorted by the time it reaches the bottom, and bottom-level details may be lost by the time they reach the top, like a game of telephone. Latency and cost also add up level by level. So in today's LLM systems hierarchies deeper than two levels are rare, and most practical systems are "one orchestrator plus one layer of workers".
(Another common shape is the sequential pipeline: A hands off to B when done, B hands off to C, like an assembly line; ChatDev's waterfall process in 5.3 works this way. Its control is simple, but errors from earlier stages flow all the way down; see 5.6.)
Interview questions
- ★ Why shouldn't a hierarchical architecture have too many levels?
5.3 Role-Play and SOP-Based Frameworks ★¶
| Framework | Core idea | Agents / roles | Coordination |
|---|---|---|---|
| CAMEL (Li et al. 2023) | Two agents role-play to finish a task with minimal human input | An AI user (gives instructions) and an AI assistant (carries them out), plus a task specifier | Inception prompting; turn-by-turn dialogue |
| MetaGPT (Hong et al. 2023) | Encode human SOPs into the workflow; agents exchange structured documents | Product manager, architect, project manager, engineer, QA engineer | Assembly line plus a shared message pool with publish–subscribe |
| ChatDev (Qian et al. 2023) | A virtual software company following the waterfall model | CEO, CTO, programmer, reviewer, tester, etc. | Chat chain: each sub-task is a dialogue between two roles |
| AutoGen (Wu et al. 2023) | A general framework in which everything is a conversable agent | Assistant agents; user-proxy agents that run code or bring in a human | Programmable conversation patterns; a manager picks the next speaker in group chat |
The first wave of multi-agent frameworks, which appeared in 2023, shared one core idea: have LLMs play different roles, imitating the division of labor in a human team. The table shows the four most commonly cited examples.
CAMEL: two-agent role-play¶
CAMEL (Li et al. 2023) set out to solve this problem: completing a complex task with a chat model requires a human to keep giving instructions and correcting course, so can the model cooperate with itself instead? Its approach is to have two agents play different roles: the AI user gives instructions step by step, and the AI assistant carries them out and proposes solutions; in addition, a task specifier first turns the user's vague idea into a concrete task. The key technique is inception prompting: at the start of the conversation, system prompts set up both agents' roles and rules, such as "never flip roles", "give one instruction at a time" and "output an end marker when done".
These rules are targeted, because the paper observed several common failures in autonomous cooperation: role flipping (the assistant starts instructing the user), the assistant merely repeating the instruction, flaky non-answers, and the two agents getting stuck in an infinite loop of messages. CAMEL's larger impact turned out to be as a method for synthesizing conversation data: pairs of agents converse under many role combinations to generate instruction data at scale.
Interview questions
- ★ What typical failures appear when two agents cooperate autonomously, and how does CAMEL's inception prompting address them?
MetaGPT: encoding SOPs into the workflow ★¶
MetaGPT (Hong et al. 2023) targets a fundamental problem of free-form chat between agents: the longer the conversation, the more likely it is that one agent's small mistake is taken as fact by the next agent and built upon, so errors amplify layer by layer (the paper calls this cascading hallucination). Its solution borrows the standard operating procedures (SOPs) of human teams: each role works in a fixed order and must produce structured documents rather than chatting freely. In software development, for example, the product manager writes a requirements document (PRD), the architect writes the system design and interface definitions based on the PRD, the project manager breaks down the tasks, the engineer writes the code, and the QA engineer writes the tests.
Two design choices stand out. The first is structured outputs: downstream agents receive documents with a fixed format and complete content, not a conversation that may have left out key information, so there is far less ambiguity. The second is a shared message pool with subscriptions: each agent publishes its outputs to a common pool and subscribes only to the message types relevant to it, so information is shared without agents drowning in irrelevant messages (see 5.5). In addition, the engineer actually runs the code and fixes it based on the errors (executable feedback), and the paper's ablations show this brings a clear improvement.
Interview questions
- ★ Why does MetaGPT use SOPs and structured documents instead of letting agents chat freely?
ChatDev and AutoGen¶
ChatDev (Qian et al. 2023) also simulates a software company, with roles such as CEO, CTO, programmer, code reviewer and tester, and follows the waterfall model through design, coding, testing and documentation phases. Its organizing scheme is the chat chain: each phase is split into small sub-tasks, each sub-task is completed by a dialogue between two roles (one instructs, one executes), and the result is passed to the next link. Dialogues are limited to two participants to keep discussions from getting out of hand. It also introduced communicative dehallucination: before answering, the executing role first asks for specifics (e.g. "which buttons exactly does the interface need?") instead of guessing, which reduces fabrication.
AutoGen (Wu et al. 2023) differs from the other three: it's not a fixed workflow but a general framework. It abstracts everything as a "conversable agent": there are LLM-based assistant agents, and user proxy agents that stand in for a person and can execute code, call tools or hand a question to a real human (human-in-the-loop). Developers organize collaboration by "conversation programming": two-agent chats, sequential chats and group chats are all possible, and in a group chat a manager picks the next speaker based on the context. Magentic-One, mentioned earlier, is built on AutoGen.
Interview questions
- ★ Why does ChatDev restrict each sub-task to a dialogue between two roles, and what is communicative dehallucination?
- ★ What does AutoGen's user proxy agent do, and how is the next speaker chosen in a group chat?
Common lessons ★¶
The lessons from these frameworks come down to three points. First, structure is more reliable than free conversation: clear roles, fixed procedures and formatted outputs greatly reduce misunderstandings and the spread of errors. Second, real feedback matters more than role assignments: error messages from actually running code and tests are far more reliable than "review comments" from another agent. Third, these procedures are designed by people: they work well in domains with mature processes like software development, but have to be redesigned for each new domain. This explains the later trend: less reliance on hand-designed role workflows, and more use of one strong agent with tools that spawns sub-agents dynamically when needed. Failure analyses of several popular frameworks (including ChatDev) also show that such systems often gain little over a single agent on common benchmarks (Cemri et al. 2025; see 5.6).
Interview questions
- ★ What is the core idea of each of CAMEL, MetaGPT, ChatDev and AutoGen?
- ★ Where do the gains of role-play multi-agent frameworks mainly come from, and what are their limitations?
5.4 Multi-Agent Debate ★★¶
How it works ★★¶
The multi-agent debate (MAD) procedure proposed by Du et al. (2023) is very simple (see the formula). In round 0, \(N\) agents (usually several instances of the same model) each answer question \(q\) independently, giving answers \(a_i^{(0)}\). In every following round, each agent sees the other agents' answers and reasoning from the previous round, with a prompt along the lines of "here are other agents' solutions to this problem; using their reasoning as additional advice, give your updated answer", producing a new answer \(a_i^{(r)}\). After \(R\) rounds, a majority vote over all agents' final answers (or their consensus, if they agree) gives the final answer \(\hat{a}\).
The paper's default setting is 3 agents and 2 rounds of debate, chosen mainly for cost. The evaluation covers two kinds of tasks: reasoning (arithmetic, GSM8K, chess move prediction) and factuality (biographies of computer scientists, MMLU, chess move validity). Debate beat a single agent, self-reflection, and majority voting over the same number of agents on these tasks; on arithmetic, for example, debate scored about 82% versus about 69% for majority voting. Adding more agents and more rounds both helped further, but gains levelled off after about 4 rounds. With many agents, concatenating everyone's answers into the prompt gets too long, so the paper summarized the other agents' answers first, which actually worked better. The method only needs to call the model, not access its weights, so it works directly with black-box APIs.
As for cost, there are \(N(R+1)\) generations in total; and in every round each agent reads the answers of the other \(N-1\) agents (average length \(\bar{L}\)), so input tokens grow roughly as \(N^2 R\). Doubling the number of agents roughly quadruples the reading.
Interview questions
- ★★ How does multi-agent debate work?
- ★ How does the cost of debate grow with the number of agents and rounds?
Why it helps ★★¶
The gains from debate can be understood from three angles.
The first is an ensemble effect. Several agents answering independently amounts to sampling several reasoning paths from the model, and as long as their errors aren't perfectly correlated, voting cancels out some of the random errors. This is the same as self-consistency (see LLM Basic Chapter 7).
The second is cross-examination. Unlike plain voting, in a debate agents can see each other's reasoning. An agent that made a mistake at some step may notice it after seeing someone else do that step differently. On factual questions, Du et al. made an interesting observation: facts the model is confident about tend to be stated the same way by different agents, and agents are hard to talk out of them; details the model is unsure about tend to differ from agent to agent. Debate pushes agents to keep what everyone agrees on and drop what they disagree on, so fewer made-up details (hallucinations) survive into the final answer.
The third is breaking "degeneration of thought". Liang et al. (2023) pointed out a problem with self-reflection: once a model is confident in its answer, it struggles to produce new ideas no matter how much it reflects, even if the original answer is wrong; they call this degeneration-of-thought. Their approach has two agents argue the affirmative and negative sides, forcing different viewpoints, with a judge agent making the call. Opposition from outside gets a model out of its original line of thinking more easily than self-reflection does (self-reflection is covered in Chapter 2).
Interview questions
- ★★ Why does multi-agent debate improve factuality and reasoning?
- ★ What is degeneration-of-thought, and how does debate mitigate it?
Limitations and critiques ★★¶
Debate doesn't always work, and later research has raised several challenges.
Agents can converge on a wrong answer together. Du et al. themselves noted that debates often converge to a single answer that may still be wrong, and the models confidently affirm it. A wrong majority can also put "conformity pressure" on a minority agent that was right, making it abandon the correct answer.
Errors from the same model are correlated. If every agent is the same model, they share the same knowledge gaps and biases: a fact the model generally doesn't know won't be known after asking it three times or letting it debate for three rounds. Zhang et al. (2025) found that letting different agents use different models (model heterogeneity) consistently improves every debate method.
At equal compute it doesn't necessarily beat simple methods. Several studies redid the comparison with compute controlled. Smit et al. (2023) found that debate doesn't reliably beat ensembling methods such as self-consistency, and is sensitive to hyperparameters (such as how inclined agents are to agree). Wang et al. (2024) found that a single agent given a strong enough prompt (e.g. with demonstrations) performs about as well as the best multi-agent discussion. Zhang et al. (2025) found across many benchmarks that debate often fails to beat CoT and self-consistency, despite using more compute.
The gains may come mainly from voting. Choi et al. (2025) found that on several benchmarks, just taking the independent round-0 answers and doing a majority vote performs about as well as the full debate. They explained why with a probabilistic model: under their model, an agent's belief in the correct answer forms a martingale across rounds, i.e. the formula above, where the expected next-round belief \(p^{(r+1)}\) equals the current \(p^{(r)}\). This means debate itself doesn't raise the expected accuracy; it only makes answers converge across agents, and the real gain comes from the initial diversity plus the final vote.
In addition, LLM judges are biased: Liang et al. found that a judge favors the side that uses the same base model as the judge.
Putting it together, debate is more likely to help when answers can be cross-checked and different agents make diverse errors (e.g. different models, different information sources or tools); on factual questions where hallucinations vary between samples; and when compute isn't the main constraint. Conversely, if the model has a systematic error on a question, or a single strong model with a good prompt is already enough, debate is unlikely to add much.
Interview questions
- ★★ At equal compute, which is better, multi-agent debate or self-consistency?
- ★ What goes wrong when every agent in a debate uses the same model?
- ★ When is multi-agent debate most likely to help?
5.5 Communication ★¶
| Message passing | Shared state / blackboard | |
|---|---|---|
| How it works | Agents send messages to specific agents or broadcast to a group | Agents read from and write to a common store (board, file system, database) |
| Who sees what | Only the recipients | Everyone with access, optionally filtered by subscription |
| Strengths | Clear causality, easy to trace; each agent keeps a private, lean context | Loosely coupled agents; easy to add agents; one shared source of truth |
| Weaknesses | Information silos; relaying loses detail; \(O(N^2)\) channels when everyone talks to everyone | Conflicting writes; the board grows noisy; needs a schema and cleanup |
| Examples | Debate, CAMEL dialogues, orchestrator ↔ worker calls | MetaGPT's shared message pool, a shared code repo or notes directory |
Message passing ★¶
Message passing is the most direct approach: one agent sends a message to another (point to point), or posts to a group where everyone sees it (broadcast). An orchestrator assigning work to a worker, a worker returning results, and agents reading each other's answers in a debate are all message passing. Its benefit is clear causality: who told whom what, and when, is plain to see, which makes tracing and debugging easy; each agent also sees only the messages sent to it, so its context stays lean. In a group chat, you also have to decide who speaks next: by turns (round-robin), by rules, or chosen by a manager LLM based on the conversation.
The central question in message passing is what to put in the message. Natural-language messages are flexible but ambiguous, and the recipient can't see the sender's full context, so it can only understand the task from the message itself. Too brief, and the recipient misunderstands: if the orchestrator writes just "research the semiconductor shortage", three workers may well produce heavily overlapping results. Too detailed, and you lose the point of isolating information in separate contexts. That's why many systems use structured messages: fixed fields (goal, inputs, output format, constraints), or, as in MetaGPT, formatted documents passed directly. (At the protocol level, MCP standardizes the interface between agents and tools, see Chapter 3; Google's A2A protocol aims to standardize communication between agents.)
Interview questions
- ★ What ways do agents have to communicate, and what are the pros and cons of each?
- ★ When passing a task between agents, what goes wrong if the message is too brief or too detailed?
Shared state and the blackboard ★¶
The other approach is for agents not to talk directly, but to read and write a shared place. The idea comes from the classic AI blackboard architecture, first seen in the Hearsay-II speech-recognition system of the 1970s: several expert modules watch the same "blackboard", and whichever module can contribute based on what's currently on the board writes to it; the modules don't need to know about each other.
In LLM multi-agent systems, shared state takes many forms: MetaGPT's shared message pool (publish–subscribe); in coding, the code repository itself, with every agent working on the same repo; in research, a shared file system where sub-agents write detailed findings to files and pass only references back to the main agent, so information isn't distorted as it's relayed; or a memory store shared by several agents (memory is covered in Chapter 4).
The benefit of shared state is loose coupling between agents: adding an agent doesn't require changing the others, and everyone sees the same "facts". The downside is having to handle concurrency and consistency: two agents editing the same file at once may overwrite each other, or make decisions based on an old version the other has already changed; and as the board accumulates content, it needs structure and cleanup, or every agent ends up reading a pile of noise.
Interview questions
- ★ What is the blackboard architecture, and what forms does it take in LLM multi-agent systems?
5.6 When Multi-Agent Helps and When It Hurts ★★¶
This is the interview topic that best reveals judgment. Multi-agent systems sound powerful, but both recent research and industry experience show they are not a good default.
Costs: tokens and coordination overhead ★★¶
Token overhead. Anthropic's published figures are that agents typically use about 4× the tokens of an ordinary chat, and multi-agent systems about 15×. The reason is simple: every agent reads its own system prompt, task brief and tool definitions; when agents pass information around, the same content is read again by several agents; and structures like debate grow as \(N^2\).
Coordination overhead. Planning, splitting the task, writing a brief for each worker, aggregating results and resolving conflicts are all work a single agent never has to do. If sub-tasks depend on each other, later agents must wait for earlier ones, so the benefit of parallelism disappears and only the extra latency remains. The orchestrator can also become a bottleneck: if it waits synchronously for all workers, one slow worker holds up the whole system.
This creates an evaluation trap: many reported multi-agent gains are confounded with "using more compute". A fair comparison should be made at the same token budget, e.g. giving a single agent the tokens the multi-agent system used, for more samples or longer reasoning, and checking whether it can do just as well (evaluation that reports cost alongside accuracy is covered in Chapter 7).
Interview questions
- ★ What makes a comparison between single-agent and multi-agent systems fair?
Error propagation ★★¶
In a multi-agent system, one agent's output is the next agent's input. If a process passes through \(K\) stages, stage \(k\) succeeds with probability \(p_k\), and nothing downstream checks the work, then the overall success rate is the product of the stage success rates (the formula above). With 5 stages at 95% each, for example, the overall rate is only about 77%.
Worse, downstream agents usually trust upstream output: once a fact made up by one worker enters another agent's context, it is treated as "evidence" for further reasoning, so the error isn't corrected but amplified (what MetaGPT calls cascading hallucination). In addition, every handoff is a lossy compression: only a small part of the upstream agent's full reasoning and context makes it into the handoff message.
So the key to controlling error propagation is whether there are verification points. Controlled experiments by Kim et al. (2025) found that architectures without centralized verification propagate errors more severely. In practice: add checks at key handoffs (the orchestrator cross-checks workers' results, or a separate verifier agent does); use structured outputs to reduce ambiguity; and pass references to the original sources so downstream agents can verify for themselves.
Interview questions
- ★★ How do errors propagate in a multi-agent system, and how can this be controlled?
Strong single-agent baselines ★★¶
More and more evidence shows that a strong single agent often matches a multi-agent system. Besides the debate studies in 5.4, Cemri et al. (2025) analyzed several popular multi-agent frameworks and found that their gains over a single agent on common benchmarks are often small. Kim et al. (2025) ran a more systematic controlled study: across several architectures, model families and agentic benchmarks, the effect of multiple agents depended heavily on task structure. On a financial-analysis task that decomposes into independent parts, a centralized multi-agent setup improved on a single agent by about 80%; but on a planning task where each step depends on the last, every multi-agent variant did worse than the single agent, by up to about 70%. They also found that once the single-agent baseline is already strong, adding coordination brings diminishing or even negative returns, and that tool-heavy tasks suffer more from coordination overhead.
Industry has reached similar conclusions. Walden Yan of Cognition (the company behind Devin) wrote "Don't Build Multi-Agents" in 2025, which states two principles: first, share context, and share full agent traces, not just individual messages; second, actions carry implicit decisions, and conflicting decisions carry bad results. He illustrates them with building a Flappy Bird game: the main agent splits the task into "a moving background with pipes" and "a bird that moves up and down" and hands them to two sub-agents. The first problem is that the sub-agents can't see the full context and misread the task: one builds a Super Mario-style background, and the other builds a bird that doesn't look like a game asset at all. Even if you also pass them the original task, the problem remains: the two sub-agents can't see each other's work, so their style choices are incompatible, and the agent that has to combine them struggles. So he argues that, with 2025-level capabilities, having multiple agents collaborate only yields fragile systems; the default should be a single-threaded, linear agent, and when a task grows too long for the context, a separate model can compress the history of actions and decisions into key points. He also cites Claude Code: it spawns sub-agents but never works in parallel with them, and a sub-agent usually just answers a well-defined question rather than writing code. Note that he doesn't claim multi-agent systems can never work; his view is that agents aren't yet good enough at passing context to one another, and he is optimistic about multi-agent collaboration in the long run. In describing its own multi-agent research system, Anthropic likewise acknowledges that most coding tasks have fewer truly parallelizable parts than research, and that tasks requiring all agents to share the same context, or with many dependencies between agents, are a poor fit for multiple agents today.
The two sides actually agree: read-heavy, parallelizable tasks (search, research, code review) suit multiple agents; for write-heavy, tightly coupled tasks (editing one codebase, writing one document), writes should stay single-threaded, and extra agents should at most contribute information and suggestions.
Interview questions
- ★★ When are multi-agent systems better than a single agent, and when are they worse?
- ★ Why are coding agents mostly single-agent while deep research often uses multiple agents?
- ★ What is the core argument of Cognition's "Don't Build Multi-Agents", and do you agree?
A taxonomy of failures ★¶
| Category | Failure modes |
|---|---|
| System design issues | Disobey task specification; disobey role specification; step repetition; loss of conversation history; unaware of termination conditions |
| Inter-agent misalignment | Conversation reset; fail to ask for clarification; task derailment; information withholding; ignored other agent's input; reasoning–action mismatch |
| Task verification | Premature termination; no or incomplete verification; incorrect verification |
Cemri et al. (2025) systematically studied why multi-agent systems fail. They analyzed a large number of execution traces from several popular frameworks on coding, math and general tasks, and distilled the MAST taxonomy: 14 failure modes in three categories (see the table).
System design issues come from how roles and procedures are defined: agents ignore the task requirements or their role, repeat steps already done, lose the conversation history, or don't know when to stop. Inter-agent misalignment comes from communication: the conversation gets reset, an agent doesn't ask for clarification when it should, drifts off task, holds key information without sharing it, ignores others' input, or says one thing in its reasoning and does another in its actions. Task verification problems come from the checking step: ending too early, verifying incompletely or not at all, or verifying incorrectly. Among the more common are step repetition, reasoning–action mismatch, being unaware of termination conditions, and disobeying the task specification.
They also tried some simple fixes, such as improving role specifications in ChatDev or adding a high-level check against the task objective; these helped somewhat but were far from solving every problem. The authors conclude that many failures stem from organizational and system design and won't be fixed by stronger base models alone. It's the same lesson as in research on human organizations: a team of capable individuals can still fail.
Interview questions
- ★★ What are common failure modes of multi-agent systems?
- ★ Why can't stronger base models alone fix all multi-agent failures?
When to choose multi-agent ★★¶
| Favors multiple agents | Favors a single agent |
|---|---|
| Sub-tasks are independent and can run in parallel | Steps are sequential and depend on each other |
| Mostly reading and gathering (search, review, analysis) | Mostly writing to shared state (one codebase, one document) |
| The information needed exceeds one context window | Everything fits in one context |
| High value per task, so extra tokens are worth it | Cost- or latency-sensitive |
| An independent check or diverse viewpoints help | The task needs one consistent set of decisions |
A practical rule of thumb: start with a single agent, and bring in multiple agents only when you hit a specific bottleneck, such as needing more information than one context window holds, a task with many independent branches that can run in parallel, or a need for an independent check unaffected by the original author's reasoning. Once you do, compare against a single agent at the same token budget to confirm that the gain really comes from the architecture and not just from more compute.
Interview questions
- ★★ Under what circumstances would you choose a multi-agent architecture?
5.7 The Orchestrator–Worker Pattern for Research ★★¶
Why research tasks fit ★★¶
Open-ended research questions have several traits that match the strengths of multiple agents. First, they are often breadth-first: something like "find the board members of every listed company in a given industry" requires dozens of independent lookups, and a single agent searching one after another is slow and prone to giving up halfway. Second, research requires reading a lot of material: search results, web pages and papers quickly fill a context window, while only a small part of it is actually useful. Third, the research path can't be fixed in advance; the direction has to keep adjusting to intermediate findings, so fixed workflows don't apply.
The orchestrator–worker pattern addresses exactly these problems: the lead agent splits the question into several aspects and sends multiple sub-agents to explore them in parallel; each sub-agent searches and reads in its own context and returns only condensed conclusions. In the formula, \(N\) sub-agents each have a window of size \(W\), so the system as a whole can process about \(N \cdot W\) worth of information, while the lead agent only reads \(N\) summaries \(s_i\), each typically just one or two thousand tokens, so its context is far smaller than what the sub-agents actually read. In essence, each sub-agent is a compressor: it squeezes tens of thousands of tokens of raw material into one or two thousand tokens of key points.
Interview questions
- ★ Why do research tasks suit the orchestrator–worker pattern?
The workflow ★★¶
User query
│
Lead agent: analyze → plan → save plan to external memory
├── Subagent 1: search aspect A ──┐
├── Subagent 2: search aspect B ──┼──→ condensed findings (+ files / references)
└── Subagent 3: search aspect C ──┘
│
Lead agent: synthesize → enough? ── no ──→ revise plan, spawn more subagents
│ yes
Citation pass → final report with sources
- Plan: the lead agent analyzes the question, makes a research plan and writes it to external memory, so the plan survives even if a long context gets truncated.
- Dispatch: based on the plan, it creates several sub-agents and writes a detailed task brief for each.
- Parallel search: each sub-agent runs its own "search → read → judge → refine query" loop in a separate context, and can call several tools at once.
- Synthesize and iterate: sub-agents return condensed findings, and the lead agent judges whether the information is sufficient; if not, it revises the plan and dispatches new sub-agents.
- Cite and write: finally, a dedicated step matches every claim in the report to its source, producing a final report with citations.
As with the formula in 5.1, the wall-clock time of the whole process is roughly the planning time plus the slowest sub-agent plus the synthesis time, not the sum of all the searching.
Interview questions
- ★★ How would you design the multi-agent architecture of a deep research system?
An industry example ★¶
Anthropic publicly described its multi-agent research system in 2025, a textbook case of this pattern. The lead agent uses Claude Opus 4, the sub-agents use Claude Sonnet 4, and a dedicated citation agent attaches citations to claims. Key figures and lessons:
- Effectiveness: on an internal research evaluation, the multi-agent system outperformed a single Claude Opus 4 agent by 90.2%, with the biggest gains on breadth-first questions that require pursuing several directions at once. For example, on a task to find the board members of every company in the S&P 500 Information Technology sector, the multi-agent system split the work into separate lookups, while the single agent, searching slowly one at a time, failed to find them all.
- Tokens are the main driver: their analysis on BrowseComp found that token usage alone explains about 80% of the variance in performance, and together with the number of tool calls and the choice of model, about 95%. This shows that much of what the multi-agent architecture does is let the system spend more tokens effectively: several separate contexts work in parallel, breaking past the limit of a single context.
- Cost: multi-agent systems use about 15× the tokens of an ordinary chat, so they only make sense for tasks of high enough value.
- Scaling effort to difficulty: early versions would spawn 50 sub-agents for a simple question, or search endlessly for information that didn't exist. They wrote allocation rules into the prompt: a simple fact lookup gets 1 agent with 3–10 tool calls; a comparison gets 2–4 sub-agents with 10–15 calls each; only complex research gets more than 10 sub-agents.
- Parallelism: the lead agent spawns several sub-agents at once and the sub-agents call several tools at once, cutting research time on complex questions by up to about 90%.
- Evaluation: since every run takes a different search path, they focus on the end result rather than each step of the process, with an LLM judge scoring factual accuracy, citation accuracy, completeness, source quality and tool efficiency (agent evaluation is covered in Chapter 7).
Note that not every deep research product uses a multi-agent architecture; some systems use a single agent trained end to end with reinforcement learning to carry out long searches and reasoning (see Chapter 6; agentic search itself is covered in RAG Chapter 6).
Interview questions
- ★ What is the main reason a multi-agent research system beats a single agent?
- ★ How do you stop the orchestrator from spawning too many sub-agents for simple questions?
- ★ A multi-agent research system takes a different path on every run, so how should it be evaluated?
Design lessons and limitations ★★¶
The quality of the task brief decides success or failure. A sub-agent can't see the lead agent's context, so its entire understanding of the task comes from the brief. A good brief includes the objective, the output format, which tools and sources to use, and the boundaries of the task (what to leave alone, to avoid duplicating other sub-agents). When briefs are vague, the usual result is that several sub-agents duplicate work while some aspects are covered by no one.
Start wide, then narrow. Sub-agents tend to open with long, very specific queries that return nothing. A better strategy is to do what human researchers do: start with short, broad queries to get the lay of the land, then gradually focus.
Reduce "telephone game" losses. Sub-agents can write their full findings directly to files or shared storage and return only lightweight references and summaries to the lead agent. This avoids distortion when the lead agent relays the information, and it saves the lead agent's context.
The bottleneck of synchronous execution. If the lead agent waits for all sub-agents to finish before continuing, the slowest sub-agent holds up the whole system, and the lead agent can't redirect sub-agents while it waits. Asynchronous execution is more efficient but brings new problems in coordinating results, keeping state consistent and containing error propagation.
Limitations. First, cost: as noted, token usage is very high. Second, sub-agents usually don't talk to each other, so they may search the same things twice and can't promptly share a finding that should change direction. Third, the lead agent easily accepts sub-agents' conclusions without checking, so one sub-agent's error goes straight into the final report; verification and citation checks are needed. Fourth, such systems are long-running and stateful, so after a failure midway they need to resume from a checkpoint rather than start over; and since every run takes a different path, debugging is hard. Finally, the pattern only suits tasks that are truly parallelizable and read-heavy; for tightly coupled tasks, the problems discussed in 5.6 remain.
Interview questions
- ★ What should an orchestrator include in a sub-agent's task brief?
- ★ What should a sub-agent return to the lead agent, and why?
- ★ What are the main limitations of a multi-agent research system?