Patterns
Choose a pattern for the production constraint in front of you.
Start With What You Need
| If You Need To | Start Here |
|---|---|
| Put behavior behind a boundary | Start with Agentic Contract and Supervisor Pattern. |
| Make execution inspectable | Read State Machine Pattern and Durable Execution. |
| Catch failure earlier | Read Validator Asymmetry, Golden Dataset, and Seam Ownership. |
| Route work by cost and risk | Read Intelligence Routing and Iron Triangle. |
| Design agent-facing interfaces | Read Agent-Friendly API Surface and Vision-First Pipeline. |
Pattern Entry Points
- Supervisor Pattern - delegate cheap-model work through explicit contracts, review, and escalation.
- State Machine Pattern - make agent execution legible by routing stochastic behavior through typed states.
- Agentic Contract - turn a prompt-shaped capability into a bounded interface with failure modes.
- Cognitive Firewall - wrap model reasoning with pre-prompt sanitization, scoped tools, schema checks, and escalation.
- Seam Ownership - assign failure ownership at handoffs where each component can claim success.
- Durable Execution - make long-running agent work resumable instead of fragile.
- Event-Driven Operator - wake agent work from meaningful events instead of manual pulls or blind cron.
- Validator Asymmetry - put engineering effort where validation changes reliability fastest.
- Dumb Core, Smart Edge - keep the critical path deterministic and put intelligence at bounded edges.
- Vision-First Pipeline - use layout and visual structure as evidence before reducing documents to text.
- Prompt Optimization Loop - tune prompts against evaluation feedback instead of freezing them as prose.
- Golden Dataset - make evaluation data the asset that survives model and prompt changes.
- Intelligence Routing - route tasks by sufficiency, cost, latency, and review burden.
- Agent-Friendly API Surface - design interfaces so agents can inspect, compose, and fail safely.
Reliability Decision Guide
When an agent system starts failing in production, add the smallest structure that contains the failure mode in front of you.
| If You See | Start With | Add When |
|---|---|---|
| Plausible wrong answers | Validator Asymmetry | Examples accumulate and need eval loops |
| Untrusted context or tools | Cognitive Firewall | Privileged lanes need logs and escalation |
| Long tasks fail or repeat | Durable Execution | Retries need recovery and dead-letter paths |
| Smart behavior in the core | Dumb Core, Smart Edge | Autonomy is earned at bounded edges |
| Handoffs lose ownership | Seam Ownership | The failure recurs across teams or agents |
Do not add all five at once. Reliability work should follow the failure path, not the taxonomy.
Pattern Families
Use these groups when you know the kind of constraint you are facing, then follow the closest live entry.
- Orchestration - supervisors, routers, state machines, queues, and handoff boundaries. Start with Supervisor Pattern, State Machine Pattern, Event-Driven Operator, or Intelligence Routing.
- Reliability - validators, fallbacks, circuit breakers, retry policy, and incident paths. Start with Validator Asymmetry, Cognitive Firewall, Durable Execution, Dumb Core, Smart Edge, or Seam Ownership.
- Memory And State - externalized state, checkpoints, context compression, and trace survival. Start with Durable Execution, or State Machine Pattern.
- Evaluation And Observability - golden datasets, behavioral fingerprints, model judges, and live monitoring. Start with Golden Dataset, Prompt Optimization Loop, Validator Asymmetry, or Seam Ownership.
- Human-Agent Interface - approval gates, refusal paths, autonomy boundaries, and override protocols. Start with Agentic Contract, Cognitive Firewall, Agent-Friendly API Surface, Supervisor Pattern, or Dumb Core, Smart Edge.
- Organizational - ownership models, capability registries, cost attribution, and coordination debt. Start with Event-Driven Operator, Agentic Contract, Seam Ownership, or Coordination Debt.
What To Look For
Read each pattern for four things: the production constraint, the structure that contains it, the cost of adding that structure, and the point where a simpler design is better.
For the underlying ideas, see Concepts. For the book-length version, see Production-Ready AI Agents.