Agent planning is the capability of an AI agent to turn a high-level goal into an ordered sequence of steps, select the tools or actions for each step, and revise that sequence as results arrive. In the field of AI agents within artificial intelligence, planning is what separates a system that pursues an objective across many actions from a chatbot that only produces a single reply.
Modern agents usually plan with a large language model as the reasoning engine, sometimes supported by classical search, explicit task graphs or external verifiers. The quality of planning largely determines how reliably an agent completes long, multi-step tasks and how much it costs to do so.
How agent planning works
Agent planning follows a goal, decompose, act, observe and replan pattern. The agent interprets the goal, breaks it into subgoals small enough to execute, performs actions through tool calling, reads the observations and adjusts the remaining plan when reality differs from expectations.
Two broad strategies exist. In plan-then-execute, the agent writes a complete plan up front and then carries it out, which is efficient and easy to inspect. In interleaved planning, popularized by ReAct prompting, the agent decides only the next step after each observation, which adapts better to surprises but can drift from the original objective.
The table below summarizes the core components that most planning agents contain.
| Component | Role in planning | Typical implementation |
|---|---|---|
| Goal representation | States what success looks like | Task prompt, acceptance criteria |
| Task decomposition | Splits the goal into subgoals | LLM prompt, hierarchical task list |
| Action selection | Chooses the tool or step to run | Tool calling with schemas |
| State tracking | Records progress and intermediate results | Scratchpad, agent memory |
| Replanning | Repairs the plan after failures | Reflection prompt, error handlers |
| Termination check | Decides when the goal is met | Verifier, tests, step budget |
Planning techniques used by AI agents
Planning techniques range from purely prompt-based reasoning to search over candidate plans. Simpler techniques are cheaper and faster; search-based ones explore alternatives and recover better from dead ends but multiply model calls.
The following table compares widely used techniques by mechanism and trade-off.
| Technique | Mechanism | Main trade-off |
|---|---|---|
| Chain-of-thought planning | Writes reasoning steps before acting | Cheap but no backtracking |
| ReAct | Alternates thoughts, actions and observations | Adaptive but can loop |
| Plan-and-execute | Separate planner and executor | Inspectable but brittle to surprises |
| Tree of thoughts | Explores and scores multiple branches | Better quality, many more calls |
| Reflexion | Critiques failed attempts and retries | Learns within a task, adds latency |
| Hierarchical planning | Nests high-level and low-level plans | Scales to long tasks, harder to coordinate |
| Classical planner with LLM | LLM translates goals into PDDL for a solver | Provably valid plans, narrow domains |
The last approach deserves attention. Research has repeatedly shown that language models produce plausible but invalid plans in domains with strict constraints. Pairing the model with a formal planner or an external validator, using languages such as PDDL, restores correctness guarantees where the domain can be modeled formally.
Agent planning compared with related agent capabilities
Planning is one capability among several that together make an agent, and it is often confused with orchestration and reasoning. Planning decides what should happen and in which order; the adjacent capabilities handle execution, coordination and recall.
The table below separates planning from the concepts closest to it.
| Capability | Central question | Relation to planning |
|---|---|---|
| Agent planning | Which steps achieve the goal | The capability itself |
| Tool calling | How to invoke one function correctly | Executes individual plan steps |
| Agent memory | What the agent knows and has done | Supplies state for replanning |
| Agent orchestration | How components and agents are coordinated | Runs and supervises the plan |
| Multi-agent system | How several agents divide work | Distributes subgoals across agents |
| Human-in-the-loop | Where people approve or correct | Adds checkpoints to the plan |
Designing reliable planning in practice
Reliable planning depends less on the cleverness of the prompt than on clear goals, constrained actions and verifiable progress. Agents plan best when success is measurable by an external check, such as passing tests, a matching record count or a validated schema.
- State explicit acceptance criteria in the goal so the agent knows when to stop.
- Keep plans short and revisable; long rigid plans fail at the first unexpected observation.
- Externalize the plan as a visible task list the agent updates, which aids both the model and human review.
- Impose step, token and time budgets to prevent runaway loops.
- Insert human approval checkpoints before irreversible actions such as payments or deletions.
The decision table below matches common task profiles to a planning strategy.
| Task profile | Recommended strategy | Reason |
|---|---|---|
| Short, predictable workflow | Plan-and-execute | Fewest calls, easy to audit |
| Exploratory task with unknowns | Interleaved ReAct-style planning | Adapts after every observation |
| Long project with many subtasks | Hierarchical planning | Keeps context focused per level |
| Strict constraints and rules | LLM plus formal planner or validator | Guarantees plan validity |
| Tasks with automatic tests | Plan, execute, test, reflect loop | Feedback signal drives repair |
Limitations and failure modes of agent planning
The defining weakness of LLM-based planning is error accumulation over long horizons. Even a high per-step success rate compounds: an agent that is right 95 percent of the time per step completes a 20-step task without error only about a third of the time, unless it detects and repairs mistakes.
- Goal drift: the agent pursues a subgoal so long that the original objective is lost.
- Infinite loops: repeated retries of the same failing action without new information.
- Premature termination: declaring success without verifying the result.
- Hallucinated capabilities: planning steps that call tools or data the agent does not have.
- Context overflow: long traces push early decisions out of the model context window.
Mitigations combine verification after each critical step, concise state summaries in memory, and evaluation on full task trajectories rather than single replies. Benchmarks for agents increasingly report task completion rate, steps per task and cost per success together, because a planner that succeeds slowly and expensively may be impractical.
Put simply
Agent planning is how an AI assistant figures out the steps to finish a job on its own. It works like writing a to-do list and then adjusting it as you go. If one step fails, the agent tries another route instead of giving up.
Imagine organizing a trip: you book the flight, then the hotel, then check that the dates line up. A good planner notices when the hotel is full and picks another one. Better planning means fewer mistakes on long tasks, but every extra check takes time and computing power.
In practice
A software team uses a coding agent to upgrade a web application from one major version of its framework to the next. The goal is stated with a clear acceptance criterion: all 1,200 existing tests must pass after the upgrade.
The agent first writes a plan of eleven subtasks, including updating dependencies, fixing deprecated calls module by module and running the test suite after each module. When the tests reveal a breaking change in date handling that the plan did not foresee, the agent inserts two new subtasks and continues. A developer approves the final dependency changes before they are merged.
The upgrade finishes in about three hours of agent runtime with roughly 140 tool calls. The test suite passes completely, and the visible task list lets reviewers see exactly which decisions the agent made and why.