Lesson 6 / 12 · 11 min
Agent design patterns: beyond a single loop
Plan-and-execute, reflection, routing, and multi-agent supervisor-worker. When to reach for each, and when one loop is enough.
A single ReAct loop handles more than people expect. But as tasks get bigger, a few patterns help you organize the reasoning and keep each part reliable. Patterns are just proven ways to arrange the work, you do not need all of them, you need to recognize which one a problem is asking for.
Plan-and-execute
Instead of deciding the next move turn by turn, the agent writes a full plan first, then executes each step. This helps on multi-step tasks where a wrong early choice is costly, and it gives you a plan you can inspect or approve before anything runs.
Reflection
The agent (or a second pass) reviews its own draft against the requirements and revises before returning it. It is a cheap quality boost for writing, code, and extraction: the model is often better at spotting a flaw than at avoiding it the first time.
Routing
A small classifier looks at the incoming request and decides what kind it is, then sends it down the right path: a price question to the catalog flow, a complaint to the human queue, a booking to the calendar agent. Routing keeps each path simple and well-tested instead of one giant agent trying to do everything.
Multi-agent: supervisor and workers
A supervisor breaks a goal into sub-tasks and delegates each to a specialized worker agent, each with its own prompt and its own tools, then combines the results. This is powerful for genuinely complex jobs, but every extra agent adds latency, cost, and another thing that can fail.
When not to
Every added agent is more to build, pay for, and debug. Start with one well-scoped agent and a clear loop. Reach for plan-and-execute, reflection, routing, or multiple agents only when a real limitation forces it, not because the architecture diagram looks impressive.
What you take away
- Plan-and-execute: plan first, then run, so early mistakes are cheaper and inspectable
- Reflection: let the agent critique and revise its own draft for a cheap quality gain
- Routing: classify first, then send each request down a simple, well-tested path
- Multi-agent supervisor-worker is powerful but costly; add patterns only when forced
Curated sources
Hand-picked references for going deeper, reviewed by our team.