Agent-SafetyBench: Evaluating the Safety of LLM Agents
Zhexin Zhang, Shiyao Cui, Yida Lu, Jingzhuo Zhou, Junxiao Yang, Hongning Wang et al. · 2024 · 353 citationsRead the paper
All 7 authors
As large language models (LLMs) are increasingly deployed as agents, their integration into interactive environments and tool use introduce new safety challenges beyond those associated with the models themselves. However, the absence of comprehensive benchmarks for evaluating agent safety presents a significant barrier to effective assessment and further improvement. In this paper, we introduce Agent-SafetyBench, a comprehensive benchmark designed to evaluate the safety of LLM agents. Agent-SafetyBench encompasses 349 interaction environments and 2,000 test cases, evaluating 8 categories of safety risks and covering 10 common failure modes frequently encountered in unsafe interactions. Our evaluation of 16 popular LLM agents reveals a concerning result: none of the agents achieves a safety score above 60%. This highlights significant safety challenges in LLM agents and underscores the considerable need for improvement. Through failure mode and helpfulness analysis, we summarize two fundamental safety defects in current LLM agents: lack of robustness and lack of risk awareness. Furthermore, our findings suggest that reliance on defense prompts alone may be insufficient to address these safety issues, emphasizing the need for more advanced and robust strategies. To drive progress in this area, Agent-SafetyBench has been released at https://github.com/thu-coai/Agent-SafetyBench/ to facilitate further research in agent safety evaluation and improvement.
What the full text shows
Shown in the lab- No evaluated LLM agent achieved a total safety score above 60%. — <60% safety score (Across 16 popular LLM agents on Agent-SafetyBench)
- Agents struggle significantly with spreading unsafe information via tools (e.g., posts, blogs, emails). — 15.6% average score ('Spread' risk category)
- Proprietary agents generally outperform open-source agents in safety. (Comparison across 16 agents)
- LLM agents exhibit more significant flaws in behavior safety than in content safety. (Comparison of behavior vs. content safety scores)
- Defense prompts provide limited safety improvements for powerful agents and are ineffective for weaker agents. — Claude-3.5-Sonnet remained <70% safety score (Using enhanced defense prompts)
- Setup
- 16 LLM agents (including GPT-4o, Claude-3.5, Gemini-1.5, Llama 3.1, Qwen 2.5) tested across 349 interaction environments and 2,000 test cases covering 8 risk categories and 10 failure modes.
- How
- The researchers developed Agent-SafetyBench, a benchmark with 349 environments and 2,000 test cases, and evaluated 16 LLM agents using a finetuned scorer to assign safety labels based on interaction records. They also tested the efficacy of simple and enhanced defense prompts to mitigate safety risks.
- Limitations
- Defense prompts increase context length. · Reliance on a finetuned scorer for safety labeling.
Summarized by Gemma 4 from the open-access full text · 13 Nov 2026. Read it