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 decomposed in the manner of Alexander (1977) and the Gang of Four (1994).
An LLM agent design pattern is a named, reusable shape for solving a recurring problem in LLM-powered software. The agent loop, the way tools are invoked, how memory is paged, how a critique is folded back in — these are not implementation details but commitments with names. Giving them names is what lets engineers compare, compose, and reject them on specific grounds.
This catalog decomposes every pattern 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 model is not allowed to violate), and related[] — typed edges to other patterns. The constrains slot is the LLM-era addition; it is how a pattern stays a pattern in the presence of a powerful generator.
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.
- Tool Use — Let the LLM produce typed calls against an external toolkit instead of producing free-form text the surrounding system has to parse.
- 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.
- Step Budget — Cap the number of tool calls or loop iterations the agent is allowed within a single request.
- Chain of Thought — Elicit multi-step reasoning by prompting the model to produce intermediate steps before its final answer.
- 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.
- Agent-as-a-Judge — Evaluate an agent's full trajectory (steps, tool calls, intermediate states) by another agent rather than scoring only the final output.
- Subagent Isolation — Run subagents in isolated workspaces so their writes do not collide and parallelism is safe.
Recommended reading
- Reasoning — 17 patterns
- Planning & Control Flow — 40 patterns
- Tool Use & Environment — 34 patterns
- Verification & Reflection — 27 patterns
Or open the full contents for all 421 patterns in 14 books.
Related guides
- 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 421 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.