# AgentBench — frozen coding-agent evaluation AgentBench measures **multi-step tool use** (read/write files, run tests in a sandbox, structured JSON actions) on tasks with **hidden graders**. It complements single-shot HumanEval+/MBPP+ in `scripts/enterprise/eval.py`. Full audit and experiment plan: [`docs/enterprise_coding_agent.md`](enterprise_coding_agent.md). ## Suites | Suite | File | Tasks | Use | |---|---|---|---| | `dev` | `scripts/enterprise/agentbench/suites/dev_v1.json` | 46 | Development, ablations, fast iteration | | `test` | `scripts/enterprise/agentbench/suites/test_v1.json` | 94 | **Held-out** — do not train on these families | Validate integrity before any run: ```bash cd scripts/enterprise PYTHONPATH=. python -m agentbench.selftest ``` ## Variants (same tasks, same model) | Variant | Meaning | |---|---| | `notools` | Full files in prompt, single completion — no execution | | `old` | Legacy `AgentHarness` | | `new` | `CodingHarness` (repomap, autoverify, verify gate on `final(done)`) | Tune flags on `new`, e.g. `new:gate=0,repomap=0`. ## Run benchmark From `scripts/enterprise` with vLLM available: ```bash cd scripts/enterprise source ../../.venv/bin/activate pytest ../../tests/enterprise/test_sandbox.py ../../tests/enterprise/test_agent_security.py PYTHONPATH=. python -m agentbench.runner \ --model /models/ckpts/grpo_instruct/final \ --name baseline_instruct \ --suite test \ --variants notools,old,new \ --concurrency 2 --gpu-mem 0.28 --verbose ``` Outputs: `/models/runs/agentbench/____.json` with per-task rows and `summary` metrics (`success`, `false_completion`, `hidden_pass`, `tool_call_validity`, `security_violations`, …). ## Recommended checkpoints | Checkpoint | Role | |---|---| | `/models/ckpts/grpo_instruct/final` | Best single-shot coding; agent baseline | | `/models/ckpts/agent_A/final` | Agent trajectory SFT on oracle data | Hub ids (private): see [`ecosystem/models.manifest.json`](../ecosystem/models.manifest.json). ## Oracle data & agent SFT ```bash cd scripts/enterprise PYTHONPATH=. python -m agentbench.gen_data oracle --n 700 --seed 1 --out /models/agent_data/v1 PYTHONPATH=. python -m agentbench.build_sft \ --inputs accepted_oracle.jsonl \ --components core,blocked,recovery \ --out /models/agent_data/v1/sft_B cd ../.. python scripts/enterprise/sft.py --config configs/agentbench/sft_agent.json ``` ## Security - Model code runs under `rewards/sandbox.py` (bwrap, no network, seccomp). - Regression: `tests/enterprise/test_agent_security.py`, `tests/enterprise/test_sandbox.py`. ## Publishing results Include agentbench JSON summaries in your model card or link to `/models/runs/agentbench/` paths in `REPORT.md`. The packaging step (`package_and_publish.py`) already ships HumanEval+/MBPP+ and security eval JSON; extend the card manually when agent numbers stabilize on `test_v1`.