"One agent is capable. Several agents, each an expert, coordinating on a task — that's how you tackle problems too big for a single one."
Level: Beginner · Time: ~2 days · Prerequisites: Module 13
Learning Objectives
By the end of this module, you will be able to:
- Explain what a multi-agent system is
- Describe common coordination patterns
- Understand when multiple agents beat one
- Deploy a multi-agent app with azd
1. Why More Than One Agent?
Some tasks are too broad for a single agent to do well. Cram research, writing, and fact-checking into one prompt and the agent tends to do all three poorly — its instructions grow long, its attention splits, and its mistakes compound. A multi-agent system splits the work among several specialized agents — a researcher, a writer, a reviewer — that collaborate. Each has a short, sharp instruction set, stays focused and good at its one job, and together they handle complexity one agent would fumble.
Concept: Multiple agents are like a team of specialists versus one generalist. A cardiologist, a radiologist, and a surgeon coordinating beat a single doctor trying to do everything. Specialization plus coordination is the win.
2. Coordination Patterns
Agents can work together in a few well-known shapes:
| Pattern | How it works |
|---|---|
| Sequential | Agent A's output feeds Agent B, then C |
| Orchestrator–workers | A lead agent delegates subtasks to workers |
| Group chat | Agents discuss and build on each other |
| Handoff | One agent routes the task to the right specialist |
Explain like I'm new: These are just ways a team can organize — an assembly line (sequential), a manager with staff (orchestrator), a brainstorm (group chat), or a receptionist directing you to the right desk (handoff).
3. When to Use Multiple Agents
More agents means more capability but also more cost, latency, and complexity — every agent is another model call to pay for and another step to wait on. Reach for multi-agent only when a task genuinely has distinct sub-roles or needs multiple perspectives. For a single well-defined job, one agent is simpler, cheaper, and far easier to debug when something goes wrong.
Common mistake: Building an elaborate multi-agent system when one agent with a couple of tools would do. Start simple; add agents only when a real limitation — distinct expertise or parallel work — demands it.
4. Deploying with azd
A multi-agent app is still an app azd can deploy. The template provisions the models, the hosting, the shared data, and the identities — then azd up brings the whole system online. Because it's captured as code, a complex agent team deploys reliably every time. The same template that stands up three coordinating agents today can be handed to a teammate who runs one command and gets an identical system — no "it works on my machine," no undocumented setup steps lost in someone's memory.
Try this: Sketch a task you'd split among agents — say, "plan a trip": one agent finds flights, one finds hotels, one builds the itinerary. That decomposition is the design of a multi-agent system.
5. Coordination Is the Hard Part
The agents are only half the challenge; how they coordinate — who does what, in what order, sharing what state — is where multi-agent systems succeed or fail. Clear roles and a defined pattern (Section 2) keep them from talking over each other, duplicating work, or looping forever while the bill climbs. A good rule: design the conversation first — the hand-offs and the shared state — and treat the individual agents as the easy part you fill in afterward.
Real-world use case: A report-writing system uses an orchestrator agent that dispatches one worker per section, collects their drafts, and a reviewer agent polishes the whole thing — all provisioned and deployed to Azure by azd up.
✅ Checkpoint
- What is a multi-agent system?
- Name two coordination patterns.
- When should you not use multiple agents?
Answers: 1) Several specialized agents that collaborate on a task too broad for one. 2) Any two: sequential, orchestrator–workers, group chat, handoff. 3) When the task is a single well-defined job — one agent is simpler and cheaper.
Key Takeaway: A multi-agent system splits a big task among specialized agents that coordinate via patterns like sequential, orchestrator–workers, group chat, or handoff. Use it only when a task has distinct sub-roles — otherwise one agent is simpler. The agents are easy; the coordination is the hard part, and azd deploys the whole system from one template with azd up.
Further Learning
Part of "AZD for Beginners." Adapted from Microsoft's open AZD curriculum (MIT License).