Agents
Planning
Make a plan first, then execute it step by step (and re-plan when reality differs).
What it is and why it exists
Plan-and-execute splits work into a planning call that produces steps and an executor that runs them, re-planning on surprises. It improves long tasks, makes progress visible, and allows plans to be reviewed before anything runs.
Quick prototype
Ask the model for a numbered plan, then loop over it.
In production, at scale
Plans as structured objects (steps, dependencies, status), a to-do list the agent updates, re-planning triggers, optional human review of the plan, and parallel execution of independent steps.
Vendors and tools
| LangGraph plan-and-execute | Planner/executor graphs |
|---|---|
| Coding agents’ to-do lists | Visible plans updated as work progresses |
How it fails
- Rigid plans executed after they stopped making sense
- Planning overhead on two-step tasks
What the interviewer asks next
Why can plan-then-execute improve security?
If the plan is fixed before any untrusted content is read, injected text in tool results can’t add new actions — it can only influence data within the planned steps.