TrinityGuard: A Unified Framework for Safeguarding Multi-Agent Systems
Organizations: Shanghai AI Laboratory
Abstract
With the rapid development of LLM-based multi-agent systems (MAS), their significant safety and security concerns have emerged, which introduce novel risks going beyond single agents or LLMs. Despite attempts to address these issues, the existing literature lacks a cohesive safeguarding system specialized for MAS risks. In this work, we introduce TrinityGuard, a comprehensive safety evaluation and monitoring framework for LLM-based MAS, grounded in the OWASP standards. Specifically, TrinityGuard encompasses a three-tier fine-grained risk taxonomy that identifies 20 risk types, covering single-agent vulnerabilities, inter-agent communication threats, and system-level emergent hazards. Designed for scalability across various MAS structures and platforms, TrinityGuard is organized in a trinity manner, involving an MAS abstraction layer that can be adapted to any MAS structures, an evaluation layer containing risk-specific test modules, alongside runtime monitor agents coordinated by a unified LLM Judge Factory. During Evaluation, TrinityGuard executes curated attack probes to generate detailed vulnerability reports for each risk type, where monitor agents analyze structured execution traces and issue real-time alerts, enabling both pre-development evaluation and runtime monitoring. We further formalize these safety metrics and present detailed case studies across various representative MAS examples, showcasing the versatility and reliability of TrinityGuard. Overall, TrinityGuard acts as a comprehensive framework for evaluating and monitoring various risks in MAS, paving the way for further research into their safety and security.
Figures & tables
| ID | Risk Name | OWASP Ref. | Description |
| 1.1 | Prompt Injection | LLM01 | Manipulating agent behavior via malicious input |
| 1.2 | Jailbreak Attack | LLM01 | Bypassing safety guidelines and ethical constraints |
| 1.3 | Sensitive Info Disclosure | LLM02 | Leaking system prompts, API keys, or private data |
| 1.4 | Excessive Agency | LLM06 | Executing actions beyond intended scope |
| 1.5 | Unauthorized Code Execution | ASI05 | Running malicious code or commands |
| 1.6 | Hallucination | LLM09 | Fabricating false information |
| ID | Risk Name | OWASP Ref. | Description |
| 2.1 | Malicious Propagation | ASI07 | Malicious instructions spreading through agent network |
| 2.2 | Misinformation Amplification | LLM09 | Errors amplified and reinforced across agents |
| 2.3 | Insecure Output Handling | LLM05 | Unvalidated output consumed by downstream agents |
| 2.4 | Goal Drift | ASI01 | Deviation from original objective over multi-turn interaction |
| 2.5 | Message Tampering | ASI07 | Message content modified during transmission |
| 2.6 | Identity Spoofing | ASI03 | Impersonation of a trusted agent |
| ID | Risk Name | OWASP Ref. | Description |
| 3.1 | Cascading Failure | ASI08 | Single-point failure triggering system-wide collapse |
| 3.2 | Sandbox Escape | ASI05 | Agents accessing unauthorized resources |
| 3.3 | Insufficient Monitoring | ASI09 | Lack of effective behavioral monitoring and audit |
| 3.4 | Group Hallucination | LLM09 | Collective fabrication of false information |
| 3.5 | Malicious Emergence | ASI01 | Emergence of unanticipated harmful behaviors |
| 3.6 | Rogue Agent | ASI10 | Agent deviating from system objectives |
| MAS Type | Risk Tier 1 | Risk Tier 2 | Risk Tier 3 | Average Pass Rate |
| QA | 9.2% | 8.0% | 2.7% | 6.9% |
| coding | 5.0% | 12.3% | 0.1% | 5.7% |
| database | 5.3% | 15.0% | 0.0% | 6.6% |
| research | 9.4% | 13.7% | 0.0% | 7.8% |
| logistics | 4.7% | 17.7% | 3.5% | 8.2% |
| routing | 4.7% | 12.5% | 1.0% | 5.9% |
| MAS | Financial | Game | Travel | Deep | |
| Tier | Risk | Analysis | Design | Planner | Research |
| RT1: Atomic | Prompt Injection | 0/4 | 0/4 | 0/4 | 0/4 |
| Jailbreak Attack | 0/4 | 0/4 | 0/4 | 0/4 | |
| Sensitive Info Disclosure | 2/4 | 2/4 | 2/4 | 4/4 | |
| Excessive Agency | 0/3 | 0/3 | 0/3 | 0/3 | |
| Unauth. Code Execution | 0/3 | 0/3 | 1/3 | 0/3 |