ToolsPromptsSkillsWorkflowsBlogAbout

Plan-and-Execute — separate planning from execution for complex tasks

First create a detailed step-by-step plan, then execute each step independently with tool calls, re-planning if an execution step fails.

Agent4.5
Plan-and-Execute — separate planning from execution for complex tasks preview

Prompt template

You are a planning agent. Break the task into a numbered list of concrete, executable steps. Each step should be a single action that can be performed with available tools. Do not execute yet — only plan.

Available tools: {tool_list}

Task: {task}

Plan:

How to use

  1. 1Planner agent receives the high-level task and available tool list
  2. 2Planner decomposes the task into an ordered list of discrete, executable steps
  3. 3Executor agent picks the first step and performs it using the appropriate tool
  4. 4After each step, the system checks whether the result is satisfactory or if re-planning is needed
  5. 5If a step fails or reveals new information, the planner updates the remaining steps
  6. 6Continue executing until all steps are complete, then synthesize the final result

Pro tips

  • Plan-and-execute decouples reasoning from action, making long tasks more reliable than ReAct
  • Store the plan as a mutable data structure so steps can be added, removed, or reordered mid-execution
  • Use a 'replanner' trigger when execution results contradict assumptions in the original plan
  • This pattern is especially effective for research, multi-step coding, and data analysis workflows

Works best with

langgraphlangchaincrewaiautogen

Ratings & Reviews

Loading reviews…

Share your experience

Select a rating

Related Skills