Planning is the activity of decomposing a goal into an ordered sequence of steps that, taken together, accomplish it. An agent that plans first works out what needs to happen and in what order — rather than only deciding the immediate next action — and then executes the steps, revising the plan as new information arrives. It is how an agent gives structure to a task that is too large to solve in a single move.
Why planning matters
Deciding only the next action works well for short tasks but tends to drift on long ones. An agent that never looks beyond the current step can lose track of the overall goal, repeat work, or pursue a path that leads to a dead end several steps later. As tasks grow to many stages, the lack of an overarching structure becomes a source of incoherence.
Planning addresses this by establishing direction before the agent commits to individual moves. An explicit plan keeps a long task coherent, exposes the intended approach so it can be reviewed before execution, and makes a run easier to follow because each action maps to a step in a known structure. The cost is rigidity and effort: a plan made too early can be wrong, and clinging to a stale plan is its own failure mode. Effective planning therefore treats the plan as revisable, updating it as execution reveals what the agent could not know in advance.
How it works
Planning approaches vary, but most share a few elements:
- Goal decomposition — the agent breaks the objective into smaller sub-goals or steps, sometimes as a flat list and sometimes as a dependency structure.
- Ordering — it arranges the steps so prerequisites come before the work that depends on them.
- Execution — the agent carries out the steps, often through its reasoning loop, calling tools or delegating to other agents.
- Revision — as results arrive, the agent updates, reorders, or discards remaining steps to reflect what it has learned.
A common explicit form is plan-and-execute, which produces a full plan up front and then runs it. A more incremental form interleaves planning with action, replanning after each step. Both rely on memory to keep the goal and progress available across steps.
Planning vs. reasoning
The two are related but operate at different scopes. Reasoning is the local act of working out the next action from the current state. Planning spans many steps, producing a structure that orders them toward the goal. Reasoning is a component of planning — drafting and revising a plan are themselves reasoning — but the output of planning is a multi-step arrangement, whereas the output of a single reasoning step is one decision.
In practice
Planning earns its keep on long-running tasks, which are exactly the runs most likely to be interrupted, so the plan and its progress must persist. A durable, observable runtime records each completed step server-side, so an agent resumes mid-plan after a crash instead of replanning from scratch, and the plan’s execution is visible as a trace. Planning structures the agent loop, contrasts with the step-by-step style of ReAct, and depends on memory to hold the goal across steps. For the agent as a primitive, see the agent concepts.