Instruct a coding agent to use BenchBox
Pick a surface, platform, benchmark, and scale. Copy the prompt into your coding agent. Defaults to a safe local DuckDB + TPC-H quickstart.
📋 Agent prompt
Goal: run TPC-H on DuckDB at scale factor 0.01 (SQL interface, local deployment).
Steps:
1. Install dependencies: `uv add 'duckdb>=1.5,<2'`.
2. Check dependencies: no optional connector check is registered for this selection; confirm the install command completed successfully.
3. Dry run first: `uv run benchbox run --dry-run /tmp/benchbox-dryrun-duckdb --platform duckdb --benchmark tpch --scale 0.01`. Inspect the plan.
4. Run live: `set -o pipefail; uv run benchbox run --platform duckdb --benchmark tpch --scale 0.01 --non-interactive 2>&1 | tee /tmp/bench_duckdb_tpch_0.01.log`.
5. Discover & summarize: run `uv run benchbox results --paths --limit 1`, then run `uv run benchbox results show-cli <result-json>` with the result JSON path. Summarize total runtime, per-query timings, and failures from the result JSON.
6. Save provenance next to the result bundle. Replace `<bundle-dir>` with the bundle directory from the previous step, then run:
mkdir -p <bundle-dir>/_provenance
uv run benchbox --version-json > <bundle-dir>/_provenance/version.json
uv run benchbox profile > <bundle-dir>/_provenance/system.txt
echo "set -o pipefail; uv run benchbox run --platform duckdb --benchmark tpch --scale 0.01 --non-interactive 2>&1 | tee /tmp/bench_duckdb_tpch_0.01.log" > <bundle-dir>/_provenance/command.txt
If the load phase fails partway, re-run with `--force datagen` appended.
To capture EXPLAIN plans, insert `--capture-plans` in the benchbox command before `2>&1 | tee ...` (for example: `set -o pipefail; uv run benchbox run ... --capture-plans 2>&1 | tee <log>`), then inspect with `benchbox show-plan --run <result-json> --query-id Q1`.🔧 MCP server config
Add this entry to your agent's MCP config (e.g. ~/.codex/config.toml or claude_desktop_config.json):
[mcp_servers.benchbox] command = "uv" args = ["run", "--", "python", "-m", "benchbox.mcp"]