toolbench
toolbench is a platform and CLI for building benchmarks for agentic tools and harnesses. Compose a benchmark (a task + a grading rubric) with a harness (the agent runtime), a loadout (the tools the agent is given), and a variant (the prompt + sandbox), run N trials per cell against a model, and get reach / pass@k / pass^k metrics with plots.
It is the benchmarking sibling of toolbase — the package manager and runtime for agent tools. toolbase serves the tools; toolbench measures how well an agent uses them. Together they close the loop for agentic tool and harness development.
Install
pip install toolbench # core framework
pip install 'toolbench[toolbase]' # + resolve tools from toolbase loadouts
Requires Python ≥ 3.12. The CLI is available as both toolbench and the short alias tbe.
Quickstart
The example geometry benchmark (Euclidean distance + midpoint between two 2-D points) is a
self-contained, dependency-free example that exercises the whole framework.
# Validate the wiring with no LLM calls or cost:
toolbench run --benchmark examples/geometry --model stub \
--loadouts full_local --n 1 --max-cost-usd 0 --dry-run
# A real run (a few cheap trials):
toolbench run --benchmark examples/geometry --model claude-haiku-4-5 \
--loadouts core_only,full_local --n 3 --max-cost-usd 0.50
Each run writes a directory under runs/<run_id>/ with a manifest.json, per-trial
transcripts and artifacts, an aggregated summary.json / summary.txt, and headline plots
(k-sweep, parallel-coordinates, per-stage breakdown).
Concepts
A benchmark lives in examples/<name>/ and is composed from four declarative
axes — vary any of them on the command line to run an ablation:
| Concept | What it is | Where it lives |
|---|---|---|
| Benchmark | The task + grading rubric + ground truth. | benchmark.yaml |
| Harness | The agent runtime (orchestral, claude_code, codex), provider, core tools, and loop policy. |
harnesses/*.yaml |
| Loadout | The domain tools the agent gets (beyond the harness core). | loadouts/*.yaml |
| Variant | The prompt + sandbox seed (scaffolding axis), orthogonal to tools. | variants/<name>/ |
| Rubric | Ordered, weighted stages of checks; trial score = weighted reach. | inside benchmark.yaml |
A loadout source is one of:
-
python:— import a module exposingTOOLS/make_tools()(the no-dependency escape hatch), -
toolbase:— resolve tools from a toolbase loadout, in-process (requirestoolbench[toolbase]); served toolkit versions are recorded in the run manifest as reproducibility provenance, or -
mcp:— serve any MCP server's tools, stdio or HTTP (requirestoolbench[mcp]):tools: sources: - toolbase: { loadout: my-loadout } select: [calculator__add] # optional: ablate within the loadout - mcp: { url: "https://host/mcp", headers: { Authorization: "Bearer ${TOK}" } }
Metrics
For each (model × condition) cell over k trials:
- $\overline{\text{reach}}_k$ — mean rubric-weighted reach: how far through the task the agent gets, on average.
- $\text{pass@}k$ — probability that at least one of $k$ trials passes (best-of-$k$).
- $\text{pass}^{k}$ — probability that all $k$ trials pass (worst-of-$k$).
with bootstrap 95% confidence intervals and a metric-correlation matrix. A trial passes
when it clears the rubric's pass criterion — every stage by default, or reach ≥ a
pass_threshold once the rubric uses partial-credit stages. See
Metrics for the exact estimators.
Commands
| Command | What it does |
|---|---|
toolbench run |
Run a benchmark across the harness × loadout × variant × model grid. |
toolbench resume |
Resume an interrupted run; run only the seeds not yet completed. |
toolbench regrade |
Re-judge a finished run's preserved artifacts after a rubric change. |
toolbench dashboard |
Watch a run live in the browser: trial matrix, logs, prompts, sandbox. |
Run toolbench --help (or tbe --help) for the full reference.
Watching a run
Add --dashboard to run or resume to serve a live view of the run while it executes;
the URL is printed at the top of the run's output:
toolbench run --benchmark examples/geometry --model claude-haiku-4-5 \
--loadouts core_only,full_local --n 3 --max-cost-usd 0.50 --dashboard
The page shows a matrix of every trial per cell as it queues, runs and lands, the active
trial's live activity (its messages and tool calls, each expandable to full input and output,
over a per-tool timeline), its prompts and sandbox (files marked added / modified / deleted since
the agent started), and the run's summary once it finalizes. The run's figures (progress,
reach, spend, ETA) sit in a status bar along the bottom. For a run that has ended, or one
started without the flag, use toolbench dashboard [run-id | dir]; given a directory of
runs it shows every run in the top bar.
To run several benchmarks as one campaign, give each run the same --campaign NAME: they
land together under runs/campaigns/NAME/, and toolbench dashboard --campaign NAME watches
all of them, with each run a circle in the top bar to switch between. The server is read-only and binds to 127.0.0.1; on a remote
machine, forward the port (ssh -L 8765:localhost:8765 <host>).
Also
- Runtimes — besides the API-driven
orchestralruntime, toolbench drives theclaude_codeandcodexCLIs directly (subscription auth, no API key), with per-turn token accounting and a filesystem sandbox. Copy-paste starting points live inharness_templates/. - Judges — grade with the deterministic rule judge (default) or add an LLM second
opinion (
--judge rule+llm); the rule grade always stays authoritative. Any judge can be applied after the fact withtoolbench regrade --judge …. - Safeguards — trials that read the ground-truth answer key are quarantined
(
INTEGRITY_LEAK, scored 0) so a leak can't inflate the headline; every trial also gets a readableaudit.txtof its full trajectory.
License
MIT
External orchestration
Use toolbench external prepare, external evaluate, or external conjure to
score final artifacts without harness telemetry. See
external workflows for provenance, Conjure setup and
acceptance semantics.
Metadata
Release files for toolbench 0.12.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| toolbench-0.12.0.tar.gz | 402.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| toolbench-0.12.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 674.2 kB
Release files / toolbench-0.12.0.tar.gz
| Download URL | toolbench-0.12.0.tar.gz |
|---|---|
| Size | 402.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
71378cb4e5e0efa9afcaa50d1c13a1f3d529ba9fa01a560114bee1cd2c5447fd
|
|
BLAKE2b-256 checksum How to use checksums |
0d3fe08cf2eeda2a2f4c7f94af85af8bd959020ed55879fa9428fc223922871b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / toolbench-0.12.0-py3-none-any.whl
| Download URL | toolbench-0.12.0-py3-none-any.whl |
|---|---|
| Size | 272.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
385264e4364b9a9b69829ce548090e9228428ef1eafb2b8eb88c603a99f397f5
|
|
BLAKE2b-256 checksum How to use checksums |
bdc385cd7de65fc5f42ad7a2172364b56e42884447c0f09c054baf63e2a10711
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for toolbench 0.12.0
Provenance
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
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.