AI Agent Design Patterns

July 2, 2026 · View on GitHub

Each pattern directory contains an interview.md with 7–8 questions spanning four categories: ConceptualTrade-offsImplementation & Failure ModesExtension

Questions are ordered from definition-level to system-design depth, mirroring how interviewers typically probe a topic.


Study Path (simple → complex)

Foundational Patterns

These establish the vocabulary. Learn these first.

#PatternCore ideaInterview file
02RoutingSingle-classifier dispatch to specialized handlerspatterns/02-routing/interview.md
01Prompt ChainingFixed sequential LLM pipelinepatterns/01-prompt-chaining/interview.md
03ParallelizationFan-out to N workers, fan-in to aggregatorpatterns/03-parallelization/interview.md
06Code ExecutionGenerate → execute → retry with error feedbackpatterns/06-code-execution/interview.md

Iterative Loop Patterns

These introduce cycles and self-improvement.

#PatternCore ideaInterview file
07ReActReason-Act-Observe loop with tool callspatterns/07-react/interview.md
08ReflectionGenerate → self-critique → revise until stablepatterns/08-reflection/interview.md
05Evaluator-OptimizerSeparate generator and evaluator in a revision looppatterns/05-evaluator-optimizer/interview.md
16Constitutional AICritique-revision loop guided by explicit principlespatterns/16-constitutional/interview.md

Planning & Decomposition Patterns

These split hard problems into manageable parts.

#PatternCore ideaInterview file
12Self-AskDecompose into sub-questions, answer sequentiallypatterns/12-self-ask/interview.md
20Least-to-MostOrder sub-problems easiest-first, build up contextpatterns/20-least-to-most/interview.md
09Plan-and-ExecuteStatic plan → per-step inner ReAct → synthesizepatterns/09-plan-and-execute/interview.md
18Speculative ExecutionGenerate N independent candidates, evaluate, pick bestpatterns/18-speculative/interview.md

Multi-Agent & Coordination Patterns

These involve multiple models or structured control flow.

#PatternCore ideaInterview file
04Orchestrator-WorkersPlan + isolated workers + synthesispatterns/04-orchestrator-workers/interview.md
10Multi-AgentSupervisor routes to role-based agents, synthesizespatterns/10-multi-agent/interview.md
17Mixture-of-ExpertsRouter selects top-k expert agents to answerpatterns/17-mixture-of-experts/interview.md
15DebateAffirmative vs. Negative agents, judge synthesizespatterns/15-debate/interview.md

Stateful & Constrained Patterns

These add persistent state, explicit structure, or human oversight.

#PatternCore ideaInterview file
11Memory-Augmented AgentReAct + persistent MemoryStore (remember/recall/forget)patterns/11-memory/interview.md
14State MachineExplicit state graph; LLM selects transitionspatterns/14-state-machine/interview.md
19Event-DrivenPer-event mini-ReAct loop with persistent statepatterns/19-event-driven/interview.md
13Human-in-the-LoopReAct with checkpointed tools requiring human approvalpatterns/13-human-in-the-loop/interview.md

Cross-Pattern Comparison Questions

These are high-signal interview questions that span multiple patterns:

  1. ReAct vs. Plan-and-Execute: When does dynamic replanning (ReAct) outperform a static upfront plan, and vice versa?
  2. Reflection vs. Evaluator-Optimizer: Both use a critique step — what does using a separate evaluator model add, and at what cost?
  3. Routing vs. Mixture-of-Experts: Both dispatch to specialists — how do they differ in how many specialists answer, and when does each model fit better?
  4. Orchestrator-Workers vs. Multi-Agent: Both decompose work across agents — what determines which pattern to use for a given task?
  5. Self-Ask vs. Least-to-Most: Both decompose into sub-questions — what does ordering by difficulty add, and when does it not matter?
  6. Parallelization vs. Debate: Both generate multiple answers — how does the adversarial rebuttal structure in Debate add value that parallel independent answers do not?
  7. State Machine vs. ReAct: Both loop until a terminal condition — what does making the control flow graph explicit gain you, and what does it cost?
  8. Speculative Execution vs. Evaluator-Optimizer: Both try multiple approaches and select the best — what is the fundamental difference in how they improve quality?