The Planner: From Goal to Action Sequence
A language model given a vague goal — 'analyze our Q3 sales data and prepare a deck for Monday's board meeting' — will often either produce a plausible-sounding but shallow response or get stuck in a loop of unhelpful generalities. What converts that goal into concrete, executable steps is the planner. The planner is the component responsible for decomposing a high-level objective into an ordered sequence of sub-tasks, each of which is specific enough that the LLM core and tool layer can actually act on it.
What Planning Requires
Good planning requires three capabilities. First, goal analysis: understanding what the high-level goal actually entails — what information is needed, what constraints apply, what the output must look like. Second, decomposition: breaking the goal into a sequence of sub-tasks where each sub-task has a clear precondition (what must be true before it can run) and a clear postcondition (what it produces or changes). Third, ordering: arranging sub-tasks so that the outputs of earlier steps are available as inputs to later steps. The board-meeting-deck example decomposes into roughly: access the sales database, run aggregate queries by region and product, identify outliers, draft slide titles, write bullet content for each slide, format as a presentation file. Each step depends on the previous one.
In most modern agent frameworks, planning is not a separate specialized algorithm — it is performed by the LLM core itself, prompted to reason step-by-step before acting. Techniques like chain-of-thought and the ReAct (Reason + Act) pattern ask the model to articulate its plan as text before generating tool calls. The 'planner' is therefore more of a functional role than a separate model.
Two planning strategies dominate current practice. In hierarchical planning, the agent first produces a high-level plan (a short list of major stages), then breaks each stage into smaller steps as it executes. This mirrors how a competent human project manager works: outline the project, then zoom into each section. The advantage is that early planning does not commit the agent to implementation details it cannot know yet. In flat or one-shot planning, the agent attempts to enumerate all steps upfront before executing any. This is simpler to implement but brittle: if an early step yields unexpected results, the rest of the plan may be invalid and the agent must re-plan from scratch. A third approach, increasingly common in frontier systems, is reactive planning — the agent takes one step, observes the result, then decides the next step. This is maximally adaptive but requires the orchestration loop to handle open-ended iteration gracefully and guard against infinite loops.
Match each planning strategy to the description that best characterizes it.
Terms
Definitions
Drag terms onto their definitions, or click a term then click a definition to match.
Planning Failures and How to Diagnose Them
Planning is a common source of agent failure, and the failure modes are recognizable. Underspecification occurs when the plan's sub-tasks are still too vague to execute — 'gather relevant information' is not a step the tool layer can act on. Ordering errors occur when a step is attempted before its dependencies are satisfied — writing slide content before the aggregate queries have been run. Scope creep occurs when the agent pursues sub-tasks that are tangentially related to the goal but were not requested. Stale plans occur when the agent continues executing a plan whose premises have been invalidated by an earlier step's unexpected output. Recognizing which failure mode is active tells you exactly where in the plan to intervene.
An agent is asked to 'write a blog post about the new product launch.' The plan it generates is: Step 1 — write a blog post. Which planning failure mode does this illustrate?
An agent plans to: Step 1 — write slide content, Step 2 — query the sales database for the numbers to include. What kind of planning failure is this?
Developers improve agent plans by including planning constraints directly in the system prompt: 'Before taking any action, reason through the full sequence of steps required. Verify that each step's inputs are available before proceeding. Do not skip steps.' These instructions leverage the LLM's instruction-following capability to enforce sound planning discipline.
Decompose a Real Task
- Choose a moderately complex real-world task that an AI agent might perform — for example: booking a vacation, compiling a weekly news digest, or setting up a GitHub repository for a new project.
- Step 1: Write the high-level goal in one sentence.
- Step 2: Produce a flat one-shot plan — list every step you can think of upfront.
- Step 3: Re-examine your plan. Are any steps underspecified (still too vague)? Are any ordering errors present (a step appearing before its dependency)?
- Step 4: Revise your plan to fix any errors. Optionally, organize it hierarchically: 2-3 high-level stages, each broken into 2-3 concrete steps.
- Step 5: Identify which tools your agent would need to execute each step.
- Goal: build the habit of checking plans for the four failure modes before any execution begins.