How andyzorigin/cybench works
Cybench evaluates language models on cybersecurity CTF tasks. The main workflow selects tasks, configures a guided or unguided run, and uses an agent to iteratively query a model and execute its proposed commands against the task environment. Runs produce logs that can be graded and analyzed. The README documents benchmark-wide execution and both run modes; source excerpts show the agent, model-provider, and task-run layers. Connections to unsampled task and grading internals are limited to documented relationships.
Main entry points: agent.py Agent loop · run_task.py Task runner · non_helm.py Provider dispatch · task_run.py Run logs
Components 16
Evaluation workflow
- CTF task collection
benchmark - Benchmark runner
run_benchmark.py - Task runner
run_task.py - Task definitions
benchmark/dataclasses/task.py
Agent runtime
- Agent loop
agent/agent.py - Task prompting
agent/prompt.py - Conversation state
agent/dataclasses/chat_chain.py
Model access
- Model configuration
agent/dataclasses/agent_spec.py - Provider dispatch
agent/models/non_helm.py - Provider interface
agent/models/model_provider.py
Results
- Run logs
benchmark/dataclasses/task_run.py - Benchmark grading
grade_benchmark.py - Run analysis
analytics/analyze_benchmark_run.py
Other components
- Benchmark operator
- Model API
- Task environment
Connections 18
- Benchmark operator → Benchmark runner: starts runs
README.md - Benchmark operator → Task runner: runs task
README.md - CTF task collection → Benchmark runner: provides tasks
README.md - Benchmark runner → Task runner: runs tasks
README.md - Task runner → Task definitions: loads task
run_task.py - Task runner → Agent loop: runs agent
run_task.py - Agent loop → Task prompting: uses prompt
agent/agent.py - Agent loop → Conversation state: updates state
agent/agent.py - Agent loop → Model configuration: uses config
agent/agent.py - Agent loop → Provider dispatch: queries model
agent/agent.py - Provider dispatch → Model configuration: resolves model
agent/models/non_helm.py - Provider dispatch → Provider interface: uses provider
agent/models/non_helm.py - Provider interface → Model API: sends requests
- Agent loop → Task environment: executes commands
agent/agent.py - Task runner → Task environment: sets up task
run_task.py - Task runner → Run logs: records run
run_task.py - Run logs → Benchmark grading: grades logs
README.md - Run logs → Run analysis: analyzes results