Dual-agent design is an architectural pattern where two specialized agent roles replace a single general-purpose agent: one agent handles planning (decomposing goals, deciding strategy, managing state) and a separate agent handles execution (writing code, calling tools, implementing decisions).

The core insight is that planning and execution are cognitively distinct tasks requiring different capabilities, and entangling them in a single agent degrades both.

The Two Roles

  • Planner agent: Receives the high-level goal and produces a structured plan — a sequence of steps, tool choices, or subtask decomposition. It operates at the level of what to do. It maintains project-level context and strategic coherence.
  • Executor agent: Receives individual steps from the planner and translates them into concrete actions — function calls, file edits, shell commands. It operates at the level of how to do each step. It needs deep tool knowledge but limited strategic awareness.

In Anthropic’s long-running agent harness design, this maps to an initializer agent (establishes infrastructure, writes configuration, sets up the environment) and a coding agent (implements features incrementally within the prepared context).

Why Separation Improves Quality and Efficiency

Empirical evidence is strong:

  • ReWOO (Xu et al., 2023) demonstrated that separating the planning step from execution produces a 5x reduction in token consumption and a 4% accuracy improvement over interleaved ReAct-style loops. Interleaved loops redundantly reprocess all prior tokens at every step; decoupled architectures eliminate this waste.
  • LLMCompiler (Kim et al., 2024, ICML) formalized planner–executor as a DAG-streaming pattern and measured 3.7x latency speedup and 6.7x cost reduction against ReAct baselines.
  • Plan-and-Act (Erdogan et al., 2025, ICML) demonstrated that training a dedicated Planner model on planning-specific synthetic data outperforms general-purpose models on long-horizon benchmarks — planning is a distinct skill.

Model routing becomes viable: Because the executor’s per-step queries are simpler than the planner’s multi-step reasoning, a cheaper or smaller model can handle execution. RouteLLM (Ong et al., 2024) showed that routing between strong/weak models based on query complexity achieves over 2x cost reduction with negligible quality loss.

Security improves: Plan-then-execute architectures establish control-flow integrity — the plan is fixed before execution begins, limiting the surface area for indirect prompt injection attacks during execution (Del Rosario et al., 2025).

Historical Lineage

The pattern has roots in BDI (Belief-Desire-Intention) agent architecture (Rao & Georgeff, 1995): Desires map to the Planner role (goal selection), Intentions to the Executor role (committed action sequences). The LLM dual-agent pattern inherits this separation but collapses hand-crafted knowledge bases into learned model weights.

When to Use

  • Use when tasks involve multi-step reasoning followed by substantial execution work
  • Use when cost matters — planner runs once; executor runs cheap steps repeatedly
  • Avoid for simple, single-step tasks where the orchestration overhead exceeds the benefit

Sources

  • Xu, Binfeng, et al. (2023). “ReWOO: Decoupling Reasoning from Observations for Efficient Augmented Language Models.” arXiv:2305.18323 [cs.AI]. Available: https://arxiv.org/abs/2305.18323

    • Foundational empirical demonstration that separating planning from execution yields 5x token efficiency and 4% accuracy gain over ReAct-style interleaved loops
  • Kim, Sehoon, et al. (2024). “An LLM Compiler for Parallel Function Calling.” Proceedings of the 41st International Conference on Machine Learning (ICML 2024). arXiv:2312.04511. DOI: https://dl.acm.org/doi/abs/10.5555/3692070.3693047

    • Formalizes Planner→Executor as a DAG-streaming architecture; measures 3.7x latency and 6.7x cost improvement over ReAct
  • Erdogan, Lutfi Eren, et al. (2025). “Plan-and-Act: Improving Planning of Agents for Long-Horizon Tasks.” Proceedings of the 42nd International Conference on Machine Learning (ICML 2025). arXiv:2503.09572. Available: https://arxiv.org/abs/2503.09572

    • Direct planner/executor separation with dedicated training; demonstrates planning is a distinct skill requiring distinct model specialization
  • Ong, Isaac, et al. (2024). “RouteLLM: Learning to Route LLMs with Preference Data.” arXiv:2406.18665 [cs.LG]. Available: https://arxiv.org/abs/2406.18665

    • Empirical foundation for model routing between planning (expensive) and execution (cheap) roles; shows 2x cost reduction with negligible quality loss
  • Del Rosario, Ron F., Klaudia Krawiecka, and Christian Schroeder de Witt (2025). “Architecting Resilient LLM Agents: A Guide to Secure Plan-then-Execute Implementations.” arXiv:2509.08646 [cs.AI]. Available: https://arxiv.org/abs/2509.08646

    • Comprehensive architectural treatment of Plan-then-Execute as a formal design pattern; covers security advantages (control-flow integrity) alongside performance
  • Rao, Anand S. and Michael P. Georgeff (1995). “BDI Agents: From Theory to Practice.” Proceedings of the First International Conference on Multi-Agent Systems (ICMAS-95). San Francisco, CA: AAAI Press, pp. 312–319. Available: https://cdn.aaai.org/ICMAS/1995/ICMAS95-042.pdf

    • Foundational BDI architecture paper establishing the historical lineage of planning/execution separation in autonomous agent design

Note

This content was drafted with assistance from AI tools for research, organization, and initial content generation. All final content has been reviewed, fact-checked, and edited by the author to ensure accuracy and alignment with the author’s intentions and perspective.