Shanghai AI Lab's TrinityGuard Exposes Multi-Agent AI Systems Failing 93% of Security Tests
A new open-source framework audits LLM multi-agent systems against 20 OWASP-grounded risks, revealing average pass rates of just 7.1 percent.
ProTakeaways
- Shanghai AI Lab released TrinityGuard, an open-source safety framework for LLM-based multi-agent systems.
- Defines 20 risk types across three tiers: atomic, inter-agent communication, and system-level emergent risks.
- Grounded in OWASP Top 10 for Agentic Applications and OWASP Top 10 for LLMs.
- Three-layer architecture works across AutoGen, LangGraph, CrewAI via a single
BaseMASabstraction. - Across 300 synthesized workflows, average pass rate was 7.1 percent, with Tier 3 system risks at 1.3 percent.
- Supports both pre-deployment penetration testing and runtime monitoring using the same judge logic.
Multi-agent systems built on LLMs are moving from research demos into production workflows, coordinating coding assistants, research agents, and financial analysts. But when several autonomous agents share memory, delegate tasks, and route messages to each other, the attack surface stops looking like a single chatbot and starts looking like a distributed system with reasoning bugs. A team from Shanghai AI Laboratory has released TrinityGuard, a framework that tries to systematically stress-test these systems, and the initial numbers are not flattering.
Why single-agent safety tools miss the point
Existing agent safety benchmarks like AgentHarm and R-Judge largely treat an agent as an isolated entity. Beyond the known risks in individual LLMs or agents, such as producing harmful or hallucinated contents, multi-agent systems pose significantly more novel risks to be addressed. A jailbreak that fails on one agent can succeed after being relayed by a trusted intermediate agent. A hallucination from one model can be reinforced by peers and turned into confident group consensus. Identities can be spoofed inside message channels that were never designed with authentication in mind.
The authors argue these threats are hierarchical, and that a safeguarding tool needs to reflect that structure rather than emit a single scalar safety score. The OWASP Agentic AI Top 10 standard has begun to codify these threats, but standardized tooling for systematically evaluating and monitoring them across heterogeneous MAS deployments remains largely unaddressed.
Twenty risks organized into three tiers
TrinityGuard's core contribution is a taxonomy of 20 risk types grouped into three tiers, each grounded in specific OWASP LLM and Agentic AI references:
- Tier 1 (Atomic, 8 risks): Prompt injection, jailbreaking, sensitive info disclosure, excessive agency, unauthorized code execution, hallucination, memory poisoning, tool misuse. Evaluated per agent in isolation.
- Tier 2 (Communication, 6 risks): Malicious propagation, misinformation amplification, insecure output handling, goal drift, message tampering, identity spoofing. Evaluated per channel between agent pairs.
- Tier 3 (System, 6 risks): Cascading failure, sandbox escape, insufficient monitoring, group hallucination, malicious emergence, rogue agent. Evaluated over full execution trajectories.

Group hallucination is a good example of why the tiers matter. It is not just each agent making things up. It is a consensus dynamic where agents validate each other's fabrications, producing confident but entirely fictitious outputs that appear more credible due to apparent multi-source agreement. That failure mode simply cannot be caught by probing a single model with a static prompt.
Three decoupled layers under the hood
The framework itself is built as three architectural layers so that safety logic stays portable across orchestration libraries:
- MAS Abstraction Layer: A
BaseMASinterface that abstracts over AutoGen/AG2, LangGraph, CrewAI, and similar frameworks. Adding a new platform means implementing this one interface. - Intermediary Layer: Framework-agnostic primitives for injecting adversarial stimuli (direct messages, fabricated inter-agent messages, poisoned memory, malicious tools, spoofed identities) and for structured logging of every message, tool call, and state transition.
- Safety Evaluation Layer: One risk test module per risk type, each containing a static payload corpus, an LLM-based adaptive probe generator, the sequence of interventions needed to run the attack, and a judge prompt. Each risk also has a paired monitor agent for runtime alerts.
A shared LLM Judge Factory decides verdicts for both modes using risk-specific policy prompts, which means the same safety logic runs in pre-deployment penetration-testing mode and runtime monitoring mode over live traffic.
The numbers are ugly
The team synthesized 300 multi-agent workflows using EvoAgentX across seven domains (QA, coding, database, research, logistics, routing, scheduling) and ran the full TrinityGuard pipeline against each one. Pass rate is the fraction of adversarial test cases the system successfully defended against.
| MAS Type | Tier 1 | Tier 2 | Tier 3 | Average |
|---|---|---|---|---|
| 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% |
| Scheduling | 9.4% | 13.2% | 2.1% | 8.3% |
| Average | 6.8% | 13.2% | 1.3% | 7.1% |
System-level risks are the worst by a wide margin, with database and research MAS scoring 0.0% against Tier 3 attacks. Case studies on four official AG2 example applications (Financial Analysis, Game Design, Travel Planner, Deep Research) reinforced the pattern: prompt injection and jailbreak passed 0 out of 4 tests everywhere, and identity spoofing landed between 0 and 12 percent because none of the systems have real sender authentication.

One interesting bright spot: the Deep Research agent's hierarchical reviewer pattern hit 75% pass rate on hallucination and 25% on cascading failure, compared to zeros for the other three systems. That is a small piece of empirical evidence that adding an explicit reviewer role is more than cosmetic when it comes to system-level resilience.
Getting your hands on it
The code is open source on GitHub. All 20 risks are implemented with complete test and monitor coverage, and a unified Judge system provides LLM-powered analysis with pattern-matching fallback. The plug-in architecture is the practical selling point here. If you are working on an AutoGen or LangGraph pipeline, you extend the BaseMAS abstraction and inherit all 20 risk modules without touching the safety logic.
Two caveats worth flagging. First, verdicts depend on an LLM judge, so systematic biases in the judge model will propagate into the safety scores. The authors note this and propose adding a human-review interface for borderline cases. Second, TrinityGuard is diagnostic, not corrective. It surfaces vulnerabilities and issues alerts, but it does not yet automatically filter messages or isolate compromised agents. Automated remediation is on the roadmap, alongside stronger adversarial probe generation using techniques like GCG-style optimization and multi-turn red-teaming.
For anyone shipping multi-agent workflows into production, the more sobering takeaway is not the framework itself but the baseline it establishes. A 7.1% average pass rate across 300 synthesized systems suggests that out-of-the-box orchestration is currently unsafe for adversarial environments, and that the interesting engineering work now is in the plumbing between agents, not just the prompts inside them.