Multi-agent systems: when to use them and what they cost

  • Advanced
  • 20 min
  • Lesson 2 of 3 in Context, memory and multi-agent systems
  • Last verified

Open slides(17 slides)

Before you start

You will be able to

  • Choose between a workflow, a single agent and a multi-agent design for a task, justifying the choice with its cost, latency and error trade-offs.
  • Estimate the end-to-end success of an n-step chain from its per-step success rate, and name the design changes that raise it.

A customer’s refund is stuck. Vihaan retries the payment and writes DONE in his log.

Ten minutes later a second agent, working from its own list, retries it as well, then reverses a payment that was fine. It writes DONE too. Neither log mentions the other.

The refund goes through. Who was supposed to be doing that job?

Concept

  • Workflow: the model and tools are orchestrated through predefined code paths. Predictable and cheap.
  • Agent: the model directs its own process and tool use. Flexible and less predictable.
  • Multi-agentMulti-agent systemSeveral coordinating agents. Justified for broad, parallel work or separate permissions; otherwise it adds tokens, latency and failure modes.Open the glossary entry: several agents, each with its own prompt, tools and context, coordinate on one task.

These are Anthropic’s workflow and agent definitions (Building effective agents, 2024-12-19). “Multi-agent” is a common extension of them. The guiding principle is to find the simplest solution that meets the quality bar and add complexity only when it demonstrably improves outcomes.

Diagram: The options form a ladder of increasing flexibility, cost and risk: a single call, a workflow with fixed steps, an agent that chooses its...

Single call
plus retrieval

Workflow
fixed steps

Agent
model chooses steps

Multi-agent
several agents coordinate

Diagram summary: The options form a ladder of increasing flexibility, cost and risk: a single call, a workflow with fixed steps, an agent that chooses its own steps, and a multi-agent system. Start at the left and move right only when a measured limit forces it.

This lesson is about choosing the structure and what it costs. The next lesson, Agent evaluation, is about measuring whether the structure you chose works.

Why It Matters

“Design an agent” questions test judgment about when not to build a multi-agent system, and how you would bound the one you build. Every extra agent adds tokens, hand-offs and ways to fail, so you need a reason for each one.

Mental Model

A workflow is an assembly line: every station and its order are fixed. A single agent is one capable generalist who decides what to do next. A multi-agent system is a small team with a manager. The team can work on several things at once, but it spends time on meetings, and a misunderstanding between two members can ruin the result.

Technical Deep Dive

Choosing the structure

Start with a single model call plus retrieval and examples. Move to a workflow when the steps are known. Move to an agent when the number of steps cannot be predicted. Move to several agents only when one agent’s limits (context, tools, parallelism) are the real bottleneck.

Diagram: Ask three questions in order.

yes

no

yes

no

no

yes

Can one call plus
retrieval meet the bar?

Stop: single call

Are the steps known
in advance?

Workflow

Is one agent's context, tools
or parallelism the bottleneck?

Single agent

Multi-agent, with budgets

Diagram summary: Ask three questions in order. If one call with retrieval is enough, stop. If the steps are known, build a workflow. If not, use one agent, and only add more agents when a single agent’s context, tools or parallelism is the measured bottleneck.

The patterns

Anthropic’s guidance names five workflow patterns:

  • Prompt chaining: a fixed sequence of calls, with optional checks between steps.
  • Routing: classify the input, then send it to a specialised handler.
  • Parallelization: run independent subtasks at the same time (sectioning), or run the same task several times and combine the answers (voting).
  • Orchestrator-workers: a lead model decomposes the task at run time, delegates to workers and combines their results.
  • Evaluator-optimizer: one call generates, another critiques, and the loop repeats until the criteria are met.
Diagram: Three patterns with a fixed shape.

Parallelization

Task

Subtask 1

Subtask 2

Combine

Routing

Classify

Handler A

Handler B

Prompt chaining

Call 1

Check

Call 2

Diagram summary: Three patterns with a fixed shape. Chaining runs steps in sequence with checks between them, routing classifies the input and sends it to a specialised handler, and parallelization runs independent subtasks at once and combines the results.
Diagram: Two patterns where the path depends on results.

Evaluator-optimizer

not good enough

Generate

Critique

Orchestrator-workers

Lead decomposes

Worker

Worker

Lead combines

Diagram summary: Two patterns where the path depends on results. In orchestrator-workers a lead decides the subtasks at run time, delegates them and combines the answers. In evaluator-optimizer one call generates and another critiques, looping until the criteria are met.

A supervisor with hand-offs (one agent assigns work, or passes control to another) is a common variation of orchestrator-workers. Names differ between frameworks, so describe the shape instead of relying on a label.

When multi-agent helps, and what it costs

It helps when the work is broad and parallel (researching many sources), when separate windows keep each worker’s context clean, or when different parts need different tools and permissions. Anthropic’s research-system write-up describes subagents that work in parallel with their own context windows and pass condensed findings to a lead agent (Anthropic, 2025-06-13).

It costs a lot. The same write-up reports that agents typically use about four times the tokens of a chat interaction and multi-agent systems about fifteen times, so the task has to be valuable enough to pay for it. It also says domains where all agents must share one context, or whose steps depend closely on each other, are a poor fit today, and that most coding tasks have fewer parallelisable parts than research. Those are one team’s observations from 2025, not laws.

Diagram: A lead agent splits the task across three workers that each have their own context and tools, then combines their results.

No

Yes

Task

Lead agent
plan + decompose

Worker A
own context + tools

Worker B
own context + tools

Worker C
own context + tools

Lead synthesizes

Verifier / critic
passes?

Result + trace

Budgets: steps, tokens, time

Diagram summary: A lead agent splits the task across three workers that each have their own context and tools, then combines their results. A verifier checks the combined result and either sends the work back to the lead or releases the result with a trace, while budgets limit the lead.

Other costs: added latency from coordination, duplicated work, harder debugging, errors that compound, and a larger security surface. A multi-agent design needs a shared-state plan, clear task contracts between agents, termination rules and a budget.

Reliability math: errors compound

If each step succeeds with probability pp and steps are independent, an nn-step chain succeeds with probability pp to the power nnError compoundingIf each step succeeds with probability p, independently, n steps all succeed with probability p to the power n, so long chains fail more than single steps suggest.Open the glossary entry. Illustrative numbers: 0.95 per step over 10 steps gives 0.9510≈0.600.95^{10} \approx 0.60. Real steps are not fully independent, so treat this as a warning about the direction, not a forecast. It is why shorter chains, verification steps, checkpoints, retries and replacing free-form steps with a fixed workflow matter, and why adding agents (more steps and hand-offs) can lower reliability.

Chain success probability, pnp^n, for two illustrative per-step reliabilities:

Steps (nn)p=0.95p = 0.95p=0.99p = 0.99
10.9500.990
50.7740.951
100.5990.904
200.3580.818

Real-World Application

A deep-research feature: an orchestrator starts parallel searchers, each returns a short sourced brief, a citation checker validates the claims, and per-run token budgets cap the cost.

Interview Perspective

Expect “single versus multi-agent” and “the agent loops and the bill explodes”. A strong answer starts with the simplest design and justifies any extra agent by parallelism, context isolation or tool separation. It names the cost, uses the pnp^n argument for long chains, and mentions budgets and termination rules. Common mistakes: choosing multi-agent by default and ignoring cost.

Practice Questions

These are generated practice questions, not reported from any company.

  • Basic: What is the difference between a workflow and an agent?
  • Intermediate: When does orchestrator-workers beat a single agent, and what does it cost?
  • Advanced: Why can adding agents lower the end-to-end success rate of a task?
  • Product-Company: Design a deep-research feature. Would you use one agent or several, and what would you cap?

Activity

For a customer-refund use case, sketch it three ways: (a) a workflow, (b) a single agent, (c) a multi-agent design. For each, list the likely steps, the main failure mode, and the rough relative cost. Pick one and defend it in three sentences. If you picked (c), name the exact reason a single agent was not enough.

Quick Revision

  • Simplest structure that meets the bar. Patterns: chain, route, parallelise, orchestrator-workers, evaluator-optimizer.
  • Multi-agent buys parallelism and isolation at a large token and coordination cost.
  • Errors compound: pnp^n over nn steps.
  • Shared state and clear task contracts help prevent agents from redoing each other’s work.

Check yourself

  • Checkpoint question: A 6-step chain has 0.9 success per step. What is the end-to-end rate (about 0.53), and what would you change?
  • Independent re-test: Convince me a multi-agent design is worth it for one specific task, and say what it will cost.
  • Common misconception to avoid: “More agents means a smarter system.”

Resources & Further Reading

Checked sources to go deeper. The essential ones come first in each group.

Further reading

  • Effective context engineering for AI agents (opens in a new tab)Essential

    Prithvi Rajasekaran, Ethan Dixon, Carly Ryan, Jeremy Hadfield2025Article

    Shows how sub-agents keep a lead agent's context clean by returning condensed summaries. It connects this lesson's isolation argument to the context-engineering lesson before it.

  • Context Engineering (opens in a new tab)

    LangChain2025Article

    Describes isolation across agents, sandboxes and state, and repeats the reported token cost of multi-agent systems. Useful for seeing the same trade-off from a framework author's side.

  • Demystifying evals for AI agents (opens in a new tab)

    Mikaela Grace, Jeremy Hadfield, Rodrigo Olivares, Jiri De Jonghe2026Article

    The next step after choosing a structure: how to grade it. It previews the evaluation lesson that follows this one.

More for this module: Context, memory and multi-agent systems resources

Practice

Test what you just read. Quizzes and cards are grouped by module: Context, memory and multi-agent systems.

Check yourself5 questions on what this lesson set out to teach

Checking answers needs JavaScript. You can still read every question and option below.

0 of 5 answered

Keyboard: arrow keys move between options. Space or Enter selects the focused option.

ObjectiveChoose between a workflow, a single agent and a multi-agent design for a task, justifying the choice with its cost, latency and error trade-offs.

  1. Question 1 of 5A system reads one customer email, extracts fields into a fixed JSON ticket, and sends it to one of five known queues. Which structure fits best?

    Choose one answer.

  2. Question 2 of 5Which task is the strongest case for a multi-agent design, given its higher token cost?

    Choose one answer.

  3. Question 4 of 5In a support system, a billing agent and an account agent each notice the same failed payment, and each issues a refund. Which change to the multi-agent design addresses the cause?

    Choose one answer.

ObjectiveEstimate the end-to-end success of an n-step chain from its per-step success rate, and name the design changes that raise it.

  1. Question 3 of 5A team plans an 8-step autonomous chain where each step succeeds with probability 0.9, independently. The product needs 80% end-to-end success. What should they conclude?

    Choose one answer.

  2. Question 5 of 5Design X runs 20 autonomous steps, each succeeding with probability 0.98 independently. Design Y runs 5 steps, each succeeding with probability 0.95. Which has the higher end-to-end success?

    Choose one answer.

Build with this