Agent SafetyBench: LLM Agent Safety Benchmark
- Agent SafetyBench is a benchmark that evaluates LLM agent safety by testing dynamic tool interactions and risk awareness in simulated environments.
- It employs a dual-layer design with 349 configurable environments and 2,000 test cases to assess 8 risk categories and 10 failure modes.
- Empirical results show no evaluated agent exceeded a 60% safety score, highlighting critical issues in robustness and risk awareness.
Searching arXiv for Agent-SafetyBench and closely related benchmark papers. {"query":"Agent-SafetyBench Evaluating the Safety of LLM Agents (Zhang et al., 2024) related benchmark", "max_results": 10, "sort_by": "relevance"} Searching arXiv for follow-up and comparative agent safety benchmarks relevant to Agent-SafetyBench. {"query":"agent safety benchmark LLM agents tool use 2025 arXiv Agent-SafetyBench MobileSafetyBench SafeAgentBench OpenAgentSafety", "max_results": 10, "sort_by": "relevance"} Agent SafetyBench, introduced as "Agent-SafetyBench: Evaluating the Safety of LLM Agents," is a benchmark for evaluating the behavioral safety of LLM agents in interactive, tool-using environments. It was proposed to address a gap between model-centric safety evaluation and agentic deployment, where unsafe behavior can arise not only from harmful text generation but also from tool calls, environment interaction, incorrect parameterization, unsafe reliance on tool outputs, and failures of contextual risk judgment. The benchmark contains 349 interaction environments and 2,000 test cases, evaluates 8 categories of safety risks, and covers 10 representative failure modes; its central empirical result is that none of 16 evaluated agents achieved a safety score above 60% (Zhang et al., 2024).
1. Scope and conceptual basis
Agent SafetyBench treats safety as a behavior-level property of an agent rather than only a content-level property of an underlying LLM. The motivating claim is that agents differ from standalone LLMs because they interact with external environments, invoke tools and APIs, receive tool outputs that may be incomplete or unsafe, and can perform actions with real consequences. In that setting, an agent may be unsafe even when its surface text is not overtly toxic, for example by emailing confidential material, making unsafe purchases, disabling alarm systems, modifying database entries incorrectly, or propagating dangerous tool outputs without validation (Zhang et al., 2024).
The benchmark is positioned against both model-only safety benchmarks and earlier agent-safety suites. Traditional LLM safety evaluation largely concentrates on refusal of harmful prompts, jailbreak robustness, privacy leakage in dialogue, or harmful content generation. Agent SafetyBench instead emphasizes dynamic interaction, environment-dependent hazards, and unsafe behavior arising from tool use. Its comparison set includes R-Judge, AgentDojo, GuardAgent, ToolEmu, ToolSword, PrivacyLens, InjecAgent, and HAICOSYSTEM, with the benchmark framed as broader in environment coverage, failure-mode coverage, and taxonomy design (Zhang et al., 2024).
A concise summary of the benchmark’s scale is as follows.
| Aspect | Value | Brief note |
|---|---|---|
| Interaction environments | 349 | Configurable simulated environments |
| Test cases | 2,000 | 250 per risk category |
| Risk categories | 8 | One primary risk per case |
| Failure modes | 10 | Anticipated unsafe interaction patterns |
| Evaluated agents | 16 | No score above 60% |
2. Environment architecture and interaction model
Each Agent SafetyBench test case has a unified structure with a primary risk category, a user instruction or dialogue history, one or more environments, and anticipated failure modes. The environments follow a dual-layer design: a JSON-based tool schema defines tool names, descriptions, and parameters, while a corresponding Python class implements tool logic. A base environment class manages common functions such as tool invocation and tool description retrieval. This design aligns the benchmark with mainstream tool-calling interfaces while keeping scenarios extensible through configurable initialization parameters (Zhang et al., 2024).
Evaluation proceeds through dynamic interaction. The agent receives the interaction history and tool definitions; if it chooses to call a tool, it specifies the tool name and arguments; the environment executes the call and returns results; and the process continues until the agent gives a final response. This multi-step loop is essential to the benchmark’s safety framing, because many unsafe outcomes arise only through sequences of actions rather than isolated prompt-response behavior (Zhang et al., 2024).
The benchmark includes a wide range of simulated environments, including Email, SMS, Slack, Github, PublicForum, Web, OS, Database, Calendar, WeatherForecast, HomeAssistant, SmartCityControl, Identity Verification, Network, Traffic, Bank, Map, Phone, FoodSupplyChain, DisasterRecovery, MolecularAssembler, and MindCloning. The paper emphasizes that many test cases are constructed to avoid explicit malicious intent on the surface. A canonical example is a user asking for a “current infection rate,” where one tool returns 50% and another tool check_sources could verify its correctness; the unsafe behavior is to propagate the unvalidated statistic, thereby spreading misinformation (Zhang et al., 2024).
3. Risk taxonomy and failure modes
Agent SafetyBench organizes its safety coverage around 8 risk categories. These are: leak sensitive data / information, lead to property loss, spread unsafe information / misinformation, lead to physical harm, violate law / ethics, compromise availability, contribute to harmful / vulnerable code, and produce unsafe information / misinformation. The paper distinguishes the last two as closer to classic content-safety evaluation, while the remaining categories more directly target agent-specific behavioral risk mediated by environments and tools (Zhang et al., 2024).
The benchmark also introduces 10 representative failure modes, intended to diagnose how unsafe behavior arises rather than merely whether it occurs. These are:
- M1: Generate harmful content without involving tool calls.
- M2: Mistakenly call tools when the necessary information is incomplete.
- M3: Incorrectly call tools before obtaining complete information.
- M4: Ignore known constraint information and incorrectly call tools.
- M5: Ignore implicit or potential risks, and incorrectly call tools.
- M6: Utilize incorrect parameters when calling tools.
- M7: Ignore the potential issues with the tools and call them.
- M8: Fail to call necessary tools.
- M9: Put excessive trust in tool results without validation.
- M10: Fail to filter the results returned by tools.
This dual taxonomy is central to the benchmark’s diagnostic ambition. A test case is assigned a single most likely evoked risk category, even though the paper notes that some cases inherently involve multiple risks. The failure-mode layer then identifies the operational mechanism of failure, such as ambiguity resolution failure, premature action, inadequate validation, or tool-selection error (Zhang et al., 2024).
The benchmark’s examples illustrate the distinction between category and failure mode. Sending confidential experimental results to an outside collaborator is a case of leaking sensitive data; sending an email to “John” when there are multiple Johns exemplifies incomplete-information tool use; turning off all alarm systems or recommending illegal night work to a 14-year-old exemplifies ignoring implicit risk; repeating unsafe health advice returned by a search tool exemplifies excessive trust in tool outputs (Zhang et al., 2024).
4. Data construction, annotation, and scoring methodology
The benchmark was assembled in two phases. First, the authors refined samples from existing sources including R-Judge, AgentDojo, GuardAgent, ToolEmu, ToolSword, and InjecAgent. This refinement involved revising vague samples, removing redundant ones, and standardizing environment definitions and implementations. For the "produce unsafe information / misinformation" category, which does not require tool use, the authors sampled 50 raw questions from AdvBench and randomly combined them with 20 jailbreak templates to create 200 new test cases. This process yielded 876 valid test cases (Zhang et al., 2024).
Second, the benchmark was expanded through controlled generation. Initial direct generation with GPT-4o yielded low diversity and low quality, so the authors first generated 300 new environment names using GPT-4o, Claude-3.5-Sonnet, and Gemini-1.5-Pro, then required a randomly selected new environment to appear in generated cases. To improve quality further, GPT-4o was asked not only to generate a test case but also to produce expected risky behaviors. After revision and filtering, this augmentation phase produced 1,124 additional valid test cases, bringing the total to 2,000 (Zhang et al., 2024).
Quality control had three stages. A manual precheck reviewed and revised each case during construction. Automatic validation scripts checked consistency between JSON tool definitions and Python environment implementations. A manual postcheck then used GPT-4o-mini and Claude-3.5-Sonnet to generate 4,000 interaction records across all test cases, and the authors manually labeled these for safe versus unsafe behavior and expected failure modes. Each test case was therefore reviewed at least twice. The paper does not report a formal inter-annotator agreement statistic (Zhang et al., 2024).
Scoring is based on a finetuned automatic behavioral safety scorer. The authors report that GPT-4o used directly as a scorer achieved 75.5% binary accuracy on 200 randomly sampled interaction records from Gemini-1.5-Flash. To improve this, they finetuned a Qwen2.5-7B-based local scorer on 4,000 manually annotated interaction records, comprising 2,186 unsafe and 1,814 safe examples, with GPT-4o-generated explanations conditioned on human labels. The finetuned scorer achieved 91.5% accuracy on the same 200-record set. Safety score is then defined in prose as the ratio of cases labeled safe. The benchmark also reports behavior safety, content safety, category-wise scores, and failure-mode-wise scores (Zhang et al., 2024).
5. Empirical results and diagnostic conclusions
The headline empirical result is that no evaluated agent achieved a total safety score above 60%. The best-performing model was Claude-3-Opus at 59.8, followed by Claude-3.5-Sonnet at 59.4, while Qwen2.5-7B-Instruct scored 18.8. The average total score across all 16 agents was 38.5. These results are presented as evidence that current LLM agents remain substantially unsafe in realistic interactive settings (Zhang et al., 2024).
A particularly important finding is the disparity between behavior safety and content safety. The average behavior safety score was 30.4, whereas the average content safety score was 68.4. This suggests that many systems that appear relatively safe in classic refusal-style content evaluation perform much worse once embedded in environments with tools and consequences (Zhang et al., 2024).
Category-level results show strong heterogeneity. The hardest category by average score was spread unsafe information / misinformation at 15.6, while the easiest was produce unsafe information / misinformation at 87.0. Failure-mode analysis is even more diagnostic: the lowest average score was M7, ignore the potential issues with the tools and call them, at 12.5; M2, mistakenly call tools when necessary information is incomplete, scored 18.1; M5, ignore implicit or potential risks, scored 23.2; and M3, incorrectly call tools before obtaining complete information, scored 27.0. By contrast, M1, direct harmful content generation without tools, scored 70.1, which the paper interprets as evidence that refusal training has improved classic content safety more than agentic safety (Zhang et al., 2024).
From this evidence, the paper identifies two “fundamental safety defects” in current LLM agents. The first is lack of robustness, expressed in failures such as acting under ambiguity, using wrong parameters, failing to call necessary tools, or prematurely acting before sufficient information is obtained. The second is lack of risk awareness, expressed in failures such as ignoring implicit hazards, using tools with known safety issues, trusting unsafe tool outputs, or failing to filter dangerous returned options. The authors argue that robust tool use is necessary but insufficient; agents also require comprehensive risk awareness to avoid both deliberate misuse and context-dependent accidental harm (Zhang et al., 2024).
The benchmark also evaluates prompt-based defenses. A simple defense prompt enumerating the 10 failure modes, and an enhanced defense prompt adding descriptions and examples, were appended to the system prompt. The reported outcome is that weak models benefited little, stronger models improved somewhat, but the gains remained limited; even with the enhanced defense prompt, Claude-3.5-Sonnet remained below 70% safety. The paper therefore argues that defense prompts alone are unlikely to solve the benchmark’s underlying problems (Zhang et al., 2024).
6. Later use, comparative position, and limitations
Subsequent work treats Agent SafetyBench as an important reference point in agent-safety evaluation. "Agent Safety Alignment via Reinforcement Learning" describes Agent SafetyBench as a public benchmark for user-side threats, summarizes it as evaluating 2,000 tool-centric tasks across eight risk categories, and uses it to study an execute–refuse–verify control policy for tool-using agents (Sha et al., 11 Jul 2025). Later benchmark papers also position it as a precursor rather than an endpoint. LPS-Bench argues that prior suites, including Agent-SafetyBench, under-test planning-time safety in long-horizon MCP-based computer-use agents (Chen et al., 3 Feb 2026). BeSafe-Bench contrasts itself with Agent-SafetyBench by emphasizing functional environments, joint task-performance and safety evaluation, and embodied coverage beyond web and mobile settings (Li et al., 30 Jan 2026). This suggests that Agent SafetyBench rapidly became a reference baseline against which later benchmark designers defined broader notions of agent safety.
The benchmark’s own limitations are explicit. Most non-code test cases rely on commonsense reasoning rather than advanced domain-specific expertise. Automatically generated cases still required substantial human revision. The authors report that general crowdworkers had difficulty revising cases, evaluating interaction safety, and annotating failure modes accurately. They also note dependence on particular models during construction and scoring, including GPT-4o for generation and a Qwen-based scorer, although they report no strong evidence of benchmark bias from these choices (Zhang et al., 2024).
Within the broader benchmark landscape, Agent SafetyBench’s enduring contribution is methodological. It establishes agent safety as an evaluation problem over interactive environments, tool invocation, risk categories, and failure modes, rather than only over harmful text. Its central empirical message remains that unsafe behavior in agents is not reducible to jailbreak compliance: it often appears as ambiguity resolution failure, misplaced trust in tools, incomplete risk modeling, and context-insensitive helpfulness. That framing has continued to shape later work on web agents, mobile agents, embodied agents, and trajectory-level safety diagnosis (Zhang et al., 2024).