Summary
Planning and reflection patterns add structure around an agent loop. Planning breaks a task into an explicit execution path. Reflection evaluates a draft or trajectory and decides what to improve.Why It Matters
Pure step-by-step control is often not enough for longer or more structured tasks. The agent may need to see the whole shape of the work before acting, or it may need a deliberate review step after producing an initial answer. Planning and reflection are two ways to improve quality without pretending the first pass will always be good enough.Mental Model
Planning patterns, such as the plan-then-execute style highlighted in the imported source material, separate work into two phases:- generate a task plan
- execute against that plan
- produce an initial answer or artifact
- critique it
- refine it
- planning reduces drift on multi-step structured tasks
- reflection improves quality when first drafts are cheap but correctness or performance matters
Architecture Diagram
Tool Landscape
Planning works well when the task can be decomposed clearly:- structured research
- multi-step analysis
- code generation with explicit stages
- code quality and performance
- report structure and completeness
- task trajectories that need error correction
Tradeoffs
- Planning improves coherence, but it can lock the system into a weak plan if replanning is impossible.
- Reflection improves quality, but it increases latency and model cost.
- Detailed plans help structured work, but they can become overhead for simple tasks.
- Strong critique prompts can improve outputs, but they also create another place where prompt design can fail.
- add planning when the task has more than one meaningful dependency chain
- add reflection when quality matters enough to justify another pass
- stop iterating when additional review no longer changes the decision
Citations
- Source input: Chapter 4 Building Classic Agent Paradigms
- Source input: Hello-Agents reference boundary
Reading Extensions
Update Log
- 2026-04-21: Initial repo-native draft based on imported reference material and lab rewrite rules.