Plan-and-Execute: Separating Planning from Execution
Plan-and-Execute is an agent architecture in which a Planner first creates a complete multi-step plan and an Executor works through it step by step. A Replanner adjusts the plan when needed. Separating planning from execution lets a smaller model carry out the individual steps and improves control over long-horizon tasks compared with pure ReAct.
Key Takeaways
- Plan-and-Execute separates the heavy reasoning task (planning) from the cheap step-by-step execution. This enables model tiering: a strong model as Planner, an inexpensive model as Executor.
- Compared with pure ReAct, the architecture can cut costs because a smaller model carries out the tool steps and the large model only plans and checks the plan after each step.
- A Replanner decides after each step: terminate or adjust the remaining plan. This provides robustness on long-horizon tasks that ReAct loses through reasoning drift.
- The architecture was popularized by LangChain as an agent port of Plan-and-Solve prompting (Wang et al. 2023, arXiv:2305.04091), inspired by BabyAGI.
- Weaknesses: brittle plans waste calls on hopeless steps, no true parallelism (steps run sequentially), and frequent replanning eats up the cost advantage.
- Use it when tasks can be decomposed into more than three independent steps, when plan validity can be clearly verified, and when latency is not directly user-visible. In highly stochastic environments, ReAct is the better choice.
Plan-and-Execute is an agent architecture in which a Planner first creates a complete multi-step plan and an Executor works through it step by step. A Replanner adjusts the plan when needed. Separating planning from execution lets a smaller model carry out the individual steps and improves control over long-horizon tasks compared with pure ReAct.
The quick answers up front:
- What it solves: ReAct's step-by-step reasoning lacks a global overview: on long tasks the agent forgets the original goal. Plan-and-Execute enforces the goal through an explicit plan created in advance.
- Why it can be cheaper: A smaller, cheaper model carries out the individual steps. The large model only plans and checks after each step whether the plan still holds (model tiering).
- The central trade-off: Better control and auditable plans are weighed against plan brittleness and the lack of true parallelism. In highly stochastic environments, ReAct is strictly superior.
Origins: Plan-and-Solve, BabyAGI and the LangChain port
A precise classification matters here, because the attribution is often abbreviated. The underlying prompting pattern comes from Plan-and-Solve Prompting (Wang et al., arXiv:2305.04091, ACL 2023). The paper proposed the two-stage zero-shot prompt, in essence "Let us first devise a plan / Let us carry out the plan", and thereby beat zero-shot CoT on mathematical reasoning.
The agent name "Plan-and-Execute", however, comes from the LangChain port, not from the original paper. The architecture was additionally inspired by BabyAGI (Yohei Nakajima, 2023). Phrased correctly, it is therefore: the Plan-and-Execute agent architecture popularized by LangChain, based on Plan-and-Solve prompting.
Anthropic describes a closely related pattern in Building Effective Agents (December 2024): in the orchestrator-workers workflow, a central LLM dynamically breaks down a task, delegates the parts to worker LLMs and synthesizes their results.
The three components
The LangGraph variant consists of three nodes:
- Planner: generates a numbered, multi-step plan once (
Plan: List[str]). - Executor: typically a ReAct sub-agent that works through one plan step at a time.
- Replanner: decides after each execution whether to return a final
Response(terminate) or output a new, possibly revised, plan for the remaining work.
The flow:
Input → Planner → [Plan: Step_1, Step_2, …] → Executor(Step_1) → Replanner → (Executor(Step_2) → Replanner → …) → Response
The central innovation: Plan-and-Execute decouples planning (a heavy reasoning task for which a large model is worthwhile) from execution (per-step tool use, for which a smaller, cheaper model suffices).
Advantages over pure ReAct
- Faster multi-step execution: The Executor handles a plan step, including its tool calls, on its own. The large model only comes back in after that, not after every single action.
- Cost savings through model tiering: A large frontier model plans, a small, inexpensive model executes the steps. LangChain describes this cost advantage over ReAct only qualitatively. The total number of calls does not necessarily fall: in 2023, LangChain explicitly named more LLM calls as the price of the pattern and described many of the benefits as not benchmarked.
- Explicit, auditable plans: A strong argument for enterprise and compliance applications, because the plan is laid out before execution.
- Global overview: The overall goal is preserved across long trajectories, rather than being lost through ReAct's "reasoning drift".
Weaknesses and failure modes
Plan-and-Execute is no panacea. The key limitations:
- Plan brittleness: If the up-front plan is wrong, the Executor wastes calls on hopeless steps until the Replanner notices. The Plan-and-Solve paper itself documents calculation errors, missing steps and semantic misunderstandings.
- No true parallelism: Plans are lists; the Executor works through them sequentially. This is exactly what LLMCompiler (Kim et al., arXiv:2312.04511) addresses by emitting a DAG instead of a list.
- Replan costs: If the Replanner has to revise the plan often, steps are added, and each extra step costs another Executor and Replanner pass. In noisy environments this happens at nearly every step and erodes the cost advantage.
- Model choice is decisive: If the Executor model is too weak for the steps, more steps fail, the Replanner has to revise the plan more often, and the cost advantage shrinks.
ReAct vs. Plan-and-Execute in direct comparison
Dimension | ReAct | Plan-and-Execute |
|---|---|---|
Planning | Implicit, step by step (reactive) | Explicit, complete plan up front |
LLM calls | One call per step | One plan call, execution with a small model, a Replanner call after each step |
Token effort | Grows with every step, large model per action | Depends on replan frequency, execution with a smaller model |
Latency (N tool steps) | N x sequential | 1 plan call + N executions + N Replanner calls, sequential |
Model tiering | Difficult (one loop, one model) | Natural (Planner large, Executor small) |
Robustness on long-horizon goals | Weak (reasoning drift) | Strong (goal stays fixed in the plan) |
Robustness under stochasticity | Strong (reactive) | Weak (plan can become stale) |
Auditability | Trace per step | Explicit plan up front, compliance-friendly |
Implementation complexity | Low (a one-liner in LangGraph) | Medium |
The token row describes tendencies, not measured values. Measure on your own workload.
Pseudocode: the Plan-and-Execute loop
Simplified, modeled on the LangGraph state-schema logic:
```
State: input, plan (list), past_steps (completed), response
def planner(state):
# a large model creates the complete plan ONCE
state.plan = big_model.plan(state.input) # e.g. ["1. ...", "2. ...", "3. ..."]
return state
def executor(state):
step = state.plan[0] # next open step
result = small_model.run_react(step) # cheap ReAct sub-agent + tools
state.past_steps.append((step, result))
return state
def replanner(state):
# either done -> Response, or output a new remaining plan
if big_model.is_done(state):
state.response = big_model.final_answer(state)
return state, "END"
state.plan = big_model.replan(state.input, state.past_steps)
return state, "executor"
Graph: planner -> executor -> replanner -> (executor | END)
```
The decisive point: big_model (expensive) runs only in planner and replanner, while small_model (cheap) carries the actual execution load.
A concrete example: daily marketing report
An agency builds an agent that produces a competitive report every morning. Task: "Research the three most important competitors, gather their new content from the last 24 hours, summarize it and send it by email."
With pure ReAct, the agent would call the full model again after every single action (search, scrape, summarize), including the entire context window so far. With 12 steps, that is 12 expensive calls plus a growing prefix.
With Plan-and-Execute, the Planner creates the plan once (1 expensive call):
```
Plan:
- Identify competitors A, B, C
- For each: scrape new blog/social content from the last 24h
- Summarize briefly per competitor
- Format the overall report
- Send by email to the team
```
Steps 2-5 then run through a cheap Executor. After each step, the large model only checks whether the plan still holds and replans if, for example, a source is unreachable. As long as that stays the exception, this batch task saves costs, because the actual work runs on the cheap model. The plan is also documented in a way the agency can follow.
Use in frameworks (as of 2026)
- LangGraph: Native, with an official tutorial. Canonical state schema with
input,plan: List[str],past_stepsandresponse; nodesplanner,agent(Executor) andreplan. A conditional edgeshould_endleads back to the Executor or toEND. - CrewAI: A direct fit via
Crew(planning=True). This activates anAgentPlannerthat creates a step-by-step plan before each crew iteration and injects it into every task description. WithProcess.hierarchicalplusmanager_agent/manager_llm, a managing replanning layer is added. - AutoGen / Microsoft Agent Framework: Mapped via Group Chat with a dedicated
Planneragent plus worker agents (RoundRobinGroupChatorSelectorGroupChat). In the Microsoft Agent Framework, Magentic orchestration comes closest to the pattern: a manager agent creates a task plan, assigns steps to specialized agents and replans when progress stalls. Optionally, a human approves the plan before execution. As of 2026, AutoGen is in maintenance mode; Microsoft points new projects to the MS Agent Framework. - n8n: No native Plan-and-Execute node, but realistic with two AI Agent nodes (Planner + Executor) connected via a SplitInBatches loop over the plan items. Limitation: n8n loops are not stateful across executions without external storage. That works for batch jobs (daily reports, content pipelines), not for high-frequency real-time agents.
When to use it and when not to
Use Plan-and-Execute when (a) tasks can be decomposed into more than three independent steps, (b) you have a clear authority for verifying plan validity, and (c) latency is not directly user-visible.
Avoid it when the environment is highly stochastic. If every observation can invalidate the plan (for example in interactive web navigation), ReAct's reactive loop is strictly better. For compliance-critical workflows in the EU (GDPR, EU AI Act), Plan-and-Execute with a human in the loop is a good fit: an auditable plan and traceable step-by-step execution.
For agencies and B2B decision-makers
Plan-and-Execute is the natural pattern for plannable, recurring multi-step processes of the kind that are everyday occurrences in agencies: reporting pipelines, research workflows, content production. The pattern offers two things: a potential cost reduction through model tiering and a verifiable plan laid out up front. Both meet exactly the requirements of compliance and budget control in the DACH B2B environment. The pragmatic advice from production experience applies here too, however: start with the simplest pattern that works (usually ReAct) and only switch to Plan-and-Execute once measured failure modes such as reasoning drift, cost or lack of overview justify it. If you are evaluating which agent architecture fits your specific use case, Blck Alpaca can support you with selection, model tiering and auditable implementation.
Opens the chat with a prepared prompt.
Frequently asked questions
What is the difference between Plan-and-Execute and ReAct?
What is the Replanner responsible for in Plan-and-Execute?
How much cheaper is Plan-and-Execute than ReAct?
When should you NOT use Plan-and-Execute?
Is Plan-and-Execute the same as Anthropic's orchestrator-workers pattern?
Want to go deeper?
Get new analyses straight to your inbox, or see how we put this knowledge to work for companies.