Why split planning from doing
A flat agent that picks the next action one step at a time loses sight of the goal on long tasks. Hierarchical planning separates a high level planner from a low level executor so the agent keeps a stable map of the whole job.
The two layers
- Planner: reads the goal and produces an ordered list of subgoals, each a milestone like gather data or draft report.
- Executor: takes one subgoal at a time and runs the concrete tool calls needed to finish it.
The planner thinks in milestones; the executor thinks in actions. Control returns to the planner after each subgoal so it can replan if something changed.
Benefits
- Focus: the executor solves a small bounded problem.
- Recovery: a failed subgoal triggers a replan, not a full restart.
- Clarity: the subgoal list is a readable record of intent.
Costs and pitfalls
- A bad initial plan misdirects all the work below it.
- Too many layers add overhead and latency.
- The planner needs honest feedback on whether a subgoal truly succeeded.
Hierarchical agents shine when a task is long enough that holding the whole plan in one flat loop becomes brittle.
Key idea
Hierarchical planning splits an agent into a planner that breaks a goal into subgoals and an executor that runs actions for each one, returning control to replan so long tasks stay focused and recoverable.