Abstract
As Large Language Model (LLM) based multi-agent systems (MAS) transition into real-world applications, they face significant security risks from data leaks and malicious memory poisoning. Current systems often operate in a "flat" trust environment, making them vulnerable to topology-based and memory-based attacks. We introduce AgentSafe, a security framework that implements hierarchical data management to establish security clearances for agents. AgentSafe achieves defense success rates over 80% while reducing system overhead by up to 75% through tiered information isolation.
Introduction
Multi-agent systems (MAS) are increasingly used for complex tasks like autonomous coding and corporate assistance. However, these systems lack the robust security protocols found in traditional software. In a typical MAS, agents exchange information freely, creating a massive security gap. Attackers can exploit this openness through two primary vectors:
- Topology-Based Attacks (TBA): Exploiting the network structure to trick agents into leaking sensitive data to unauthorized peers.
- Memory-Based Attacks (MBA): "Poisoning" an agent’s long-term memory with junk data or malicious instructions, leading to factual errors or erratic behavior in subsequent rounds.
Existing single-LLM defenses, such as prompt filtering, fail to address the multi-round social dynamics and distributed memory inherent in MAS.
The AgentSafe Framework
AgentSafe operates as a two-layered defense system designed to mirror real-world corporate security hierarchies.
ThreatSieve (The Bouncer)
ThreatSieve manages all inter-agent communication. It performs Permission Control by verifying if a sender possesses the required security level to interact with a receiver. Additionally, it conducts Message Legitimacy Evaluation, using APIs and LLMs to verify sender identities and prevent impersonation.
HierarCache (The Locked Filing Cabinet)
This novel memory management system organizes data into hierarchical "drawers" based on agent relationships (e.g., Family, Friend, Colleague, Stranger).
HierarCache utilizes a Detection Function to compare incoming information against safety criteria. A "reflection" mechanism periodically scans memory to isolate suspicious or irrelevant data into a "junk memory" layer, preventing adversarial noise from influencing future tasks.
Experimental Setup and Benchmarks
To evaluate AgentSafe, the authors developed two new benchmarks that simulate complex social and corporate environments:
- RIOH (Relationship and Information of Human): Simulates social contexts with four privacy tiers.
- WCEI (Whole Company Employee Information): Simulates corporate hierarchies including Managers, Close Colleagues, and External Partners.
Key Results
High Resilience and Integrity
Under topology-based attacks, AgentSafe maintained a defense success rate above 80%, whereas baseline systems plummeted to as low as 34% by the fifth interaction turn. Furthermore, AgentSafe demonstrated superior memory integrity during long-term interactions.
As shown in the Cosine Similarity Rate (CSR) analysis, AgentSafe maintains integrity levels above 0.65, while baselines drop below 0.4 as attack rounds progress. This suggests that the hierarchical isolation effectively prevents memory poisoning.
System Efficiency
Surprisingly, the addition of security layers improved system performance. By filtering out "junk" and irrelevant information before it reaches the agent's primary memory, AgentSafe reduced token consumption by 60-75%, making the system both safer and more cost-effective.
Conclusion
AgentSafe demonstrates that MAS security is not just about what is said, but who is permitted to know it. By treating information flow as a directed graph with permission levels, the framework provides a scalable, model-agnostic solution for securing complex agent deployments. Future work will focus on refining security boundaries for overlapping social roles and testing the framework in unpredictable, real-world field trials.
Summary updated