Skip to main content
ModelTerms

Agents & Tools · intermediate

Plan-and-Execute (planner-executor)

Plan-and-execute splits agent loops into a planning step (produce the full step list up front) and an execution step (run each step). Cheaper than per-step ReAct and easier to inspect.

Explanation

ReAct interleaves thought and action at every step — flexible but expensive (one LLM call per step) and hard to audit. Plan-and-execute asks a powerful "planner" model to produce the whole plan first, then a cheaper executor model runs each step and only re-plans if something fails.

The trade-off: less adaptive than full ReAct, but more predictable, often cheaper, and the plan is a debuggable artifact you can show to users or log to your trace store.

Used in many production agents (notably Devin's alleged architecture and many internal coding agents at frontier labs).

Examples

  • A research agent: Sonnet produces a 7-step plan; Haiku executes each step; if step 4 fails, Sonnet re-plans from there.
  • A data-cleaning agent that plans the full pipeline up front, then runs deterministic Python for each step.

When to use plan-and-execute

Tasks where the high-level structure is predictable but individual steps need autonomy.

Frequently asked

What is Plan-and-Execute?

Plan-and-execute splits agent loops into a planning step (produce the full step list up front) and an execution step (run each step). Cheaper than per-step ReAct and easier to inspect.

What is an example of plan-and-execute?

A research agent: Sonnet produces a 7-step plan; Haiku executes each step; if step 4 fails, Sonnet re-plans from there.

How is Plan-and-Execute related to Agent?

Plan-and-Execute and Agent are both agents & tools concepts. An AI agent is an LLM-driven system that decides which actions to take, executes them via tools, observes the results, and iterates until a goal is met.

When should I use plan-and-execute?

Tasks where the high-level structure is predictable but individual steps need autonomy.

Is Plan-and-Execute considered intermediate?

Plan-and-Execute is generally considered intermediate-level material in the AI and LLM space.

AgentAgents & Tools

An AI agent is an LLM-driven system that decides which actions to take, executes them via tools, observes the results, and iterates until a goal is met.

ReActAgents & Tools

ReAct is a prompting pattern that interleaves reasoning ("Thought:") with actions ("Action:") and observations ("Observation:"). It is the foundation of most tool-using agents.

Multi-AgentAgents & Tools

A multi-agent system uses several LLM agents that talk to each other — a manager and workers, a debate, a pipeline — instead of a single agent doing everything.

Workflow vs AgentAgents & Tools

A workflow is a deterministic pipeline where humans hard-code the LLM call sequence. An agent lets the LLM decide which steps to take. Anthropic's recommended default is workflow first, agent only when needed.

Agentic CodingAgents & Tools

Agentic coding is an LLM-driven workflow where the model reads code, plans changes, edits files, runs commands, and iterates against feedback — autonomously closing tasks rather than just suggesting code.

Side-by-side comparisons

Sources