---
title: Plan-then-Execute LLM Agents
url: https://www.emergentmind.com/topics/plan-then-execute-llm-agents
type: topic
---

# Plan-then-Execute LLM Agents

A plan-then-execute (PTE) paradigm in LLM agents refers to architectures that decouple high-level planning—producing an explicit, global or hierarchical plan—from the downstream execution of that plan, which is typically handled by a separate module or subagent. This separation is motivated by the need for interpretability, modularity, controllable reasoning, reliability, and the limitations of end-to-end or interleaved planning/acting (e.g., ReAct) protocols in complex, long-horizon, or high-assurance environments.

## 1. Formal Foundations and Core Architecture

The canonical PTE agent leverages a two-stage workflow: first, a planner module creates an explicit plan—a sequence (or DAG) of high-level steps or subgoals—based on a user goal or instruction; then, an executor module realizes each step, typically by grounding it to environment actions, tool calls, or subagent invocations.

Let \(u\) denote the (possibly natural-language) user instruction. The planner \(\pi_g\) emits a plan
\[
p = (s_1, s_2, \dots, s_m)\,,\;\quad s_i \in \text{natural-language subgoal or structured schema}\,.
\]
For execution, an agent \(\pi_\theta\) is conditioned on both \(u\) and \(p\), producing action sequences:
\[
a_t \sim \pi_\theta( \cdot \mid u, p, a_{<t}, o_{<t} )
\]
where \(a_{<t}\) and \(o_{<t}\) are the histories of actions and observations. The plan may be represented as a strictly linear list [2503.02682], a hierarchical structure [2504.16563], a DAG [2603.11445], a program (“blueprint”) [2508.02721], or segmentable subgoal set suitable for parallel/expert worker assignment [2504.02051, 2601.06838]. The execution phase iterates through, or schedules, these steps while updating state and potentially relaying feedback for re-planning.

This explicit decoupling stands in contrast to interleaved (e.g., ReAct [2402.02716]) or monolithic LLM-only agent architectures, which conflate reasoning and acting on a per-timestep basis.

## 2. Plan Representation: Abstractions and Modality

Plan representations in PTE architectures are flexible but always explicit. Common forms include:

- **Abstract NL step lists:** Each step is a natural-language description of a subgoal or action, often omitting environment-specific details to enhance generalization [2503.02682, 2503.09572].
- **Structured JSON or code blueprints:** Plans may manifest as structured JSON objects, programs (functions in Python or task DSLs), or DAGs of subtasks [2508.02721, 2603.11445, 2504.02051].
- **Symbolic plans (PDDL):** Hierarchical, symbolic representations where steps are parameterized (e.g., as actions with pre- and postconditions) provide strong modularity and support for formal verification [2603.14248].

Plans may be static (fixed before any execution) or support continuous refinement (replanned after each step or failure) [2504.16563, 2503.09572]. Advanced frameworks allow plans to specify agent, tool, or subskill invocation, and may encode dependencies (e.g., DAG structure for parallel execution) [2603.11445, 2601.06838].

## 3. Planning, Optimization, and Data Regimes

PTE agents require not only robust planning modules, but learning frameworks to ensure high-quality and generalizable plans.

- **Supervised Finetuning:** Planners are initially trained on pairs \((u,p)\) or \((q, z)\) of instructions and reference plans using cross-entropy loss [2503.09572].
- **Preference Optimization:** Meta plans are further refined using feedback from rollouts and environment rewards. Direct Preference Optimization (DPO) or similar preference-learning objectives optimize the planner to prefer plans yielding higher empirical rewards [2503.02682].
- **Synthetic Data Generation:** To address data scarcity—especially of high-quality plans—researchers devise pipelines that (a) collect trajectories via demonstrators, (b) annotate with LLM or programmatic plan labels, and (c) perform augmentation and targeted expansion [2503.09572].
- **Feedback Loops:** Environmental or LLM-based verification signals inform meta-plan improvement and dynamic re-planning [2504.16563, 2603.11445].

Optimization objectives thus blend supervised learning, preference learning, and closed-loop fine-tuning leveraging both human-annotated and synthetic datasets.

## 4. Execution, Conditioned Reasoning, and Failure Recovery

Execution modules consume explicit plans and ground them into actions. Execution protocols include:

- **Conditioned prompting:** The plan is inserted into the reasoning context for each action, with empirical results showing performance is sensitive to placement (e.g., instruction block vs. internal thought) [2503.02682].
- **Structured execution:** In deterministic or secure settings, plans are codified as source code or a blueprint, and executed stepwise by an engine that blocks on each atomic call; LLM invocations, tool calls, and conditionals are interleaved as dictated by the static plan, never the LLM at runtime [2508.02721].
- **Hierarchical skill dispatch:** High-level plan steps are mapped to specialized skill modules (searching, coding, writing, etc.), with each skill having a designated executor and interface [2504.16563].
- **Multi-agent and parallel models:** Plans may specify assignment of tasks to multiple worker agents, supporting efficient, event-triggered concurrent execution [2504.02051, 2601.06838, 2603.11445].

Failure recovery is intrinsic to robust PTE. When off-nominal outcomes (errors, unexpected observations) arise:
- Agents may trigger local re-planning (spot correction of suffix steps or subgoals), global re-plan (entire plan regeneration from new state), or adaptive assignment of remedial steps [2504.16563, 2603.14248, 2405.16334].
- LLM-based or deterministic verification modules judge postconditions and propagate learned failures back to the planner [2603.14248].

## 5. Security, Interpretability, and Control

PTE patterns provide prominent architectural advantages:

- **Control-flow integrity:** Fixing the plan up-front prevents tool outputs or environmental feedback from injecting unanticipated actions. This hardens against prompt-injection and non-local vulnerabilities [2509.08646].
- **Least-privilege enforcement:** By associating tools with plan steps, executors can be dynamically provisioned for minimal access, and sandboxed as needed (e.g., per step Docker containers) [2509.08646].
- **Determinism and procedural fidelity:** Encoding plans as source-code or blueprints guarantees procedural adherence, with all stochasticity confined to controlled LLM submodule invocations [2508.02721].
- **Human-in-the-loop gating:** PTE simplifies HITL verification—humans can approve the plan before execution or per critical step [2509.08646].
- **Auditability:** Traceable plan structures and execution logs facilitate analysis of failures and ground reasons for specific actions or outcomes [2601.06838].

## 6. Empirical Results and Quantitative Comparison

Empirical studies demonstrate significant benefits for PTE architectures:

| Agent/Framework             | Success Rate / Key Gains                 | Benchmark                       | Notes                                             |
|-----------------------------|------------------------------------------|----------------------------------|---------------------------------------------------|
| MPO [2503.02682]            | +18.3 pts (zero-shot), +5% SOTA margin   | ScienceWorld, ALFWorld           | Strong generalization, reduced wasted actions     |
| Plan-and-Act [2503.09572]   | Static: +6–10 pp; Dynamic: +16–20 pp     | WebArena-Lite                    | Synthetic data, dynamic re-planning vital         |
| Source Code Agent [2508.02721]| +10.1 pp Pass^1 over baseline           | tau-bench                        | Up to –82% token/tool cost                       |
| GoalAct [2504.16563]        | Mean +12.22 pp avg.                      | LegalAgentBench                  | Ablations: planning, searching, coding all critical|
| Planner, Multi-agent [2504.02051] | 5.53 vs 2.28 efficiency ratio      | CuisineWorld                     | Improved agent utilization, cost efficiency       |
| CHASE [2601.06838]          | 98.4% recall, 0.08% FPR                  | PyPI malware (3k pkgs)           | LLM-coordinated multi-agent with verification     |
| VMAO [2603.11445]           | 3.1→4.2 completeness (+35%)              | Market research (25 queries)      | Orchestration-level verification, iterative plan  |

Plan-then-Execute yields (a) higher final task and subgoal success, (b) reduced execution overhead and error rate, and (c) greater generalization—particularly evident for mid-scale models and multistep or multi-agent tasks [2503.02682, 2503.09572, 2508.02721, 2504.02051, 2603.11445].

## 7. Limitations, Open Challenges, and Future Directions

Open challenges remain across several dimensions:

- **Hallucination and grounding:** High-level planners still hallucinate infeasible subgoals or objects; symbolic or structured planning formats (PDDL, code) mitigate, but do not eliminate, these errors [2502.11221, 2603.14248].
- **Perceptual and low-level bottlenecks:** Even with perfect plans, execution struggles with UI grounding, selector identification, DOM ambiguity, or tool parameterization [2603.14248].
- **Context- and domain-adaptation:** Robust generalization and adaptation to new tasks require dynamic memory hacks, curriculum-based plan dataset expansion, and possibly hybrid neural-symbolic memory modules [2503.09572, 2602.09514].
- **Cost and latency:** While PTE improves marginal cost per execution, long plans coupled with environment feedback still impose steep call and inference costs [2509.08646, 2602.09514].
- **Human trust in daily assistants:** Naïve user involvement in PTE agents does not reliably calibrate trust or improve outcome; adaptive HITL involvement and transparency in model uncertainty remain areas of active investigation [2502.01390].
- **Evaluation:** New process-level and trajectory metrics—beyond end-to-end success—are needed to reveal misalignments in plan, execution, and recovery stages [2603.12710, 2603.14248].

Future research directions include hierarchical decomposition protocols, principled re-planning strategies, uncertainty-driven human-in-the-loop controls, and scalable multi-agent orchestration in dynamic environments.

---

**Key references:** [2503.02682], [2503.09572], [2508.02721], [2504.16563], [2504.02051], [2601.06838], [2402.02716], [2502.11221], [2509.08646], [2603.12710], [2510.09244], [2602.09514], [2603.14248], [2603.11445], [2502.01390], [2405.16334].

Source: https://www.emergentmind.com/topics/plan-then-execute-llm-agents