Planner Executor Pattern: How Plan and Execute Agents Work

Agentic AIArchitecture and orchestrationPublished Updated By Simon Budziak

The planner-executor pattern separates an AI agent's planning from its execution. A planner turns a goal into ordered steps with a done condition for each. An executor completes one step at a time with the right tools and reports back, so the planner can continue, revise, or re-plan when reality changes the route.

LangChain’s Plan-and-Execute Agents post (13 February 2024) pairs a planner that writes a multi-step plan with executors that each take one step and call tools; a re-planning prompt then decides whether to answer or plan again. Its case against a ReAct agent: faster runs, since the large model is not consulted after every action, and cheaper sub-tasks on smaller models. The idea traces to Plan-and-Solve prompting (ACL 2023).

A planner creates an ordered plan, an executor completes one step at a time, reports the result, and sends blocked work back for re-planning

A plan is a proposed route, not permission for an executor to keep going after the world has changed.

What does the planner produce?

Steps, each with an intended outcome, the inputs it needs, and a condition that says when it is done. The plan should be visible state, not prose in a prompt, so it can be inspected before anything runs and resumed after an interruption. The planner owns the sequence; the executor owns the evidence for each step. An orchestrator-worker pattern splits work the same way for parallel tasks, and a supervisor agent routes dynamically when the next worker depends on what came back.

How does the executor stay bounded, and when does it re-plan?

The executor gets one step, the tools for it, and the output it must return. It does not redefine the goal or skip ahead. It returns a result, its evidence, and a status (completed, blocked, needs approval), so a bad result is an execution problem and a wrong step a planning problem. Re-plan from observed state when a prerequisite fails or a tool returns something unexpected, never from the model’s confidence. The smallest useful re-plan is often one changed step, not a new plan. Store the plan and step evidence with durable execution so a retry does not repeat an action, and return control through an explicit agent handoff.

How do we use the planner-executor pattern at Soba Labs?

Most of our agent work runs plan first, execute second, and we check the plan before any executor acts on it:

What an executor really did is read from its agent trajectory.

When is the pattern the wrong choice?

Planning adds a model call, more state, and a plan that can go stale. It pays on jobs with dependent stages, approval gates, expensive actions, or an audit requirement. A short task with an uncertain path suits a ReAct loop better. When the steps never change, code the workflow instead: as we argue in Deep agents in production, a workflow you can draw on a whiteboard should be encoded as that drawing.

Written with AI assistance and reviewed by Simon Budziak. The production notes come from systems Soba Labs builds and runs.

Frequently asked questions

Does the planner have to be a separate model?

No. One model can play both roles in separate calls. The important boundary is the plan artifact and the executor's limited responsibility, not a particular model or framework.

Should an executor follow the plan exactly?

No. It should report blocked or changed conditions and request re-planning. Blind execution turns a plan into a brittle script.

When is a planner-executor pattern unnecessary?

It is unnecessary for a short task with a clear next action. A simple ReAct loop or deterministic workflow is easier to build and evaluate.

Summarize this page with

See this working in a system we built