Families of agentic patterns
52 patterns in 9 families. Each family shares a way of wiring models, tools and control flow; every card plays its diagram live.
Workflows
The code fixes the path; the LLMs fill in each step.
Prompt Chaining
Workflows · 6 nodes · 3 LLM calls · branch · 2 scenarios
Break a task into fixed steps, where each LLM call works on the previous output, with optional code checks between steps.
Routing
Workflows · 6 nodes · 2 LLM calls · branch · 2 scenarios
Classify the input, then send it to a specialized prompt, model or tool.
Parallelization: Sectioning
Workflows · 7 nodes · 3 LLM calls · parallel · 1 scenario
Split the work into independent subtasks, run them in parallel, then merge the results.
Parallelization: Voting
Workflows · 6 nodes · 3 LLM calls · parallel · 1 scenario
Run the same task N times, or with N different prompts, and take the majority or consensus answer.
Orchestrator-Workers
Workflows · 6 nodes · 5 LLM calls · parallel · 1 scenario
A central LLM works out the subtasks at run time, sends them to worker LLMs, then combines the results.
Evaluator-Optimizer
Workflows · 4 nodes · 6 LLM calls · loop · branch · 2 scenarios
One model drafts, another judges; the loop runs until the work clears the bar.
Reasoning & Prompting
Shape how one model thinks inside a call or a short fixed chain: decompose, ask follow-ups, verify its own claims, or hand the arithmetic to code.
Chain-of-Thought
Reasoning & Prompting · 6 nodes · 5 LLM calls · branch · 2 scenarios
The model writes out its intermediate reasoning steps before the final answer, all inside one call.
Least-to-Most Prompting
Reasoning & Prompting · 5 nodes · 5 LLM calls · loop · branch · 1 scenario
First break the problem into easier subquestions, then solve them in order, feeding each answer into the next.
Self-Ask
Reasoning & Prompting · 4 nodes · 6 LLM calls · loop · branch · 1 scenario
The model asks itself follow-up questions, answers each one (optionally with search), then composes the final answer.
Chain-of-Verification
Reasoning & Prompting · 8 nodes · 5 LLM calls · parallel · 2 scenarios
Draft an answer, plan questions that check its claims, answer each one without seeing the draft, then rewrite the answer to match.
Program-Aided Reasoning
Reasoning & Prompting · 4 nodes · 1 LLM call · loop · branch · 2 scenarios
The model writes a program that encodes its reasoning, an interpreter runs it, and the program's output is the answer.
Agent Loops
One model chooses its next action, observes the result and loops, sometimes critiquing itself or learning across attempts.
Augmented LLM
Agent Loops · 6 nodes · 3 LLM calls · 2 scenarios
One LLM call that can use tools, retrieval and memory; every other pattern is built from this.
ReAct (Autonomous Agent)
Agent Loops · 5 nodes · 4 LLM calls · 2 scenarios
Alternate Thought, Action (tool call) and Observation until the model decides it is done.
CodeAct
Agent Loops · 6 nodes · 2 LLM calls · loop · parallel · 2 scenarios
The agent acts by writing code. One snippet can call many tools, loop and filter, and only its printed output comes back to the model.
CRITIC
Agent Loops · 6 nodes · 4 LLM calls · loop · branch · 2 scenarios
The model drafts an answer, checks its own claims with tools such as search or code, and revises from the evidence they return.
Reflexion
Agent Loops · 6 nodes · 3 LLM calls · loop · branch · 1 scenario
After a failed attempt, the agent writes a lesson in plain language to memory and tries again with that lesson in context.
Planning & Search
Plan or explore the task before or while acting, as a plan, a DAG or a tree.
Plan-and-Execute
Planning & Search · 7 nodes · 4 LLM calls · loop · branch · 1 scenario
A planner writes a step list, an executor runs each step, and a replanner revises the remaining steps.
ReWOO
Planning & Search · 7 nodes · 2 LLM calls · 1 scenario
Plan every tool call upfront using placeholders (#E1, #E2), run them, then a solver writes the answer in one pass.
LLMCompiler
Planning & Search · 8 nodes · 1 LLM call · loop · parallel · branch · 2 scenarios
The planner streams a dependency graph (DAG) of tool calls; independent ones run in parallel; a joiner either answers or triggers a replan.
Tree of Thoughts
Planning & Search · 8 nodes · 6 LLM calls · parallel · branch · 1 scenario
Generate several candidate thoughts at each step, score them, expand the promising branches and backtrack at dead ends.
Graph of Thoughts
Planning & Search · 11 nodes · 5 LLM calls · loop · parallel · branch · 1 scenario
Thoughts form a graph, not a tree. Partial results are scored and regenerated, merged many-to-one, and refined until the whole is right.
Language Agent Tree Search
Planning & Search · 8 nodes · 6 LLM calls · loop · branch · 1 scenario
Monte Carlo tree search over agent actions. Expand, act for real, score, back up the score along the path, and learn from failed branches.
Knowledge & Memory
Pull in outside or stored knowledge, decide when to fetch it, and check what comes back.
Agentic RAG
Knowledge & Memory · 7 nodes · 3 LLM calls · branch · 2 scenarios
The agent decides whether to retrieve, from which source, and with what rewritten query, and repeats until it has enough context.
Corrective RAG
Knowledge & Memory · 8 nodes · 4 LLM calls · loop · branch · 2 scenarios
Grade the retrieved documents. If they're irrelevant, rewrite the query and fall back to web search before generating.
HyDE
Knowledge & Memory · 6 nodes · 2 LLM calls · parallel · 2 scenarios
The LLM writes a hypothetical answer passage. That passage is embedded instead of the query, and the real documents nearest to it are retrieved.
Multi-Query RAG
Knowledge & Memory · 8 nodes · 2 LLM calls · parallel · 1 scenario
Rewrite one question into several queries, retrieve for each in parallel, then fuse the ranked lists before generating.
Retrieve-and-Rerank
Knowledge & Memory · 9 nodes · 2 LLM calls · parallel · 2 scenarios
Cast a wide net with cheap keyword and vector search over context-prefixed chunks, then let a reranker keep only the best few.
GraphRAG
Knowledge & Memory · 10 nodes · 1 LLM call · 2 scenarios
Index a corpus as an LLM-built entity graph with pre-written community summaries, then map-reduce over those summaries to answer whole-corpus questions.
Memory Stream
Knowledge & Memory · 7 nodes · 3 LLM calls · loop · 2 scenarios
Log every observation with an importance score, retrieve by recency, importance and relevance, and periodically write reflections back into the stream.
Hierarchical Memory
Knowledge & Memory · 6 nodes · 1 LLM call · 2 scenarios
Treat the context window like RAM. The agent uses tool calls to page facts between core, recall and archival memory.
Multi-Agent
Several role-specialized agents coordinate through a manager, hand off to each other, or debate.
Supervisor
Multi-Agent · 7 nodes · 6 LLM calls · branch · 2 scenarios
A supervisor agent sends work to specialist agents and every result comes back through it.
Handoffs
Multi-Agent · 5 nodes · 5 LLM calls · branch · 2 scenarios
Agents pass the whole conversation to each other; the agent holding it talks directly to the user, and there's no central manager.
Group Chat
Multi-Agent · 7 nodes · 10 LLM calls · branch · 2 scenarios
Agents share one thread; a manager picks who speaks next, everyone sees every message, and the chat runs until it is told to stop.
Role-Play
Multi-Agent · 5 nodes · 9 LLM calls · loop · parallel · branch · 2 scenarios
Two role-prompted agents, an instructor and a doer, trade instructions and solutions turn by turn until the instructor declares the task done.
SOP-Driven Team
Multi-Agent · 7 nodes · 4 LLM calls · loop · branch · 2 scenarios
Role agents follow a fixed procedure, each publishing a structured document to a shared pool that the next role picks up.
Blackboard
Multi-Agent · 8 nodes · 9 LLM calls · parallel · branch · 2 scenarios
Specialists read and write one shared board; each round a control unit picks who acts next, until a critic finds a solution on the board.
Mixture-of-Agents
Multi-Agent · 9 nodes · 6 LLM calls · parallel · 1 scenario
Layers of different models each answer, every model in the next layer reads all the previous answers, and an aggregator writes the final one.
Multi-Agent Debate
Multi-Agent · 6 nodes · 9 LLM calls · loop · parallel · 1 scenario
Several agents answer independently, read and critique each other's answers over rounds, then converge by majority or an optional judge.
Safety & Oversight
Checks and human approval points wrapped around any of the other patterns.
Human-in-the-Loop
Safety & Oversight · 6 nodes · 2 LLM calls · branch · human · 3 scenarios
Pause before high-stakes or irreversible actions so a person can approve, edit or reject; then resume.
Guardrails
Safety & Oversight · 7 nodes · 5 LLM calls · parallel · branch · 3 scenarios
Checks that run before and after the agent, any of which can block or redirect the flow.
Permission Policies
Safety & Oversight · 6 nodes · 5 LLM calls · loop · branch · human · 2 scenarios
Every tool call is checked against declarative allow, ask and deny rules and a budget before it runs.
Sandboxed Execution
Safety & Oversight · 8 nodes · 2 LLM calls · loop · branch · human · 2 scenarios
Agent commands run inside an isolated filesystem and network boundary, so only crossings of that boundary need approval.
Dual LLM
Safety & Oversight · 8 nodes · 2 LLM calls · 2 scenarios
A tool-holding LLM never sees untrusted text; a tool-less LLM reads it, and code passes its output along only as variables.
LLM-as-Judge
Safety & Oversight · 7 nodes · 3 LLM calls · branch · 2 scenarios
A separate judge model scores a system's outputs against a rubric, and the scores gate releases or rank candidates.
Reliability & Runtime
The plumbing that keeps agents running in production: validate and repair outputs, fail over between models, persist state, and wake up on events.
Schema Validation & Repair
Reliability & Runtime · 5 nodes · 2 LLM calls · loop · branch · 2 scenarios
Check the model's output against a schema and rules; on failure, send the exact error back and ask again, up to N tries.
Retries & Model Fallback
Reliability & Runtime · 6 nodes · 1 LLM call · loop · branch · 2 scenarios
Retry failed model calls with backoff, then fail over down an ordered list of models, resting any that keep failing.
Checkpoint & Resume
Reliability & Runtime · 6 nodes · 0 LLM calls · loop · 2 scenarios
Save the agent's state after every step, so a crash or a long pause resumes from the last checkpoint instead of starting over.
Ambient Agent
Reliability & Runtime · 6 nodes · 6 LLM calls · loop · branch · human · 2 scenarios
An agent woken by events rather than chat messages, working in the background and reaching people only to notify, ask or get a review.
Efficiency & Cost
Spend fewer tokens, dollars and seconds: escalate only when needed, reuse what was already computed, parallelize generation, and batch what can wait.
Model Cascade
Efficiency & Cost · 5 nodes · 2 LLM calls · branch · 2 scenarios
Try the cheapest model first; a scorer checks the answer and escalates to a stronger, pricier model only when confidence is low.
Caching & Reuse
Efficiency & Cost · 5 nodes · 2 LLM calls · parallel · 1 scenario
Avoid recomputing. Reuse the processed prefix of a stable prompt, or return a stored answer when a request matches an earlier one.
Batch & Throttled Fan-out
Efficiency & Cost · 6 nodes · 3 LLM calls · loop · parallel · 1 scenario
Run thousands of independent requests through a rate limiter with retries, or submit them as one provider batch at half price.
Skeleton-of-Thought
Efficiency & Cost · 7 nodes · 4 LLM calls · parallel · 1 scenario
Write a short outline first, then expand every outline point in parallel and join the results, cutting time to a complete answer.
Missing a pattern? Propose one →