Multi-Agent Systems

Updated · 4 min read
hardPython 3.13aiagentsmulti-agentarchitectureorchestration

A multi-agent system is a design in which several agents work on one task, each with its own instructions, tools and context. The most common pattern has a lead agent (an orchestrator) that breaks the task into parts and hands each part to a helper agent, then combines their results. It is used when a task has independent parts that can run in parallel, or that need different tools or expertise.

Lead and Helpers

Srihitha asks Campus Helper's planning assistant: "Compare three after-school robotics programs near our San Francisco school: cost, schedule and reviews."

One lead plans; helpers work in parallel; the lead combines
RoleDescription
Lead agentIt is used to plan the work, assign parts, and combine and check the results
Helper agentsIt is used to do one part each, with focused instructions, tools and context
Shared resultThe lead's combined answer, checked before it reaches the person

When It Helps, and What It Costs

BenefitCost
Parallel work: independent parts finish soonerMore tokens: every agent has its own context, often several times the cost of one agent
Focused context: each helper reads only its partCoordination errors: helpers may duplicate work or miss a part
Separate tools and permissions per helperHarder debugging: more steps and logs to follow

Common Patterns

PatternDescription
Lead and helpersIt is used for research and comparison tasks with independent parts
PipelineIt is used when each agent's output feeds the next, such as draft, then review
Writer and reviewerIt is used to have one agent check another's work against rules

Common Mistakes

Splitting tasks that depend on each other. Helpers working in parallel can't use each other's results.

Vague briefs. Helpers fill gaps with guesses; spell out the task and the output format.

Skipping the final check. The lead should verify the combined answer, not just paste results together.

Interview Corner

What is a multi-agent system?

Several agents working on one task, usually a lead that plans and combines and helpers that each handle one part with their own context and tools.

What are the trade-offs of multi-agent systems?

They gain parallelism and focused context but cost more tokens, add coordination errors and are harder to debug. Use them only when the work splits cleanly.

Practice

Exercise: design a split. Campus Helper must prepare a summary of next year's fee changes from three documents: the fee policy, the board meeting minutes and the budget. Would you use one agent or a lead with helpers? Write the brief each helper would get, or explain why one agent is enough.

Check your understanding:

  1. What does the lead agent do?
  2. Why do multi-agent systems cost more?
  3. When should a task stay with one agent?

Quick check: multi-agent systems

4 questions
1What does the lead agent do?
2Why do multi-agent systems usually cost more?
3When does splitting work between agents help most?
4Why does each helper need a self-contained brief?

Key Takeaways

Quick reference

SituationChoose
Steps depend on each otherOne agent
Independent research partsLead and helpers
Output must be checkedWriter and reviewer

Was this tutorial helpful?

Lesson 106 of 186