Planner Agents
Plan first, then act
A planner breaks a goal into ordered, executable steps before acting. Planning reduces drift on long tasks: the plan is a checkpointable contract the loop and humans can inspect, approve, and correct.
What you will learn
- Decompose goals into steps
- Make plans inspectable and approvable
- Correct plans mid-stream
What is this?
A planner explicitly decomposes the goal into ordered steps before execution. The plan doubles as a contract: humans can approve, reorder or veto steps; the loop can checkpoint 'step X done' and re-plan when reality diverges. Planning costs a little time and saves a lot of drift.
Why do you need it?
- Plans give you a map to review BEFORE actions happen.
- Reachable checkpoints make progress measurable.
- Re-planning beats persistent improvisation on long tasks.
- Approved plans are compliance-friendly artifacts.
Mental model
A trip itinerary before departure
A plan
You wouldn't drive cross-country deciding every turn live. You sketch legs (plan), review the route (approval), and when a road closes, re-plan that leg only. The itinerary is the contract you can check against, even as legs change.
How it works
- Parse goal → step list (ordered, with exit criteria).
- Show the plan for approval or auto-accept per policy.
- Execute steps via the loop, marking progress.
- Observe divergence → re-plan remaining steps.
- Verify final completion against original criteria.
Plan→act→verify.
In production
- Migration and refactor agents surface plans before touching code.
- Ops runbooks plan steps, then approve before destructive ops.
- Research agents plan sources and questions before searching.
Best practices
- Each step names its exit criterion.
- Keep plans modest in size; collapse trivial steps.
- Re-plan visibly: log what changed and why.
- Verify deliverables against the plan, not vibes.
Common mistakes
- Plans that are prose with no checkable steps.
- Auto-executing the whole plan without review when stakes are high.
- Never re-planning when reality diverges mid-task.
Common issues
Plan approved, execution wanderedLoop ignored the plan
Feed current step + criteria into every model turn.
Plan stale mid-runWorld changed
Observe divergence; re-plan remaining steps transparently.
Debugging tips
- Steps skipped in execution → plan/action misalignment; enforce per-step exit criteria.
- Plans too granular → merge; too fluffy → force explicit criteria.
- Re-planning loops → divergence noisy; tighten observation.
Interview checkpoint
Hands-on lab
- Break a goal into ordered tasks
- Revise the plan when a task fails
- Verify that every task produced its artifact
Plan-Execute-Verify by Hand
30 min · intermediate
Quick quiz
A useful plan step includes…
Plans must survive reality unchanged.