AgentDojo
ETH Zurich benchmark environment for prompt-injection attacks and defenses on tool-using LLM agents, with suites like workspace, banking, travel and slack.
Tags
Description
Runs agents on realistic user tasks while injected tool outputs try to hijack them, measuring both utility and attack success for combinations of models, attacks and defenses (e.g. a tool filter or prompt-injection detector). pip install agentdojo; run with python -m agentdojo.scripts.benchmark. Paper: arXiv:2406.13352 (NeurIPS 2024 Datasets & Benchmarks); results are published on the docs site. The README notes the package API is still under development.
Related
- garak: NVIDIA's open-source LLM vulnerability scanner probing for hallucination, data leakage, prompt injection, jailbreaks, toxicity and other weaknesses.
- PyRIT: Microsoft's open-source Python Risk Identification Tool for proactively red teaming generative AI systems.
- DeepTeam: Open-source framework from Confident AI to red team LLMs and AI agents.
- τ-bench (tau2-bench): Sierra's benchmark for tool-agent-user interaction (airline, retail, telecom), now in six languages and full-duplex voice with v2.0.
- Inspect: Open-source framework for large language model and agent evaluations from the UK AI Security Institute.
Guides & comparisons
- Screen tool and web output for prompt injection before your agent reads it (Guide): Put a check between untrusted tool results and the model: Llama Prompt Guard 2 for injection attempts, LlamaFirewall's scanners for hidden text and generated code, and Llama Guard for content safety. Includes a tested screening wrapper and the limits of each layer.
- Test a tool-using agent for prompt injection with AgentDojo (Guide): Measure how often injected tool outputs hijack your agent. Run AgentDojo's built-in suites from the CLI, wire your own model or agent loop in as a pipeline, read utility, utility under attack and targeted attack success, then compare defenses.
- Runtime guardrails for agents: Guardrails AI, NeMo Guardrails, Invariant and HOL Guard (Comparison): Four open-source guardrail layers compared: where each one sits, what a rule looks like, whether it can check tool calls, which checks need a model, what leaves your machine and how actively each is maintained. All four were installed and run on 2026-11-01.
Sources
- https://github.com/ethz-spylab/agentdojo
- https://agentdojo.spylab.ai/
- https://arxiv.org/abs/2406.13352
Machine-readable
- JSON
- Markdown
- Source file on GitHub (edit via pull request)