Skip to content
Last Dictionary

plan-and-execute

nounAlso: plan-and-execute agent, plan-then-execute, planner–executor pattern

In plain wordsAn agent design that first writes out a complete step-by-step plan for a task, then carries out the steps one by one, revising the plan only when something goes wrong.

  1. An agent architecture that does its thinking up front: a planner model drafts an explicit list of steps for the whole task, an executor — a cheaper model, a tool-using agent or ordinary code — works through them, and a replanner reviews the results so far and either rewrites the remaining steps or declares the task done. Against a ReActReAct, prop. n.: A method in which an AI alternates between thinking out loud about what to do next and taking an action, such as a web search, then uses what it observed to plan its next step. loop, which picks each action only after seeing the last observation, the design consults the expensive model less often, gives humans a plan they can review and helps long tasks stay on course, but it can cling to a plan whose early assumptions have proved wrong. Variants differ in how they schedule the plan: LLMCompiler runs independent steps in parallel, and ReWOO writes out every tool call, with placeholders for results not yet seen, before executing any. Coding agents often expose the pattern as a 'plan mode' in which the agent may research and propose but not edit until a human approves.

    Switch to plan-and-execute so the expensive model plans once and a small model runs the steps.

Origin

Rooted in classical automated planningautomated planning, n.: The branch of AI that works out a sequence of actions to reach a goal, such as the steps a robot must take to assemble a part, from descriptions of what each action needs and what it changes. (STRIPS, 1971) and the plan–execute–monitor loop of robotics. For language models, Plan-and-Solve prompting (Lei Wang et al., May 2023), ReWOO (Binfeng Xu et al., May 2023) and BabyAGI-style task lists preceded LangChain's 'plan-and-execute' agents (2023), which gave the pattern its common name.

Usage note

The name is used both for a specific architecture and loosely for any agent that writes a plan before acting.

Related

See also
  • ReActReAct, prop. n.: A method in which an AI alternates between thinking out loud about what to do next and taking an action, such as a web search, then uses what it observed to plan its next step.
  • task decompositiontask decomposition, n.: Breaking a big, vague job into smaller, concrete steps that can each be done and checked — the way a recipe splits a meal into stages.
  • automated planningautomated planning, n.: The branch of AI that works out a sequence of actions to reach a goal, such as the steps a robot must take to assemble a part, from descriptions of what each action needs and what it changes.
  • orchestrator–worker patternorchestrator–worker pattern, n.: A way of organizing AI teamwork, like a newsroom: an editor AI decides which stories a big assignment needs, sends reporter AIs to cover them at the same time, and turns what they file into one report.
  • agentic workflowagentic workflow, n.: A multi-step process in which AI models draft, check, use tools and revise their work over several rounds, instead of answering in one shot; often the steps are laid out by developers in advance.
  • long-horizon tasklong-horizon task, n.: A job that takes many steps and a long time — hours or days of work rather than a single answer — so an AI must stay on track and recover from its own mistakes.
Contrast with
  • ReActReAct, prop. n.: A method in which an AI alternates between thinking out loud about what to do next and taking an action, such as a web search, then uses what it observed to plan its next step.

Sources

  1. Wang, L. et al. (2023). Plan-and-Solve Prompting: Improving Zero-Shot Chain-of-Thought Reasoning by Large Language Models. arXiv:2305.04091. arxiv.org/abs/2305.04091
  2. Xu, B., Peng, Z., Lei, B., Mukherjee, S., Liu, Y. & Xu, D. (2023). ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Models. arXiv:2305.18323. arxiv.org/abs/2305.18323

Mentioned in

automated planningautomated planning, n.: The branch of AI that works out a sequence of actions to reach a goal, such as the steps a robot must take to assemble a part, from descriptions of what each action needs and what it changes., ReActReAct, prop. n.: A method in which an AI alternates between thinking out loud about what to do next and taking an action, such as a web search, then uses what it observed to plan its next step., task decompositiontask decomposition, n.: Breaking a big, vague job into smaller, concrete steps that can each be done and checked — the way a recipe splits a meal into stages., hierarchical reinforcement learninghierarchical reinforcement learning, n.: Reinforcement learning organized in layers, where a high-level part chooses goals or skills — 'go to the kitchen' — and lower-level parts handle the detailed actions to achieve them., hierarchical task networkhierarchical task network, n.: A planning method that breaks a big task, such as 'travel to Paris', into smaller tasks, such as 'book a flight' and 'pack', using stored recipes, until only simple actions remain.