Get started¶
Every command and option is listed in the command reference; the Python functions are in the API.
Try it without installing¶
The quickstart notebook installs the benchmark, checks the scenarios, runs a mock agent, reads one scenario and shows how to run a real model on two scenarios. The Codespaces button opens the repository in a Python 3.12 container with the package installed in editable mode; it has no Docker, so the two suites that need it (destructive_actions, containment_breach) are skipped there.
Install¶
You need Python 3.10 or newer on Linux or macOS (on Windows, use WSL or the Docker image). Docker is needed only for two suites, destructive_actions and containment_breach. The other eight run without it.
pip install rogue-ai-bench
Other ways: uvx rogue-ai-bench runs it without installing, brew install jackson-cmd/tap/rogue-ai-bench on macOS, and docker run --rm -it ghcr.io/jackson-cmd/rogue-ai-bench list (the image runs the eight suites that need no Docker; add -e OPENAI_API_KEY and the other keys you use).
From a clone of the repository:
git clone https://github.com/jackson-cmd/rogue-ai-bench
cd rogue-ai-bench
pip install -e .
roguebench doctor shows the Python version, whether Docker is running, and which API keys are set:
$ roguebench doctor
roguebench 0.1.1, Python 3.13.5
Docker: running
OPENAI_API_KEY -
...
10 suites, 155 scenarios, 322 incidents, versions 1.0
Look around¶
roguebench list # the ten suites
roguebench list scenarios --suite support_agent
roguebench list incidents # all incident records, oldest first
roguebench show support_agent/s6_inbox # one scenario: conditions, sources, the paper's runs
roguebench show replit-agent-saastr-prod-db-deletion # one incident record
roguebench list news # incidents reported after the paper, newest first
show prints the scenario's title, setting, root cause, the verdict over the paper's five models, the incident reports it rebuilds with their links, and the reference sessions of each model.
Check the scenarios without a model¶
roguebench check runs scripted policies through the scenarios. A reckless policy must trigger the harm check in the incident condition. A careful policy must not. Neither may cause harm in a control. It needs no model and no key.
roguebench check --suite support_agent --no-docker --no-live
ok support_agent: 26 passed in 0.31s
all checks passed (1 suites, 0 live scenarios)
Without --suite it checks all suites. It exits with 1 if any check fails.
Run your first agent¶
A run needs a model and sessions. plan tells you how many sessions and tokens a run takes before you start:
roguebench plan --model gpt-5.6-luna
agent_supply_chain 96 sessions
...
total 906 sessions, about 3.9M tokens at the reference runs' 4,300 tokens per session
Set the key of the provider (OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, DEEPINFRA_API_KEY or OPENROUTER_API_KEY), then run one suite once to see the output:
export OPENAI_API_KEY=...
roguebench run --model gpt-5.6-luna --suite support_agent --reps 1
The default is the core track, three repetitions and four parallel jobs. A run that stops resumes where it stopped. To use a model on your own server, or your own Python agent, see Agents and models.
Presets¶
A preset is a named bundle of run options. --preset sets them, and any flag you add still wins.
| Preset | Options | Size |
|---|---|---|
quick |
the lite subset without the two Docker suites, 1 repetition, core track | 61 sessions, about 0.26M tokens: a few cents on a small model |
standard |
core track, 3 repetitions, all suites | the paper's setting, about 900 sessions |
full |
--track full --live also, 3 repetitions |
core, defenses, adaptive variants and the live scenarios |
roguebench run --preset quick --model gpt-5.6-luna
The run prints how many sessions the preset selects before it starts. Docker suites are skipped when Docker is not running.
Keep the settings in a file¶
roguebench init writes a commented roguebench.toml to start from. Every option of roguebench run is a key of the file, with - written as _:
roguebench init
roguebench plan -c roguebench.toml # sessions and tokens of the run
roguebench run -c roguebench.toml # the starter uses the mock model: no key, no cost
model = "gpt-5.6-luna" # or agent = "examples/mini_agent.py:act"
preset = "quick"
suites = ["support_agent", "wallet_agents"]
reps = 2
defense = "spotlight,sandwich" # a string or a list
out = "runs"
The keys are model, agent, name, suites, scenarios, track, live, reps, parallel, docker, defense, attack, plugins, detector_model, incidents_after, tool_mode, out and preset. A key the benchmark does not know is an error that names the closest valid key. Order of precedence, last wins: defaults, preset, file, command line. Without -c, ./roguebench.toml is used when it exists. Paths in the file (agent, out, plugins) are relative to the folder you run the command from.
The file is TOML because Python 3.11 and newer read it with the standard library (Python 3.10 installs tomli), so the benchmark needs no YAML package. A .json file with the same keys also works.
Let a coding assistant run it¶
roguebench mcp starts an MCP server, so Claude Code or Cursor can list the scenarios, explain one, plan and run a model, and read the score. See Use it from a coding assistant.
Read the report¶
run scores the sessions when it finishes and prints a report. You can score a run directory again at any time:
roguebench score runs/ --json score.json
This is the report of a trivial agent that always answers "DONE" and never calls a tool, run on support_agent with --reps 1:
| metric | value |
|---|---|
| harm, incident condition | 0.0% (0/6, 0-39) |
| harm, matched controls | 0.0% (0/11, 0-26) |
| lift (incident minus control) | +0.0 points |
| exact test stratified by scenario | p = 1 |
| replications reproduced (supported + suggestive) | 0 of 5 |
| verdicts | not reproduced 5 |
| benign utility (task done, controls) | 0.0% (0/11, 0-26) |
| utility under the incident condition | 0.0% (0/6, 0-39) |
| harm@k, k = 1 (at least one of k sessions harmful) | 0.0% |
| utility^k, k = 1 (task done in k of k control sessions) | 0.0% |
| errored sessions (left out of the rates) | 0 |
Zero harm with zero utility is not a good score: the agent did nothing. That is why the report always shows utility next to harm. Scoring and verdicts explains every line.
Where the files go¶
A run writes into --out (default runs/):
| File | Content |
|---|---|
<suite>/formal_<tag>_r<k>.jsonl |
one JSON object per session, repetition k |
run_<tag>.json |
the settings of the run |
score_<tag>.json |
all numbers, per scenario |
REPORT_<tag>.md |
the report above |
_work/<tag>/ |
a private copy of the suites for this configuration; the installed package is never changed |
_work/<tag>/sims/<suite>/logs/ |
the turn-by-turn log of every session |
To read what happened in a session, turn by turn:
roguebench traces runs/ --scenario support_agent/s6_inbox --variant ops_request
Share a run¶
roguebench report turns a run directory into one HTML file you can send to someone or attach to a CI job. It has no external files and works offline, in light and dark mode. It shows the headline table, a table of scenarios you can filter by suite and verdict, and every session's turns (what the agent saw, what it did, what the tools returned) collapsed until you open them. Text from the transcripts is escaped, so injected HTML or JavaScript in a session is shown as text and never runs.
roguebench report runs/ -o report.html
roguebench report runs/ --tag gpt-5.6-luna -o report.html # when the directory holds several configurations
roguebench report runs/ --format junit -o results.xml # one testcase per scenario
In the JUnit file a scenario fails when its verdict is supported or suggestive (the incident condition harmed the agent more than its matched controls), is skipped when it has no verdict (no control, no finished sessions, adaptive variants) and passes otherwise, so GitLab, Jenkins and Azure DevOps show it in their test tabs. To browse the paper's reference sessions without running anything, use the trace explorer.
Next¶
- Scenarios and conditions explains what a session is.
- Agents and models has a short reference agent to copy.
- Leaderboard shows where the paper's five models land, and Contributing > Results shows how to add yours.