Inspect sandbox provider for running AI model evals on Rogue Arena cyber ranges
pip install inspect-rogue-arena Copy PIP instructions
Support for running Rogue Arena evals from Harbor is in development.
Get access. Running evals needs a Rogue Arena account on a team with model-eval access. Access is not self-service: to get access to our library of ready-built cyber-range eval scenarios and model-eval runs, email info@roguelabs.io. Once you're added, create your token below. You will also need an API key for a model provider (for example Anthropic, Google, OpenAI or OpenRouter).
Install (Python 3.10+), with the extra for your provider:
pip install "inspect-rogue-arena[ ]" # is one of: anthropic, google, openai, openrouter # or [all-providers] for all of them The extra pulls in that provider's client library.
Create your token. Sign in at https://arena.roguelabs.io and go to Team Hub → Model Testing → Tokens (/team-hub/model-testing/tokens). Click Create token, give it a Token label (e.g. laptop or ci-runner), choose Expires in (7, 30, 90 or 365 days), and submit. The token (ra_eval_…) is shown once: "Copy it now. You won't see it again." It runs any published eval you can deploy, as you.
export ROGUE_ARENA_BASE_URL=https://arena.roguelabs.io export ROGUE_ARENA_TOKEN=ra_eval_… # the token you just copied # plus your model-provider key, e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, # GOOGLE_API_KEY or OPENROUTER_API_KEY Keep the token in the environment: it is never a config field, so it never lands in an Inspect log, and the CLI redacts it from errors.
rogue-arena-inspect whoami # your user/org, token label and last 4 rogue-arena-inspect evals # the evals this token can run Run the built-in example eval against a model of your choice (replace the id with one from evals):
rogue-arena-inspect launch --eval --model / Pick a model by its Inspect provider id; see Inspect's model providers for the ids and the keys each needs. For a dry run with no model spend, use Inspect's built-in offline mock, mockllm/model.
The agent's shell tool runs long commands to completion (a background exec the sandbox polls), and the model can ask for a longer timeout per command, so a slow scan, build or download is not cut off.
See results. The run prints a log location; open it with Inspect's viewer:
inspect view Your runs also appear in the web app under Team Hub → Model Testing → Runs (/team-hub/model-testing/runs), with the per-hop score. From the CLI, rogue-arena-inspect runs lists your runs and rogue-arena-inspect run shows one run's status, score and per-stage result.
Revoke a token any time from the same Tokens page: click Revoke on its row. If you lose a token, revoke it and create a new one.
The model's conversation (prompts, reasoning, replies) stays on your machine; what it does on the range (commands and their output, file transfers, team chat posts) passes through Rogue Arena. In detail:
The rest of this document is reference material.
Supported Inspect versions: >=0.3.260,<0.3.274 (pip resolves one automatically). 0.3.260 is the first with the sandbox errors the provider raises.
rogue-arena-inspect whoami # userMainId, organizationId, tokenLabel, tokenLast4 rogue-arena-inspect evals # the evals this token can run, with launch visibility evals prints one block per eval with its name, version, stage (hop) count, scoring mode, and launch visibility:
example-ad-chain | v3 · 4 stages · sequential · ready now (2 warm) id: 11111111-1111-4111-8111-111111111111 example-web-app | v1 · 2 stages · independent · on demand, ~7 min id: 22222222-2222-4222-8222-222222222222 ready now (N warm) means warm copies are claimable now; on demand, ~X min means a claim builds a fresh copy; unknown means readiness was not reported (the command still succeeds). evals --json prints the raw listing; whoami prints JSON. --base-url and --token override the environment, but prefer the environment variable for the token (a flag is visible in the process list).
rogue-arena-inspect runs # this token's recent runs (jobs) rogue-arena-inspect run # one run's status, score and per-stage result rogue-arena-inspect run --watch # live-tail the run's events until it settles rogue-arena-inspect run --chat # print the run's team chatroom transcript run takes a run (job) id (or a trial id as a fallback) and prints the run's status and, per trial, the server score and each stage (# : pass/fail). Each trial's terminal reason reads as the Rogue Arena enum plus a short gloss, e.g. reason=timeout (ran out of wall clock).
runs, run, and run --chat take --json for the raw objects.
The model runs on your machine through your own provider credentials, so a provider refusal (a model/region policy block, a bad or missing API key) comes from the provider, not from Rogue Arena. When launch's inspect eval child exits on one of these, launch prints a clean, actionable line instead of a raw provider stack trace; the child's own output is still shown. Check your provider API key, that the model is allowed for your account and region, and that the matching provider extra is installed. Inspect's model providers page lists each provider's model ids and keys.
The example task files ship inside the package, under inspect_rogue_arena/examples/ (eval_example.py, team_example.py, team.yaml, and the eval-example.eval.yaml run config). rogue-arena-inspect launch runs them without a checkout. To customize one, find the folder, copy the file out, and pass it with --task:
python -c "import importlib.resources as r; print(r.files('inspect_rogue_arena') / 'examples')" Or write your own task. Use the scorer and give the sandbox a config:
from inspect_ai import Task, task from inspect_ai.agent import react from inspect_ai.dataset import Sample from inspect_ai.util import SandboxEnvironmentSpec from inspect_rogue_arena import RogueArenaSandboxConfig, rogue_arena_hops, rogue_bash @task def my_eval() -> Task: return Task( dataset=[Sample(input="…your objective…", target="scored by Rogue Arena")], solver=react(tools=[rogue_bash()]), scorer=rogue_arena_hops(), sandbox=SandboxEnvironmentSpec( "rogue-arena", RogueArenaSandboxConfig(eval=" ") ), ) rogue_bash() is the shell tool the examples use: it states its default timeout to the model and runs long commands as a background exec, so a slow command runs to completion and a transient network failure on a poll is retried rather than ending the run.
A team run puts several agents on one range. Each member has its own model, system prompt and shell channel into the one VM; they share a chatroom (post_message / read_messages), a scoreboard (post_finding / read_scoreboard) and, in shared_sight, an activity feed. A team is one Inspect sample, so it claims exactly one trial and drives one VM.
Describe the team in a YAML/JSON file (the packaged team.yaml is a template; copy it out to edit) and launch it:
rogue-arena-inspect launch --team team.yaml --eval The team file sets turn_taking (coordinator, where a lead agent delegates via Inspect's handoff, or round_robin), visibility, optional tool_timeout_seconds, rounds / turns_per_member, and the members (each with model, name, role, prompt).
Command timeouts. A member's bash runs every command in background mode: it runs to completion and returns its full output, for at most tool_timeout_seconds (a top-level team field, default 600), and the tool description tells the model so. The model may pass its own timeout (seconds) per command. A command that outlives its timeout is stopped, with everything it started, and ends with Inspect's timeout error.
visibility decides whether members can read each other's actions. In both modes the activity feed is recorded and sent to Rogue Arena (the run owner can see it on the run page). The feed stores only a summary of each command (the command, its exit code and about 400 characters of output); the command's full output still passes through Rogue Arena when it runs.
Either way, members share the one VM, chatroom and scoreboard. If Rogue Arena does not serve the activity routes, a shared_sight team prints one line and runs chat-only rather than letting a read_activity call end the run.
Team scoring. A team run is one trial; its score is the team's. Rogue Arena scores it when the trial closes, like any other trial, and a key-file hop counts a key any member surfaced.
Explicit Inspect config wins over environment variables, which win over the defaults. The config is typed, validated and frozen, and rejects unknown keys.
There is one job per sandbox config per eval run, and one trial per sample:
Each of these fails the sample and releases its concurrency slot:
A semaphore per sandbox config, sized to concurrency, holds each claim until an earlier trial closes, so the provider never sends a claim that would be refused (409). Waiting for a slot is ordinary queueing with no time limit.
The provider also implements Inspect's default_concurrency() hook, which sets Inspect's default --max-sandboxes to ROGUE_ARENA_CONCURRENCY (default 2). When a task config sets concurrency, pass the same value as --max-sandboxes so Inspect's queue matches the job's limit.
exec is synchronous by default. A command whose timeout is at most sync_exec_ceiling_seconds (default 50, at most 55) runs as one request; a command with no timeout gets the ceiling as its timeout.
A longer timeout runs in background mode: the provider launches the command, then polls it (first after 0.25 s, the wait doubling up to poll_interval_seconds) until it finishes, for up to the command's timeout plus 5 minutes (the server ceiling is 4 hours). Rogue Arena stops a background command and everything it started at its timeout and when its trial ends.
A background poll that hits a transient failure retries with exponential backoff (capped at 30 s) until the deadline. Rogue Arena returns at most the last 10 MiB of a command's output. cwd, env and input (stdin) pass through; user, timeout_retry and concurrency are ignored.
write_file and read_file move raw bytes, base64-encoded in JSON. Text is UTF-8. Absolute agent paths only, so a relative path resolves against /. A read_file larger than Inspect's read limit raises OutputLimitExceededError. An upload is capped at 10 MiB.
The scorer closes the trial and reads the server score the close returns. It never computes a hop locally, never runs a command, and never submits a key.
Key-file hops are proven server-side: Rogue Arena counts a key-file hop only when the planted key appears in the agent's exec output (including background results) or in a file the agent downloads. The agent proves a hop by reading the key through its tools; there is nothing to submit.
With Inspect's default fail_on_error, one such infrastructure outcome aborts the whole run. To tolerate them, pass --no-fail-on-error, or a threshold such as --fail-on-error 0.1. From Python, pass fail_on_error=False to inspect_ai.eval(). To retry, --retry-on-error N claims a fresh trial for each retry, so leave headroom in max_trials.
RogueArenaClient.from_env() reads ROGUE_ARENA_BASE_URL and ROGUE_ARENA_TOKEN. It covers the whole eval API: whoami, list_evals, list_runs, create_job, get_job, cancel_job, list_job_trials, claim_trial, get_trial, heartbeat_trial, run_command (and the single-request exec_trial), upload_file, download_file, close_trial and list_trial_events.
import asyncio from inspect_rogue_arena import RogueArenaClient async def show_evals() -> None: client = RogueArenaClient.from_env() for entry in await client.list_evals(): print( entry.environment_id, entry.name, entry.hop_count, entry.scoring_mode.value ) asyncio.run(show_evals()) Development pip install -e '.[all-providers]' python -m unittest discover -s tests The tests run offline: HTTP goes to a mock transport and an in-memory fake server, and the Inspect runs use mockllm, including a run of the shipped example task.
Apache License 2.0. See LICENSE and NOTICE. The license grants no rights to the "Rogue Arena" or "Rogue Labs" names or marks.
All 2 files in this release have provenance metadata.
all-providers anthropic google openai openrouter
evals inspect inspect_ai rogue-arena sandbox security
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




