15 - Agent Patterns & Multi-Agent
How to compose model calls, tools and agents into systems: the workflow patterns most production systems are made of, the patterns that make a single agent safe and reliable, when multiple agents genuinely help (and the evidence on when they don't), and the engineering that makes multi-agent systems work. A lab puts the central claim - feedback must add information - to a measured test.
- Choose and combine workflow patterns (chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer) for a task, with cost and latency estimates
- Wrap a single agent in guardrails, gates, human handoffs, sub-agents and verification loops that use real feedback
- Decide, citing evidence, whether a task warrants multiple agents, and pick a topology
- Engineer multi-agent context, state, communication, budgets, tracing and evaluation
- Measure whether a pattern helps on your task rather than assuming it does
- Agent Foundations - the loop, tools, memory, planning
- MCP & A2A - for agents across boundaries
Where This Module Fits
flowchart LR
W["01 Workflow<br/>patterns"] --> S["02 Single-agent<br/>patterns"]
S --> M["03 Multi-agent<br/>architectures"]
M --> E["04 Multi-agent<br/>engineering"]
W -.-> LAB["🧪 Lab: patterns<br/>under measurement"]
S -.-> LAB
style W fill:#e8e2d9,stroke:#ccc4b8
style S fill:#d8dfe8,stroke:#b0bac8
style M fill:#e8e0d4,stroke:#c8b89a
style E fill:#ddd8e4,stroke:#b8b0c8
style LAB fill:#dde4dc,stroke:#b0c4b0
Frameworks that implement these patterns are compared in Agent Frameworks; running them in production is Production Agents.
Chapter Map
| # | Chapter | You will learn | Time |
|---|---|---|---|
| 1 | Workflow Patterns | Chaining, routing, parallelization, orchestrator-workers, evaluator-optimizer; combining; cost and latency | 50 min |
| 2 | Single-Agent Patterns | The single-agent default, guardrails, gates and HITL, sub-agents as tools, verification loops | 45 min |
| 3 | Multi-Agent Architectures | The evidence, topologies (orchestrator, hierarchical, handoffs, network, blackboard, debate), MAST failure modes | 55 min |
| 4 | Multi-Agent Engineering | Delegation and artifacts, communication, state and ledgers, budgets, tracing and evaluation | 55 min |
| 5 | Q&A Review Bank | 40 questions across the module | 45 min |
Code Lab
| Lab | What you build | Runs on |
|---|---|---|
| Patterns Under Measurement | Single attempt vs self-review vs test-feedback loop vs best-of-n on HumanEval problems, graded on hidden tests with confidence intervals | A local OpenAI-compatible model (laptop) or any hosted API; ~1 hour for the full run |
Mini-Project
Take a task from your work that someone proposed a multi-agent system for, and settle it with measurements:
- A test set of 30+ real inputs with an outcome check (state, tests, or a rubric validated against 20 human labels).
- A strong single-agent baseline (good tools, clear prompt, a verification loop with external feedback).
- The proposed multi-agent design, with precise delegation schemas, an artifact store and budgets.
- A comparison of quality with confidence intervals, tokens, cost and latency per input - including a single-agent variant given the same token budget.
- A one-page recommendation, citing your numbers and the evidence in this module.
Review
- Q&A Review Bank - consolidated questions for this module
- Module quiz - every Check Yourself question in this module, in course order
Previous: 14 - MCP & A2A · Next: 16 - Agent Frameworks
Section Appendix
Summary & Key Terms - a quick recap of this section and its essential vocabulary.