Agentic Design Patterns
25 patterns found
Layer 1: Topology / Control Flow
Patterns for arranging and sequencing agent calls.
Single-agent (10)
Prompt Chaining
Decomposes a task into a fixed chain of LLM calls, each consuming the previous output.
Routing
Classifies the input, then forwards it to the matching prompt, model, or sub-agent.
Parallelization
Fires N LLM calls in parallel and reduces them with a deterministic aggregator.
Planning
Drafts a multi-step plan, executes it, and revises the tail when a step fails.
Tool Use / ReAct
Loops a thought, a tool call, and the result until the agent emits a final answer.
Code Agent
Wires the tool-use loop to a codebase, an editor, a shell, and a test runner.
Evaluator-Optimizer
Drafts an answer, scores it against a rubric, and regenerates with the critique appended.
RAG
Pulls documents from an external store and uses them as context for the model's answer.
Agentic RAG
Lets the model issue retrieval as a tool call and decide when to stop searching.
Reflexion
Writes a critique after each attempt and retrieves prior critiques on the next attempt.
Multi-agent (3)
Orchestrator-Workers
Has a central orchestrator dispatch sub-tasks to fresh workers and merge their outputs.
Multi-Agent Debate
Runs N agents on the same prompt, exposes them to each other's answers, and votes.
Handoffs / Swarm
Lets one agent own the dialogue and hand control off via a transfer tool call.
Layer 2: Quality & Control Gates
Output verification, policy gates, human review, and abort thresholds.
Layer 3: State & Context
Where agents keep what they need across steps, sessions, and restarts.
Layer 4: Interfaces & Transport
The wire formats and protocols between agents and external systems.
Layer 5: Methodology
Cross-cutting design principles, applied to all of the above.