Key Concepts
- 1A single agent trying to do everything (product discovery, Q&A, checkout support, fraud detection) is overloaded. Specialized multi-agent systems perform better.
- 2**Agent specialization**: One agent for discovery ('Find products'), one for Q&A ('Answer questions about products'), one for checkout ('Process the purchase'), one for support ('Handle returns').
- 3**Coordination via shared state**: Agents don't directly talk; they read/write a shared context. Example: Discovery agent finds 3 products → writes them to shared state → Q&A agent reads state and answers questions about those 3 → Checkout agent reads state and processes purchase.
- 4**Handoff patterns**: When does agent A hand off to agent B? Example: Discovery agent says 'User has 2 options, both good. Which would you like to buy?' User picks one → Checkout agent takes over.
- 5**Error isolation**: If one agent fails, others keep working. Example: Q&A agent times out → skip it, go straight to checkout. This is more robust than a monolithic agent.
- 6**Monitoring complexity**: With N agents, you need to monitor N loggers, N metrics, N error paths. Operational overhead increases. Start with 1-2 agents, scale to 3-4 only when justified.
- 7**Common multi-agent pattern for commerce**: (1) Discovery agent (search + filter), (2) Reasoning agent (explain fit to user constraints), (3) Checkout agent (process purchase), (4) Support agent (handle issues post-purchase).
Why It Matters for PMs
Reliability: Specialized agents are more reliable because they do one thing well. A discovery agent that *only* searches can be optimized for search speed. A reasoning agent that *only* explains can be optimized for clarity.
Cost efficiency: A discovery agent uses small, fast LLM calls (search query → results). A reasoning agent uses smarter, slower LLM calls (reason about fit). You can use different models for each (cheap for discovery, expensive for reasoning).
Maintainability: Monolithic agents become unwieldy (1000-line prompts). Multi-agent systems are modular. You can update the discovery agent without affecting reasoning.
Test Your Understanding
Question 1 (Multiple Choice)
Why would you use multiple specialized agents instead of one big agent?
Question 2 (Multiple Choice)
How do specialized agents communicate in a multi-agent system?
Question 3 (Multiple Choice)
If a Discovery agent fails (times out), what should happen in a well-designed multi-agent system?
Question 4 (Short Answer)
Design a multi-agent system for a grocery delivery service. What agents would you have and what would each do?
Think about your answer before revealing the explanation.
Question 5 (Short Answer)
What are the costs of moving from 1 agent to 3 agents? (Hint: think about operations and debugging.)
Think about your answer before revealing the explanation.