<aside>
</aside>
<aside>
Six core patterns. When to use each, how they work, and the trade-offs that matter.
Built from designing and shipping agentic workflows in SaaS - the patterns I reach for, the trade-offs that decide between them, and the failure modes worth avoiding.
<aside> <img src="/icons/bullseye_orange.svg" alt="/icons/bullseye_orange.svg" width="40px" />
TL;DR
<aside> <img src="/icons/light-bulb_orange.svg" alt="/icons/light-bulb_orange.svg" width="40px" />
Key Principle
The right pattern is the simplest one that still meets the quality bar. Most production agent systems are single agents or sequential chains, not multi-agent systems.
</aside>
</aside>
<aside>
Goal: Pick the right pattern in under a minute by answering four questions in order.
<aside> <img src="/icons/light-bulb_orange.svg" alt="/icons/light-bulb_orange.svg" width="40px" />
Pro Tip!
If you can't answer Q1 cleanly, you don't have a flow yet, you have a prompt. Stay with a single agent until the path forks for a real reason.
</aside>
| If you need… | Use this pattern | Why |
|---|---|---|
| A quick prototype or single-turn task | Single agent | Lowest setup cost, maximum flexibility |
| A repeatable pipeline with fixed steps | Sequential | Predictable, easy to debug step by step |
| Independent sub-tasks, latency matters | Parallel | Concurrent execution cuts wall-clock time |
| Output must meet a non-negotiable criterion | Loop (review & critique) | Iterative refinement until pass or max-iter |
| Dynamic routing across specialists | Coordinator | LLM picks the right sub-agent at runtime |
| Primary agent stays in control, calls helpers | Agent as tool | Stateless calls, central state ownership |
| </aside> |
<aside>
Goal: Handle the entire task with one LLM, one system prompt, and an optional tool list.
A trip-planning assistant that takes a destination and returns a draft itinerary in one shot.
<aside> <img src="/icons/light-bulb_orange.svg" alt="/icons/light-bulb_orange.svg" width="40px" />
Pro Tip!
If your prompt grows past one screen, the task is asking for decomposition. Move to sequential or coordinator before patching the prompt again.
</aside>
---
config:
layout: elk
elk:
nodePlacementStrategy: NETWORK_SIMPLEX
---
flowchart TD
U["User Request"] e1@==> A["LLM Agent<br><i>system prompt + tools</i>"]
A [email protected]>|"optional call"| T1["Tool A"]
A [email protected]>|"optional call"| T2["Tool B"]
T1 [email protected]>|"result"| A
T2 [email protected]>|"result"| A
A e6@==> R["Response"]
e1@{ animation: slow }
e2@{ animation: slow }
e3@{ animation: slow }
e4@{ animation: slow }
e5@{ animation: slow }
e6@{ animation: slow }
style U fill:#F0F4F8,stroke:#37474F,stroke-width:2px,color:#333
style A fill:#E8DFF5,stroke:#5E35B1,stroke-width:2px,color:#333
style T1 fill:#FFF8E1,stroke:#F57F17,stroke-width:2px,color:#333
style T2 fill:#FFF8E1,stroke:#F57F17,stroke-width:2px,color:#333
style R fill:#E8F5E9,stroke:#2E7D32,stroke-width:2px,color:#333
</aside>
<aside>
Goal: Run a fixed pipeline of sub-agents where the output of step N becomes the input to step N+1.
Trip planner:
food_finderruns first, thentransportation_agentreads the food output from session state and plans transit around it.
</aside>
<aside>
</aside>
<aside>
</aside>
<aside>
</aside>
<aside>
</aside>
<aside>
</aside>