Multi-Agent Systems
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."
| Role | Description |
|---|---|
| Lead agent | It is used to plan the work, assign parts, and combine and check the results |
| Helper agents | It is used to do one part each, with focused instructions, tools and context |
| Shared result | The lead's combined answer, checked before it reaches the person |
When It Helps, and What It Costs
| Benefit | Cost |
|---|---|
| Parallel work: independent parts finish sooner | More tokens: every agent has its own context, often several times the cost of one agent |
| Focused context: each helper reads only its part | Coordination errors: helpers may duplicate work or miss a part |
| Separate tools and permissions per helper | Harder debugging: more steps and logs to follow |
Common Patterns
| Pattern | Description |
|---|---|
| Lead and helpers | It is used for research and comparison tasks with independent parts |
| Pipeline | It is used when each agent's output feeds the next, such as draft, then review |
| Writer and reviewer | It 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:
- What does the lead agent do?
- Why do multi-agent systems cost more?
- When should a task stay with one agent?
Key Takeaways
Quick reference
| Situation | Choose |
|---|---|
| Steps depend on each other | One agent |
| Independent research parts | Lead and helpers |
| Output must be checked | Writer and reviewer |
Was this tutorial helpful?