Patterns

Choose a pattern for the production constraint in front of you.

Start With What You Need

If You Need ToStart Here
Put behavior behind a boundaryStart with Agentic Contract and Supervisor Pattern.
Make execution inspectableRead State Machine Pattern and Durable Execution.
Catch failure earlierRead Validator Asymmetry, Golden Dataset, and Seam Ownership.
Route work by cost and riskRead Intelligence Routing and Iron Triangle.
Design agent-facing interfacesRead 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.
  • Catching Feature - bound work with an observable divergence signal and a safe exit; independent checkpoints add observation work but expose drift that local reasoning has missed.

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 SeeStart WithAdd When
Plausible wrong answersValidator AsymmetryExamples accumulate and need eval loops
Untrusted context or toolsCognitive FirewallPrivileged lanes need logs and escalation
Long tasks fail or repeatDurable ExecutionRetries need recovery and dead-letter paths
Smart behavior in the coreDumb Core, Smart EdgeAutonomy is earned at bounded edges
Coherent work diverges from external evidenceCatching FeatureFeedback is delayed and work has a safe stopping point
Handoffs lose ownershipSeam OwnershipThe failure recurs across teams or agents

Do not add every structure 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.

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.