Skip to content
AI Engineer Guide.

concept · concepts · intermediate · concept 25 of 37

Multi-agent

0 of 37 complete

Why it matters

A single agent carrying every tool, document and instruction ends up with a prompt that is large, contradictory and slow. Splitting lets each part have a focused prompt and a narrow toolset, which often improves reliability. But the split creates a distributed system whose parts are unreliable and whose shared state must be reconstructed, so the design question is whether specialisation is worth the coordination.

Mental model

Multi-agent is a team with handoffs, not a bigger brain. The metaphor breaks because a team shares an office and overhears context, while agents share only what is explicitly passed, so informal awareness must be engineered or lost.

How it works

A star with one owner and three specialistsInteractive

A star with one owner of the final state; every extra worker is another boundary that must earn its cost.

Step 1/6 · Read the shape

Step 1 of 6

Read the shape

A star with one owner, three specialists, one tool and one task store. The peer edge and the conflict edge are the costs of the split: a bypass around the supervisor and a duplicated subtask.

Narrow layout: nodes in reading order, each followed by its outgoing edges. The wide drawing shows the same graph as geometry.

    agent

    8 connections

    Supervisor

    owns the final state

    The one owner. Workers get narrow contexts and return boundary artifacts; the supervisor assembles the final state. If it also delegates ownership, no component can say which result is authoritative.

  1. No outgoing edge.

callasyncreturnconflictwider stroke + "this step" = current path

user · agent · tool · store · 7 nodes · 12 edges · fixed authored layout, no simulation · list

Figure. A multi-agent split buys context isolation, not intelligence. The supervisor fans out to a researcher, a coder and a reviewer, each with its own tools and context, and collects a boundary artifact from each; the task state records the owner, the artifact references and the budget. The conflict edge is duplicated work, and the peer edge is a bypass around the one owner of the final state.

What to notice. The star keeps one owner of the final state; the peer edge and the duplicated subtask are the costs the split adds. Only the coder's test runner is drawn; the researcher's search tool and the reviewer's criteria are omitted. The figure omits the model behind each agent, the prompts, and the actual token and latency counts. The call budget, agent names and artifact contents are illustrative; the topology, not the numbers, is the claim.

Text version

Seven nodes. The requester connects to a supervisor, which delegates to a researcher, a coder and a reviewer and receives a return artifact from each. The coder runs a test runner, which returns pass, fail and a log; the reviewer has a peer edge of comments to the coder. The supervisor writes owner, artifacts and budget to a task state store. A conflict edge runs from the researcher to the coder, labelled same subtask. Steps light the whole graph, the reason for splitting, the star fan-out, boundary artifacts, duplicated work and the cost cap.

  1. Justify the split with a concrete difference: tools, data access, permissions, or a context that does not fit.
  2. Give each agent one job, one prompt and the smallest toolset that job needs.
  3. Define the boundary artifact, whether a report, a patch or a decision record, and validate it on receipt.
  4. Keep one owner of the task and one place where the final state is assembled.
  5. Cap total agents, delegation depth and messages per task.
  6. Compare against a single-agent baseline on the same tasks before keeping the split.

Trade-offs

ChoiceGood forCostFails when
Single agent, many toolsOne context, no boundary lossPrompt bloat and tool confusionTools number in the dozens or permissions differ
Supervisor and workersFocused workers, central controlSupervisor context becomes the bottleneckSubtasks need deep interaction
Peer collaborationFlexible, handles emergent subtasksLoops and duplicated effortCost and latency must be bounded
Static pipelinePredictable and cheap to traceCannot adapt to unexpected workThe task is exploratory
Trade-off mapInteractive

Good for

One context, no boundary loss

Cost

Prompt bloat and tool confusion

Fails when

Tools number in the dozens or permissions differ

  1. Tools number in the dozens or permissions differ
  2. Subtasks need deep interaction
  3. Cost and latency must be bounded
  4. The task is exploratory

Figure. Each choice with what it buys, what it costs, and the case where it loses.

What to notice. The fourth column is the decision: if the losing case describes your situation, the choice is wrong.

Text version

Four trade-offs: Single agent, many tools is good for One context, no boundary loss, costs Prompt bloat and tool confusion, and fails when Tools number in the dozens or permissions differ. Supervisor and workers is good for Focused workers, central control, costs Supervisor context becomes the bottleneck, and fails when Subtasks need deep interaction. Peer collaboration is good for Flexible, handles emergent subtasks, costs Loops and duplicated effort, and fails when Cost and latency must be bounded. Static pipeline is good for Predictable and cheap to trace, costs Cannot adapt to unexpected work, and fails when The task is exploratory

Failure modes

  • Duplicated work. Two agents solve the same subtask and their outputs conflict. Debug: compare subtask ids across agents in the trace and look for overlap.
  • Context starvation. A worker lacks a constraint known elsewhere and violates it. Debug: assert the boundary artifact contains every mandatory constraint field.
  • Cost blowout. Agent count multiplies token spend without improving success. Debug: measure cost per successful task against the single-agent baseline.

In production

Monitor cost and latency per successful task, message volume and the failure rate at each boundary. Keep the single-agent baseline runnable so the split can be re-justified after each change.

Common misconceptions

People think: More agents produce better reasoning.

Actually: Splitting changes context and coordination, not the underlying capability; gains come from focus, not headcount.

People think: Multi-agent systems are more robust.

Actually: They add failure domains; robustness requires supervision, limits and a single owner of state.

Interview angle

Strong answers justify the split with a constraint a single agent cannot meet, define the boundary artefact and the owner of final state, and compare against a single-agent baseline. Weak answers assume specialisation is free and never mention coordination cost.

Sources