Orchestration Overview¶
Chapter Slides
Chapter 3 โ Single Agent (PDF) ยท Chapter 4 โ Multi-Agent (PDF) ยท Chapter 5 โ Advanced Patterns (PDF)
When a single agent isn't enough, you need orchestration โ coordinating multiple agents to solve complex problems. This page introduces the complexity spectrum and the five patterns you'll learn.
The Complexity Spectrum¶
Not every problem needs multiple agents. Start simple and add complexity only when needed:
graph LR
A[Direct LLM Call] --> B[Single Agent]
B --> C[Multi-Agent Orchestration]
style A fill:#4CAF50,color:white
style B fill:#FF9800,color:white
style C fill:#F44336,color:white
| Level | When to Use | Example |
|---|---|---|
| Direct LLM Call | Simple generation, classification, extraction | Summarize an email |
| Single Agent | Task requires tools and reasoning loops | Customer support with order lookup |
| Multi-Agent | Task requires specialized roles, parallel work, or dynamic routing | Incident response with diagnostics + infrastructure + communication |
Start simple
The biggest mistake is jumping to multi-agent orchestration when a single agent would suffice. A single agent with good tools and a well-crafted system prompt handles most tasks. Add agents only when you need specialization, parallelism, or dynamic routing.
The Five Orchestration Patterns¶
graph TD
O[Orchestration Patterns] --> S[Sequential]
O --> C[Concurrent]
O --> G[Group Chat]
O --> H[Handoff]
O --> M[Magentic]
S --> S1[Agent A โ Agent B โ Agent C]
C --> C1[Agents A,B,C in parallel โ Aggregator]
G --> G1[Agents debate in shared thread]
H --> H1[Triage โ Dynamic routing to specialist]
M --> M1[Manager + Task Ledger + Workers]
1. Sequential (Pipeline)¶
Agents work in a chain โ each agent's output becomes the next agent's input.
Use when: Tasks have clear, ordered stages (research โ draft โ edit).
โ Learn more
2. Concurrent (Fan-out / Fan-in)¶
Multiple agents work on the same input simultaneously, and an aggregator combines their results.
Use when: Independent analyses can run in parallel (fundamental + technical + sentiment analysis).
โ Learn more
3. Group Chat¶
Agents share a conversation thread and take turns contributing, building on each other's messages.
Use when: Collaborative problem-solving, brainstorming, iterative refinement (maker-checker).
โ Learn more: Brainstorm ยท Maker-Checker
4. Handoff¶
A triage agent classifies incoming requests and routes them to specialist agents.
Use when: Different request types need different expertise (billing vs. technical vs. account support).
โ Learn more
5. Magentic (Adaptive Planning)¶
A manager agent maintains a task ledger and dynamically delegates work to specialist workers, adapting the plan based on findings.
Use when: Complex, multi-step tasks where the plan may change based on intermediate results (incident response).
โ Learn more
Pattern Comparison¶
| Pattern | Agents | Communication | State | Adaptability |
|---|---|---|---|---|
| Sequential | 2-5 in chain | One-way (output โ input) | Fresh per stage | Low โ fixed pipeline |
| Concurrent | 2-5 + aggregator | Independent + merge | Independent per agent | Low โ fixed fan-out |
| Group Chat | 2-5 + manager | Shared conversation | Shared message thread | Medium โ turn-taking |
| Handoff | 1 triage + N specialists | Structured handoff | Handoff context object | Medium โ dynamic routing |
| Magentic | 1 manager + N workers | Task delegation | Task ledger (mutable) | High โ adaptive planning |
For a deeper comparison and decision framework, see Choosing a Pattern.
Context Passing: The Hidden Challenge¶
The biggest practical challenge in multi-agent systems is how conversation context flows between agents. Each pattern handles this differently:
| Pattern | What Gets Passed | Strategy |
|---|---|---|
| Sequential | Previous agent's output only | Fresh context per stage |
| Concurrent | Same initial input to all | Independent (no sharing) |
| Group Chat | Full shared conversation | Accumulating shared memory |
| Handoff | Structured handoff object | Selective, structured |
| Magentic | Task-specific context only | Manager controls what workers see |
This is covered in detail for each pattern and comprehensively in Context Management.
Key Takeaways¶
- Start with the simplest approach โ don't orchestrate when a single agent suffices
- Five patterns cover the vast majority of multi-agent use cases
- Each pattern has different trade-offs for communication, state, and adaptability
- Context passing strategy is as important as choosing the right pattern
- Patterns can be combined (e.g., sequential pipeline where one stage uses concurrent agents)