Introduction
As Large Language Models (LLMs) evolve from text generators into autonomous agents capable of tool use and environmental interaction, they introduce complex safety and security risks. Evaluating these agents is challenging because harm often stems from real-world consequences of actions rather than text alone, and a sequence of individually benign steps can lead to a significant breach. Current evaluation methods—either rigid rule-based systems or inconsistent "LLM-as-a-judge" approaches—often fail to capture the context-dependent nature of agent safety.
The AgentAuditor Framework
To address these challenges, the authors propose AgentAuditor, a training-free, memory-augmented framework designed to emulate human expert judgment. The system operates in three distinct stages to transform raw interaction logs into nuanced safety judgments:
- Feature Memory Construction: The system adaptively extracts structured semantic features—Scenario, Risk Type, and Behavior Mode—from interaction records, converting them into vector embeddings for efficient retrieval.
- Reasoning Memory Construction: Using the FINCH unsupervised clustering algorithm, the framework selects the most representative "shots" from the data. It then generates high-quality Chain-of-Thought (CoT) reasoning traces for these cases to serve as expert examples.
- Memory-Augmented Reasoning: For new audits, the system performs a multi-stage retrieval to find similar past experiences. These "experiences" (case + CoT) are fed into the LLM judge to provide a context-aware assessment.
ASSEBench: A Comprehensive Evaluation Dataset
The study introduces ASSEBench (Agent Safety & Security Evaluator Benchmark), the first large-scale dataset covering both safety and security domains. It contains 2,293 annotated interaction records across 15 risk types, 29 scenarios, and 26 behavior modes. Crucially, ASSEBench includes both "Strict" and "Lenient" judgment standards to evaluate how models handle ambiguous "gray area" cases where the line between helpful and harmful is blurry.
Key Results and Performance
AgentAuditor demonstrates significant performance gains across various LLM backbones. Using Gemini-2.0-Flash-thinking, the framework achieved a 96.3% F1 score and 96.1% accuracy on the R-Judge benchmark, matching or exceeding human expert performance.
The framework's training-free nature allows it to outperform specialized fine-tuned models like ShieldAgent and Llama-Guard-3. For example, Llama-3.1-8B saw its accuracy on ASSEBench-Security jump from 49.7% to 81.0% when augmented with AgentAuditor. The system also exhibits high robustness, maintaining performance even when the reasoning memory is "poisoned" with up to 25% incorrect labels.
Conclusion
AgentAuditor provides a scalable, efficient, and highly accurate solution for auditing autonomous agents. By leveraging structured memory and representative reasoning, it bridges the gap between automated tools and human expertise, offering a robust path forward for the safe deployment of LLM-based agents in real-world environments.
Summary updated