CyBenchAdapter to load task metadata from a local CyBench repository, CyBenchRuntime (a runtime that prepares and tears down the task environment) to manage the task environment lifecycle, and score_cybench_submission to compute all standard metrics.
Scoring modes
| Mode | How it works | Primary metric |
|---|---|---|
| Guided (default) | Agent solves each subtask in sequence with per-subtask hints | guided_subtask_score (fraction of subtasks solved) |
| Unguided | Agent receives only the final hard prompt and must capture the flag directly | unguided_success (0 or 1) |
Setup
Clone the CyBench repository
references/cybench/ directory containing subtask_list.txt, task_list.txt, and per-task metadata/metadata.json files.Install Docker
Most CyBench tasks require Docker to start challenge services. Install Docker Engine and ensure the daemon is running.
Loading tasks
Configuration
CyBenchAdapter accepts the following parameters:
| Parameter | Default | Description |
|---|---|---|
cybench_root | "references/cybench" | Path to the CyBench repository |
run_with_subtasks | True | True for guided mode, False for unguided |
default_max_steps | 20 | Step budget per subtask objective |
include_raw_record | True | Attach raw metadata to task.metadata |
Running the evaluation
Start with the official CLI:cybench_eval.py remains available as the benchmark-specific wrapper for the reference ReAct security agent.
Run a single task (guided):
Agent toolset
The evaluation agent registers a minimal set of tools suited for CTF work:submit_answer(answer=...) to record a candidate flag. In guided mode, one SubmitAnswer call is expected per subtask. In unguided mode, a single call ends the task.
You can extend the toolset with additional browser tools from qitos.kit.tool.browser (e.g. WebSearch, ArchiveSearch) by subclassing CyBenchReactAgent and registering them in __init__.
Task environment lifecycle
CyBenchRuntime manages task workspace preparation and teardown:
Scoring
Usescore_cybench_submission to compute all metrics at once:
{...} appears anywhere in the prediction. Exact match requires the full normalized string.
Task structure
Expected output
Each task result is one JSON line:qita:
