Plan-and-Act
Long tasks trip up agents that decide their next move one step at a time; they lose the thread. Plan-and-Act splits the job in two: a Planner writes a high-level plan for the whole task, and an Executor turns each plan step into concrete actions in the environment. Separating the strategy from the doing keeps the agent on course across many steps, which is where single-loop agents tend to drift.
*These are learning tools, not prompts. They teach you to write your own, think of them as training wheels that guide you while you learn, then fall away once you can ride on your own.
Separate the Strategy From the Doing
An agent that both plans and acts in the same breath has a hard job on long tasks. Every step it must hold the overall goal, decide the next concrete action, and track everything that has happened so far. Over dozens of steps, that combined load causes drift: the agent loses sight of the goal, repeats itself, or wanders down a path that no longer serves the plan.
Plan-and-Act gives each responsibility its own model. A Planner focuses only on strategy, producing a structured, high-level plan for the whole task. An Executor focuses only on doing, translating one plan step at a time into the specific actions the environment needs. Neither has to do the other's job, so each does its own job better.
Because good plans are scarce as training data, the authors also introduce a way to generate them: they take real successful trajectories and annotate them with the feasible high-level plans that would have produced them, giving the Planner strong examples to learn from. The payoff shows up on long-horizon tasks like navigating a website, where keeping a stable plan in view is exactly what a single-loop agent struggles to do.
On a long task, a single agent must juggle the goal, the next action, and the whole history at once. Splitting into a Planner and an Executor means the plan stays fixed and visible while the Executor works step by step, so the agent does not lose the thread across many actions. The plan is the anchor.
The Plan-and-Act Process
Plan the whole task, then execute it step by step
Plan: Draft a High-Level Plan
The Planner reads the task and produces a structured plan of high-level steps that, together, accomplish the goal. It reasons about strategy without worrying about the exact clicks or commands that come later.
Task: book a flight. Plan: search the route, filter by time and price, select a flight, enter passenger details, pay.
Execute: Turn a Step Into Actions
The Executor takes the current plan step and produces the concrete environment actions that carry it out, the specific fields to fill, buttons to click, or commands to run. It handles the low-level detail the plan deliberately left abstract.
Plan step "search the route" becomes: type the origin, type the destination, choose the date, click search.
Advance and Adapt
Once a step is done, the agent moves to the next plan step, and the plan can be revised if the environment throws a surprise. The high-level plan stays the anchor, so progress is tracked against strategy rather than lost in a stream of actions.
If no flights match the filters, the plan adds a step to relax the time window before selecting.
Complete the Long-Horizon Task
Step by step, the Executor works through the plan to the goal. Because the Planner held the whole task in view from the start, the agent reaches the end without the drift that catches single-loop agents on long tasks.
All plan steps done, the booking is confirmed, with the agent never having lost track of the overall goal.
See the Difference
One loop for everything versus a planner and an executor
Single-Loop Agent
One model plans and acts at once, choosing the next action from the current state without a stable overall plan to anchor it.
The agent drifts: it loses the goal, repeats steps, or heads down a path that no longer fits, because it never held a full plan.
Plan-and-Act
A Planner sets a high-level plan for the whole task; an Executor carries out one step at a time, with the plan as a stable anchor.
The agent stays on course across many steps, improving performance on long-horizon tasks like web navigation.
Practice Responsible AI
Always verify AI-generated content before use. AI systems can produce confident but incorrect responses. When using AI professionally, transparent disclosure is both best practice and increasingly a legal requirement.
Most US states are actively legislating AI transparency and accountability. Critical thinking remains your strongest tool against misinformation.
Plan-and-Act in Action
See how the planner and executor divide the work
"Find and order a replacement charger for a specific laptop model on a shopping site."
Planner: search the model, open the accessories, pick a compatible charger, add to cart, check out.
Executor: for "search the model", it types the model name and submits; for "pick a compatible charger", it reads listings and clicks the matching one.
Result: the plan keeps the many clicks pointed at the goal, so the agent does not get lost in the site.
"Pull last quarter's numbers from three reports and assemble a summary table."
Planner: locate each report, extract the relevant figures, normalize the units, build the table, sanity-check totals.
Executor: carries out each extraction and the table assembly step by step.
Result: because the plan lists every stage up front, no report is skipped and the final check is not forgotten.
Midway through checkout, the site asks the agent to create an account, a step the plan did not anticipate.
The plan is revised to insert an account-creation step before payment, then the Executor resumes.
Result: the high-level plan absorbs the surprise cleanly, where a single-loop agent might have stalled or abandoned the goal.
When to Use Plan-and-Act
Best for long-horizon tasks in interactive environments
Perfect For
Jobs that take many steps benefit most, because a stable high-level plan keeps the agent from drifting over a long sequence of actions.
Web navigation, app automation, and similar settings, where actions are concrete and numerous, are a natural fit for the planner-executor split.
When a job breaks cleanly into high-level stages, the Planner can lay them out and the Executor can carry each one through.
When the environment can throw unexpected steps, revising the high-level plan absorbs them without losing the overall goal.
Skip It When
If a job takes only a step or two, a separate planning stage adds overhead with little drift to prevent.
When the environment changes so much that any plan is quickly invalid, the cost of constant replanning can outweigh the benefit.
For tasks that are all thinking and no environment interaction, a reasoning method is a better fit than a planner-executor split.
Use Cases
Where Plan-and-Act delivers the most value
Web Automation
Drive multi-page web tasks such as booking, purchasing, or form-filling, where a stable plan keeps the many clicks aimed at the goal.
Desktop and App Agents
Complete workflows across an application's screens, using the plan to sequence the stages and the executor to handle each interface.
Multi-Report Analysis
Sequence extraction, normalization, and assembly across several documents, so no source is skipped and no final check is missed.
Tool-Chaining Agents
Coordinate a sequence of tool calls toward a goal, letting the plan decide the order and the executor make each call.
Process Execution
Run standard operating procedures that span many steps, keeping the whole procedure visible so nothing falls through the cracks.
Reliable Long Runs
Improve success rates on tasks where single-loop agents tend to drift, by anchoring every action to a high-level plan.
Where Plan-and-Act Fits
A planner-executor split for acting agents
Plan-and-Solve introduced planning before reasoning; Plan-and-Act extends the idea to acting agents by giving planning and execution separate models. Reach for it on long-horizon tasks in real environments, where a single reasoning-and-acting loop tends to lose the thread.
Related Techniques
Explore complementary planning and agent techniques
Plan First, Then Act
Explore how separating a plan from its execution keeps long tasks on track in the Prompt Builder, or see related agentic techniques.