Agent planning

On this page 7

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.

ComponentRole in planningTypical implementation
Goal representationStates what success looks likeTask prompt, acceptance criteria
Task decompositionSplits the goal into subgoalsLLM prompt, hierarchical task list
Action selectionChooses the tool or step to runTool calling with schemas
State trackingRecords progress and intermediate resultsScratchpad, agent memory
ReplanningRepairs the plan after failuresReflection prompt, error handlers
Termination checkDecides when the goal is metVerifier, tests, step budget
Core components of a planning agent

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.

TechniqueMechanismMain trade-off
Chain-of-thought planningWrites reasoning steps before actingCheap but no backtracking
ReActAlternates thoughts, actions and observationsAdaptive but can loop
Plan-and-executeSeparate planner and executorInspectable but brittle to surprises
Tree of thoughtsExplores and scores multiple branchesBetter quality, many more calls
ReflexionCritiques failed attempts and retriesLearns within a task, adds latency
Hierarchical planningNests high-level and low-level plansScales to long tasks, harder to coordinate
Classical planner with LLMLLM translates goals into PDDL for a solverProvably valid plans, narrow domains
Common agent planning techniques

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.

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.

CapabilityCentral questionRelation to planning
Agent planningWhich steps achieve the goalThe capability itself
Tool callingHow to invoke one function correctlyExecutes individual plan steps
Agent memoryWhat the agent knows and has doneSupplies state for replanning
Agent orchestrationHow components and agents are coordinatedRuns and supervises the plan
Multi-agent systemHow several agents divide workDistributes subgoals across agents
Human-in-the-loopWhere people approve or correctAdds checkpoints to the plan
Planning and related capabilities

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 profileRecommended strategyReason
Short, predictable workflowPlan-and-executeFewest calls, easy to audit
Exploratory task with unknownsInterleaved ReAct-style planningAdapts after every observation
Long project with many subtasksHierarchical planningKeeps context focused per level
Strict constraints and rulesLLM plus formal planner or validatorGuarantees plan validity
Tasks with automatic testsPlan, execute, test, reflect loopFeedback signal drives repair
Choosing a planning strategy

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.