AI Agent Planning Explained: How Agents Decide What to Do (2026)
Give two AI agents the same goal — same model, same tools — and one finishes in 12 steps while the other burns 80 steps, $4 of tokens, and still delivers the wrong thing.
The difference is almost never intelligence. It's planning.
Planning is the component that turns "launch a waitlist page for my product" from an overwhelming blob into an ordered sequence of achievable steps — and keeps that sequence honest when reality pushes back. It's the least visible part of an agent (users see tools acting, not plans forming) and the most decisive one.
This guide is part of our AI Agent series built on What Is an AI Agent?, and takes one component from our architecture guide to full depth: how agents decompose goals, choose strategies, make decisions under uncertainty, and — the underrated superpower — reflect and replan when things go sideways.
What "Planning" Means Inside an Agent#
In the agent loop — perceive → plan → act → observe → reflect — planning is the moment the model answers one question: "Given the goal and everything I know right now, what should happen next?"
That question hides four distinct skills, and this article walks through each:
- Goal decomposition — breaking a fuzzy objective into concrete sub-tasks.
- Task planning — ordering those sub-tasks, respecting dependencies, picking a strategy.
- Decision making — choosing the next action (and the right tool) under uncertainty.
- Reflection — judging progress and revising the plan instead of marching off a cliff.
A useful frame: LLMs made reasoning cheap, but reasoning is judgment applied to one decision. Planning is the management layer that decides which decisions need making, in which order, toward what end.
Goal Decomposition: From Fuzzy to Finishable#
Goals arrive fuzzy. "Launch a waitlist page." "Fix the flaky tests." "Find me a better CRM." None of these are actions — you can't do them; you can only do steps toward them.
Decomposition converts a goal into sub-goals, recursively, until every leaf is a single achievable action:
Launch a waitlist page
├── 1. Decide the offer & copy
│ ├── Draft headline + 3 bullets
│ └── Get user approval on copy
├── 2. Build the page
│ ├── Scaffold page in Next.js
│ ├── Add email form → connect to provider API
│ └── Style to match existing site
├── 3. Verify
│ ├── Submit a test signup
│ └── Confirm email lands in the list
└── 4. Ship
├── Deploy to production
└── Report the live URL
Three properties separate good decompositions from bad ones:
- Leaves are verifiable. "Add email form" is done or not done. "Improve the page" is a swamp.
- Dependencies are respected. Copy before build; build before verify. Agents that decompose without ordering do steps twice.
- Checkpoints for humans are explicit. "Get user approval on copy" is in the plan, not an afterthought — this is where human-in-the-loop actually lives.
Decomposition is also where memory quietly earns its keep: an agent that remembers your stack (Next.js, Resend for email) decomposes correctly on the first try, while a memoryless one plans for a generic stack and reworks later. We covered that layer in AI Agent Memory Explained.
Task Planning: The Two Big Strategies#
Once sub-tasks exist, when does the agent plan them — all upfront, or one at a time? This is the central strategic choice in agent design, and both answers are right for different jobs.
Plan-and-Execute: Blueprint First#
The agent produces a complete plan before acting, then works through it, checking items off. The plan lives in working memory (the scratchpad from our architecture guide) and gets updated as steps complete or fail.
Strengths: token-efficient on long tasks (the big thinking happens once), auditable (a human can read and approve the plan before anything runs), and resistant to drift — the agent re-anchors on its checklist every iteration.
Weakness: plans meet reality. If step 2's assumption breaks, a naive plan-and-execute agent keeps executing a dead plan. It must be paired with replanning triggers.
ReAct: Plan One Step at a Time#
The reactive strategy: each iteration, the agent reasons about the current situation and picks the single best next action — Thought, Action, Observation, repeat. There is no standing blueprint; the "plan" is implicit and re-derived every step.
Strengths: maximally adaptive — every surprise is absorbed immediately, because nothing is fixed. Ideal for exploratory work where you genuinely can't know step 4 until you've seen step 3's result (debugging is the classic case).
Weaknesses: it can lose the big picture (fifty locally-sensible steps that add up to nowhere), and it spends reasoning tokens on every single step.
| Plan-and-Execute | ReAct (step-by-step) | |
|---|---|---|
| Plan exists | Explicit, upfront | Implicit, re-derived each step |
| Best for | Well-understood, multi-step work | Exploratory, unpredictable work |
| Token cost | Lower on long tasks | Higher — reasons every step |
| Human review | Easy — read the plan first | Hard — decisions stream by |
| Risk | Executing a stale plan | Drifting without a big picture |
| Typical use | Migrations, reports, pipelines | Debugging, research, browsing |
What production agents actually do: both. A common hybrid plans upfront at the milestone level ("research → shortlist → verify → write"), then runs ReAct within each milestone. Blueprint for direction, reactivity for terrain.

Decision Making: Choosing the Next Move#
Within any strategy, each iteration ends in a concrete choice: which action, with which tool, right now? Four factors drive good agent decisions:
Information value. Early in a task, the best action is usually the one that reduces uncertainty most — check what exists before building, read the failing test before editing code. Strong agents look before they leap; weak ones generate confident work built on unverified assumptions.
Tool fit. Given a toolbox — search, database query, code execution, email — the model matches the sub-task to the tool via the tool descriptions it's been given. This is why tool naming and descriptions matter so much in agent design; the model can only choose well among options it understands. (The mechanics of how tools are described and called get their own guide next in this series.)
Cost and risk. Reading a file is free to retry; sending an email is not. Well-designed agents treat reversible and irreversible actions differently — acting freely on the former, seeking confirmation on the latter. The decision "act vs ask the human" is itself a planning decision, and the best agents make it explicitly.
Confidence calibration. When the model's own uncertainty is high — ambiguous requirements, conflicting data — the right decision is often not another tool call but a clarifying question. Agents that never ask are as flawed as agents that always ask.
Reflection: The Skill That Separates Good Agents#
Everything above happens before acting. Reflection happens after — and it's the difference between an agent that recovers and an agent that spirals.
Reflection is the agent auditing itself with questions like:
- Did that work? Not "did the tool return output" but "did it move the goal forward?"
- Is the plan still valid? Step 3 revealed the API has no bulk endpoint — steps 4–6 just became fiction. Replan now, not at step 6.
- Am I looping? Same error twice → the approach is wrong, not unlucky. Change strategy or escalate.
- Is the quality good enough? Draft complete ≠ draft good. Re-read against requirements before declaring victory.
Three reflection patterns show up in real systems:
- Inline reflection — a quick self-check woven into every loop iteration. Cheap, catches most drift.
- Milestone review — at each plan checkpoint, a deliberate audit: verify outputs, update the plan, compress working memory.
- Critic pass — a separate evaluation (sometimes a second model) grades the final output against the original goal before it ships. Expensive; worth it for quality-critical work.
Reflection is also when agents learn: "the staging deploy needs manual cache clearing" is a lesson worth writing to long-term memory so next month's plan includes it from the start. That write-back loop — reflect, then remember — is how agents genuinely improve with use.
A Planning Trace: Watch It Think#
Goal: "Find out why signups dropped 40% this week and fix it if it's on our side."
- Decompose: ① confirm the drop is real → ② locate where in the funnel → ③ diagnose cause → ④ fix if ours → ⑤ verify recovery.
- Act (①): query analytics → drop confirmed, started Tuesday 2pm.
- Act (②): funnel query → visits flat, form submissions collapsed. Reflect: front-end suspicion; plan holds.
- Act (③): fetch the signup page, run a headless test → form's submit request returns 403. Check deploy log → CORS config changed Tuesday 1:50pm. Reflect: cause found in 3 steps; skip the remaining diagnosis branch — replan directly to fix.
- Decision point: the fix touches production config — irreversible territory. Ask human: "Found it: Tuesday's deploy broke CORS on the signup API. Approve revert?" → Approved.
- Act (④): revert config → Act (⑤): headless signup succeeds; analytics ticking up.
- Reflect & remember: stores to memory: "CORS config lives in deploy pipeline; changes there have broken signups before — add to pre-deploy checklist."
Notice what planning did: the diagnosis branch was abandoned early when evidence made it unnecessary (step 4), and the irreversible action was escalated by design (step 5). A planless agent would have completed every diagnostic step it first imagined, then auto-reverted production. Twelve steps, no drama — that's planning quality.
Where Planning Fails#
Every production team meets the same five planning failures:
- Infinite loops. Retrying a failing action forever. Fix: loop detection in reflection + hard step budgets.
- Tunnel vision. Executing a stale plan after its assumptions died. Fix: replanning triggers tied to failed expectations, not just failed tools.
- Over-planning. Forty-step blueprints for a task that needed five — slow, expensive, brittle. Fix: plan at milestone granularity; let ReAct handle the terrain.
- Under-planning. Leaping into action on a complex task, then reworking everything as constraints surface. Fix: force a decomposition pass when the goal spans multiple systems.
- Goal drift. Fifty locally-reasonable steps that optimize a sub-goal while the real goal starves ("perfecting the research doc" while the deadline was the launch). Fix: reflection that re-reads the original goal, not just the current sub-task.
Note the pattern: every cure is either better reflection or better granularity. That's planning engineering in one sentence.
FAQ#
Do reasoning models make planning components obsolete? They raise the floor — modern models decompose and self-correct far better out of the box. But step budgets, replanning triggers, human checkpoints and plan auditability are system properties, not model properties. Reasoning models made planning cheaper, not optional.
Is the plan visible? Can I see it? In well-built agents, yes — the plan lives in the scratchpad/working memory and many products surface it as a task list you can read and edit before execution. If an agent can't show you its plan, be suspicious of the word "agent."
How long should an agent plan before acting? Rule of thumb: planning effort should scale with the cost of being wrong. Free-to-retry exploration → plan lightly, act fast. Irreversible or expensive actions → decompose fully and checkpoint a human.
Plan-and-execute or ReAct for my first agent? Start with ReAct — it's simpler and most first agents do exploratory work. Add milestone-level planning when your tasks get long enough that the agent forgets where it's going.
Keep Learning#
Part of the FindUrAI AI Agent series:
- The pillar: What Is an AI Agent? Complete Beginner Guide
- How AI Agents Work: Complete Architecture Explained — where planning sits in the loop
- AI Agent Memory Explained — the scratchpad plans live in, and the lessons reflection writes back
- AI Agent vs Chatbot — why goal pursuit needs a planner at all
- How Large Language Models Work — the reasoning engine underneath
Coming next in this series: What is Tool Calling in AI Agents? — the hands that execute what planning decides.



