Architecting Resilient LLM Agents: A Guide to Secure Plan-then-Execute Implementations
On the map: LLM agents and tool use → Agent threats, guardrails and governance
Abstract (arXiv)
As Large Language Model (LLM) agents become increasingly capable of automating complex, multi-step tasks, the need for robust, secure, and predictable architectural patterns is paramount. This paper provides a comprehensive guide to the ``Plan-then-Execute'' (P-t-E) pattern, an agentic design that separates strategic planning from tactical execution. We explore the foundational principles of P-t-E, detailing its core components - the Planner and the Executor - and its architectural advantages in predictability, cost-efficiency, and reasoning quality over reactive patterns like ReAct (Reason + Act). A central focus is placed on the security implications of this design, particularly its inherent resilience to indirect prompt injection attacks by establishing control-flow integrity. We argue that while P-t-E provides a strong foundation, a defense-in-depth strategy is necessary, and we detail essential complementary controls such as the Principle of Least Privilege, task-scoped tool access, and sandboxed code execution. To make these principles actionable, this guide provides detailed implementation blueprints and working code references for three leading agentic frameworks: LangChain (via LangGraph), CrewAI, and AutoGen. Each framework's approach to implementing the P-t-E pattern is analyzed, highlighting unique features like LangGraph's stateful graphs for re-planning, CrewAI's declarative tool scoping for security, and AutoGen's built-in Docker sandboxing. Finally, we discuss advanced patterns, including dynamic re-planning loops, parallel execution with Directed Acyclic Graphs (DAGs), and the critical role of Human-in-the-Loop (HITL) verification, to offer a complete strategic blueprint for architects, developers, and security engineers aiming to build production-grade, resilient, and trustworthy LLM agents.
Key facts. Cited by 6 papers in the map (data through 7 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 0 of its 47 references that are in the map. First posted on arXiv 10 Sep 2025.
Builds on
0 of 47 references.
No references here yet.
Built on by
Citing papers per year: 2025: 3; 2026: 3.
6 papers.
- 2025MAGPIE: A benchmark for Multi-AGent contextual PrIvacy Evaluationcited by 27
- 2025A Survey on Agentic Security: Applications, Threats and Defensescited by 17
- 2025Systematization of Knowledge: Security and Safety in the Model Context Protocol Ecosystemcited by 14
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commitcited by 13
- 2026Architecture Matters for Multi-Agent Securitycited by 3
- 2026STRIATUM-CTF: A Protocol-Driven Agentic Framework for General-Purpose CTF Solvingcited by 1
- 2026Architecture Matters for Multi-Agent Security25 Apr 2026
- 2026STRIATUM-CTF: A Protocol-Driven Agentic Framework for General-Purpose CTF Solving23 Mar 2026
- 2026VIGIL: Defending LLM Agents Against Tool Stream Injection via Verify-Before-Commit9 Jan 2026
- 2025Systematization of Knowledge: Security and Safety in the Model Context Protocol Ecosystem9 Dec 2025
- 2025MAGPIE: A benchmark for Multi-AGent contextual PrIvacy Evaluation16 Oct 2025
- 2025A Survey on Agentic Security: Applications, Threats and Defenses7 Oct 2025
Similar, not cited
Close in wording, no citation either way
- 2026KAIJU: An Executive Kernel for Intent-Gated Execution of LLM Agents
- 2026Toward Secure LLM Agents: Threat Surfaces, Attacks, Defenses, and Evaluation
- 2026PlanFlip: Attacking Multi-Agent LLM Systems via Planning-Phase Prompt Injection
- 2026Autonomous LLM Agents & CTFs: A Second Look
- 2026Securing LLM Agents Need Intent-to-Execution Integrity
- 2026On Understanding, Identifying, and Mitigating Vulnerabilities in Agentic Large Language Models
- 2026Toward Safe LLM Agents: A Survey of Specification, Verification, and Enforcement
- 2026From Agent Loops to Structured Graphs:A Scheduler-Theoretic Framework for LLM Agent Execution