A Dynamic Environment to Evaluate Attacks and Defenses for LLM Agents
Low maintenance activity. Last release 13 months ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install agentdojoREADME as published on PyPI with version 0.1.35.
AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents
Edoardo Debenedetti1, Jie Zhang1, Mislav Balunović1,2, Luca Beurer-Kellner1,2, Marc Fischer1,2, Florian Tramèr1
1ETH Zurich and 2Invariant Labs
Quickstart
pip install agentdojo
[!IMPORTANT] Note that the API of the package is still under development and might change in the future.
If you want to use the prompt injection detector, you need to install the transformers extra:
pip install "agentdojo[transformers]"
Running the benchmark
The benchmark can be run with the benchmark script. Documentation on how to use the script can be obtained with the --help flag.
For example, to run the workspace suite on the tasks 0 and 1, with as the LLM, the tool filter as a defense, and the attack with tool knowlege, run the following command: