Choose an architecture
Start here when the problem is unclear. Compare autonomy, state, tools, evaluation, and operational risk before picking a pattern.
Open guidePattern catalog
Browse the generated pattern chapters as a focused catalog. Filter by engineering concern, then jump directly into the chapter that explains the pattern and its implementation tradeoffs.
Search by the problem you are trying to solve, then read the use cases, avoid cases, failure modes, and production checklist before adopting a pattern.
Start here when the problem is unclear. Compare autonomy, state, tools, evaluation, and operational risk before picking a pattern.
Open guideUse the visual route when a team needs shared language for boundaries, owners, control loops, multi-agent flow, and production risk.
Open guideUse the lab matrix when you need code that proves a pattern boundary: routing, tools, memory, planning, orchestration, or deployment.
Open guideUse the 10/10 gate before release. It forces clear evidence for security, observability, evals, rollback, and ownership.
Open guideConcern
Level
Reader path
Effort
A single agent receives a goal or message, consults its context, and produces an answer or action. This is the smallest useful unit in the catalog.
Use when you need the basic runtime building blocks of any agentic system.
The agent loop turns a model call into an agent: observe state, decide the next action, act, evaluate the result, and stop when the goal is complete or a limit is reached.
Use when you need the basic runtime building blocks of any agentic system.
Goals define success; state records progress. Together they make agent work resumable, inspectable, and easier to evaluate.
Use when you need the basic runtime building blocks of any agentic system.
Tool use gives an agent controlled access to external capability such as calculators, search, databases, files, code execution, APIs, or business systems.
Use when you need the basic runtime building blocks of any agentic system.
Structured output constrains model responses to typed data that software can validate and consume.
Use when you need the basic runtime building blocks of any agentic system.
Planning separates deciding what to do from doing it. The planner creates steps; the executor runs them, reports progress, and handles errors.
Use when the agent needs structured reasoning, correction, or iterative execution.
ReAct alternates reasoning and acting. The agent reasons about current state, takes an action, observes the result, and repeats.
Use when the agent needs structured reasoning, correction, or iterative execution.
Reflection asks an agent or evaluator to inspect prior output and identify concrete improvements.
Use when the agent needs structured reasoning, correction, or iterative execution.
Evaluator-Optimizer pairs a generator with an evaluator. The generator proposes; the evaluator scores; the optimizer revises or stops.
Use when the agent needs structured reasoning, correction, or iterative execution.
Self-improvement uses feedback from prior runs to improve future runs through reviewed changes to prompts, tools, retrieval, policies, tests, or skills.
Use when the agent needs structured reasoning, correction, or iterative execution.
Self-healing workflows detect failed steps and recover through retry, fallback, re-planning, or escalation.
Use when the agent needs structured reasoning, correction, or iterative execution.
Context engineering controls what the model sees: instructions, state, retrieval results, tool documentation, memory, examples, and prior messages.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Memory gives an agent continuity, but it also creates a durable trust boundary.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Long-term episodic memory stores events: what happened, when, who was involved, and why it mattered.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Semantic recall retrieves relevant material by meaning rather than exact keywords. RAG injects retrieved material into context before generation.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Working memory is compact, typed task state the agent can update and consult during a run.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Knowledge-bound agents ground answers and actions in approved sources, policies, and citation rules.
Use when the system must assemble context, retrieve evidence, remember facts, or verify knowledge.
Skills package procedural knowledge as discoverable, versioned folders of instructions, references, scripts, templates, assets, and tests.
Use when agents need safe external capabilities or communication protocols.
MCP-first tool use separates tool capability from agent logic through manifests, validation, invocation, and structured results.
Use when agents need safe external capabilities or communication protocols.
A2A makes agents discoverable and callable across process, team, runtime, and vendor boundaries.
Use when agents need safe external capabilities or communication protocols.
Secure communication protects messages between agents with authentication, integrity, confidentiality, and policy checks.
Use when agents need safe external capabilities or communication protocols.
Human approval gates pause execution before sensitive, expensive, destructive, or externally visible actions.
Use when agents need safe external capabilities or communication protocols.
Task delegation assigns bounded subtasks to specialized workers and combines their outputs.
Use when one agent is not enough and work must be split or coordinated.
Supervisor/Worker centralizes goal ownership, task state, routing, and quality gates while workers perform bounded specialist work.
Use when one agent is not enough and work must be split or coordinated.
Debate and consensus use multiple independent proposals, critiques, votes, or rankings before producing a final answer.
Use when one agent is not enough and work must be split or coordinated.
Parallel agents run independent work concurrently, then merge results through a fan-out/fan-in control point.
Use when one agent is not enough and work must be split or coordinated.
CrewAI Flows own state and execution order. Crews group specialized agents that collaborate on delegated work inside the flow.
Use when one agent is not enough and work must be split or coordinated.
Durable workflows make agentic systems resumable and auditable by owning retries, checkpoints, approvals, compensation, and long-running state.
Use when operating agents under real constraints: cost, policy, evals, events, and durability.
Observability records what happened. Evals decide whether behavior is good enough. Release gates decide whether a change is allowed to ship.
Use when operating agents under real constraints: cost, policy, evals, events, and durability.
Policy enforcement constrains what the agent may say or do through permissions, data-access rules, business rules, safety rules, and escalation.
Use when operating agents under real constraints: cost, policy, evals, events, and durability.
Event-triggered agents run in response to webhooks, queues, schedules, or domain events.
Use when operating agents under real constraints: cost, policy, evals, events, and durability.
Mastra is a TypeScript runtime pattern for applications that need agents, workflows, tools, memory, evals, and observability in one framework.
Use when operating agents under real constraints: cost, policy, evals, events, and durability.
No matching patterns. Clear the search or switch filters.