Skip to main content

Plan-and-Execute Prompting

Plan-and-execute prompting is a two-phase agent pattern. In the first phase, the model writes an ordered plan — a list of sub-tasks that, together, accomplish the goal. In the second phase, each sub-task is executed in sequence, typically with its own sub-prompt. This is distinct from ReAct, which interleaves thinking and acting step-by-step. Plan-and-execute produces more coherent long-horizon behavior because the plan commits to a structure up front, but it is less adaptive than ReAct when the environment surprises the agent mid-task and the plan becomes wrong.

Example

Asked to "prepare a competitive analysis report on three vendors," a plan-and-execute agent first outputs: 1) identify the three vendors; 2) gather pricing from each vendor's site; 3) gather feature lists; 4) build a comparison table; 5) draft a one-page summary. It then runs each step as its own tool-using sub-task, handing the accumulated outputs forward. If step 2 returns a 404 on one vendor, the agent must either replan or fail — it will not opportunistically reorder steps the way a ReAct loop would.

Put this into practice

Build polished, copy-ready prompts in under 60 seconds with SurePrompts.

Try SurePrompts