Reproduce “AgentSys: Secure and Dynamic LLM Agents Through Explicit Hierarchical Memory Management” on OpenResearch
Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Ruoyao Wen, Hao Li, Chaowei Xiao, Ning Zhang
AGENTSYS introduces a framework for LLM agents that uses explicit hierarchical memory management, inspired by operating system principles, to prevent the accumulation of untrusted external content. This architectural approach significantly enhances security against prompt injection attacks, achieving an Attack Success Rate (ASR) as low as 0.78% on the AgentDojo benchmark, while also improving task completion utility, particularly for complex, long-horizon tasks.
Key insights
- The indiscriminate accumulation of all interaction history into an LLM agent's context window is a fundamental architectural vulnerability that compromises both security against prompt injection and the agent's utility.
- Adopting an explicit, hierarchical memory management approach, analogous to process memory isolation, effectively reduces the attack surface and prevents attack persistence while simultaneously improving the LLM's focus and reasoning efficiency.
- A balanced defense involves not just memory isolation but also selective, event-triggered validation for high-risk operations (e.g., command tools) and a bounded recovery mechanism to maintain utility when potential threats are detected.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.