AI Agents Patterns
AI agents patterns: named, reusable shapes for building AI agents that reason, use tools, coordinate, and stay safe — single-agent loops and multi-agent systems alike, each decomposed in the manner of Alexander (1977) and the Gang of Four (1994).
AI agents patterns are the named, reusable shapes that recur whenever software is built around AI agents — programs in which an LLM decides what to do next rather than following a fixed script. The plural matters: a single agent has its own internal patterns for how it reasons, calls tools, remembers, and critiques itself, and once there is more than one agent the patterns multiply again into how they coordinate, hand off, verify each other, and stay accountable. This catalog collects both.
Naming these patterns is what turns "AI agents" from a buzzword into something you can engineer. A named pattern can be compared against an alternative, composed with others, and refused on specific grounds — none of which is possible while the shape stays implicit. Every pattern here is decomposed in the manner of Christopher Alexander (1977) and the Gang of Four (1994): intent, context, problem, forces, therefore, solution, consequences (benefits + liabilities), constrains (the hard prohibition the agent must not violate), and related[] — typed edges to neighbouring patterns.
The selection below spans the whole arc: how an agent reasons (ReAct, plan-and-execute, reflection), how it acts on the world (tool use, augmented LLM, agentic RAG), how many agents coordinate (supervisor, orchestrator-workers, handoff, subagent isolation), how they trust each other (signed agent card), and how the system stays governable (step budget, decision log, kill switch). Open the related guides for narrower framings — the agent loop, multi-agent coordination, RAG, safety, and the full agentic pattern language.
Field-tested patterns to start with
- ReAct — Interleave a single thought, a single tool call, and a single observation per step so the agent reasons over fresh evidence.
- Plan-and-Execute — Plan all the steps once with a strong model, then execute each step with a cheaper model under the plan.
- Reflection — Have the model review its own output and produce a revised version in one or more passes.
- Tool Use — Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
- Augmented LLM — Build the foundational agent block as an LLM augmented with retrieval, tools, and memory that the model actively chooses to use, rather than a bare-model call.
- Agentic RAG — Replace static retrieve-then-generate with autonomous agents that plan, choose sources, retrieve iteratively, reflect, and re-query.
- Supervisor — Place a coordinating agent above a set of specialised agents and route work to them.
- Orchestrator-Workers — An orchestrator dynamically breaks a task into subtasks at runtime and delegates each to a worker LLM, then synthesises results.
- Handoff — Transfer the active conversation from one agent to another, carrying context across the switch.
- Subagent Isolation — Run subagents in isolated workspaces so their writes do not collide and parallelism is safe.
- Signed Agent Card — Cryptographically sign an agent's published capability card so a consuming agent can verify it was issued by the claimed domain before binding to or delegating to it, closing the spoofing gap in agen…
- Step Budget — Cap the number of tool calls or loop iterations the agent is allowed within a single request.
- Decision Log — Persist the agent's reasoning trace alongside its actions so post-hoc review can explain why.
- Kill Switch — Provide an out-of-band control plane to halt running agent instances without redeploy.
Recommended reading
- Reasoning — 19 patterns
- Planning & Control Flow — 45 patterns
- Tool Use & Environment — 46 patterns
- Retrieval & RAG — 23 patterns
- Multi-Agent — 46 patterns
- Verification & Reflection — 29 patterns
- Safety & Control — 66 patterns
- Governance & Observability — 38 patterns
Or open the full contents for all 527 patterns in 14 books.
Related guides
- AI Agents Patterns Catalog — The AI agents patterns catalog: a complete, GoF-formal pattern language for AI agents across reasoning, planning, tool use, retrieval, memo…
- LLM Agent Design Patterns — A GoF-formal catalog of LLM agent design patterns: ReAct, tool use, plan-and-execute, reflection, step budget, and more. Each pattern decom…
- Agentic Design Patterns — A GoF-formal catalog of agentic design patterns — named, reusable shapes for building autonomous AI agents: agent loops, tool use, planning…
- Agentic AI Design Patterns — Agentic AI design patterns for systems already in production — what to ship, what to observe, what to budget, what to gate. Augmented LLM,…
- AI Agent Design Patterns — How to build an AI agent: the named shapes you reach for during design and implementation — reasoning (ReAct, plan-and-execute, reflection)…
- Agent Design Patterns — Agent design patterns treat the agent loop as a software-engineering primitive: an observe→reason→act cycle wrapped in tools, memory, super…
- Agentic Patterns — A complete pattern language for agentic systems, organised in Alexander-style books across reasoning, planning, tool use, retrieval, verifi…
- Agentic AI Architecture — How to structure agentic AI: the architectural patterns that hold an LLM-powered system together. Supervisor, orchestrator-workers, augment…
- RAG Agent Patterns — Patterns for building retrieval-augmented generation agents: naive RAG, agentic RAG, hybrid search, cross-encoder reranking, contextual ret…
- Multi-Agent Patterns — Patterns for coordinating multiple LLM agents: supervisor, orchestrator-workers, handoff, debate, hierarchical agents, swarm, role assignme…
- AI Agent Safety Patterns — Safety patterns for LLM agents: step budget, kill switch, constitutional charter, approval queue, sandbox isolation, input/output guardrail…
About this catalog
The Agent Patterns Catalog is an open, GoF-formal reference of 527 design patterns for building LLM agents. Each pattern is decomposed in the manner of Christopher Alexander (1977) and the Gang of Four (1994). Source of truth at github.com/agentpatternscatalog/patterns — CC BY 4.0.