Architecture Patterns for AI Agents: The 5 Shapes That Actually Ship
Everyone draws the same picture: input goes in, one LLM thinks, output comes out. That is not what a real system looks like. Inside a company like Airbnb you do not put the whole product behind one agent with one enormous prompt. You end up with a huge number of small, narrowly scoped LLM calls sitting inside the systems you already have, and that is exactly what makes them predictable enough to ship. This session walks the five architectures those small agents are built from: prompt chaining, routing, parallelization, orchestrator-workers, and evaluator-optimizer. Each one is drawn from scratch, with the validation steps where they actually belong. Then we put them back together, because a real production architecture is almost never one pattern, it is a combination.
In this episode
- Why one giant prompt for the whole product is the wrong mental model
- Replacing one endpoint at a time with a tiny agent, inside a system you already own
- Prompt chaining: one call per step, validated between the steps
- Routing: classify first, then send the request to the flow built for it
- Parallelization: fan out to research, browsing, and RAG at once, then merge
- Orchestrator-workers: let one LLM plan the workflow and call the workers, with real control over what it can reach
- Evaluator-optimizer: code-level validation plus an LLM guardrail, and when you need both
- Why you never trust an LLM without code-level validation: it will confidently tell you a lie
Transcript
CHAPTERS
0:00 Intro
0:24 The architecture everyone imagines
0:58 Reality: one company, a million tiny agents
3:09 The five architectures
4:12 Prompt chaining
5:32 Routing
6:57 Parallelization
8:16 Orchestrator-workers
10:40 Evaluator-optimizer and guardrails
11:46 Combining the patterns into a real architecture
12:44 Always validate in code
13:21 Where to go next
GO DEEPER
I run a hands-on Maven cohort, Production-Ready Systems with LLMs and Agents: An Intensive for Engineers. Build LLM and agent systems that survive real traffic, cost, and failure. Use code AGENTS300 for $300 off.
LINKS
Course and cohort: https://maven.com (search "Ehsan Gazar")
Site and writing: https://gazar.dev
Subscribe: @gazarbreakpoint