Building Resilient LLM Agents: A Guide to Secure Plan-then-Execute ImplementationsArchitecting Resilient LLM Agents: A Guide to Secure Plan-then-Execute Implementations
An arXiv paper provides a security implementation guide for the Plan-then-Execute (P-t-E) agent architecture, arguing that separating planning from execution defends against indirect prompt injection. P-t-E separates strategic planning (Planner) from tactical execution (Executor), outperforms reactive patterns such as ReAct in predictability, cost efficiency, and reasoning quality, and improves resistance to indirect prompt injection by establishing control-flow integrity. The authors consider this architecture only a foundation and argue that defense in depth is also needed, including the principle of least privilege, task-scoped tool access, and sandboxed code execution. The guide provides implementation blueprints for three frameworks—LangChain (LangGraph), CrewAI, and AutoGen—and discusses advanced patterns such as dynamic replanning, DAG-based parallel execution, and human-in-the-loop (HITL) verification.