
ProgramBench
github.com/facebookresearch/programbench- Category
- AI Agents
- Rank
- No. 170Tools index
- Listed in
- #13 Find AI benchmarks
- Pricing
- Open Source
- Platform
- cli
- Type
- TOOL
- Builder
- @kunchenguid
- GitHub
- 921 stars
- Latest release
- v1.2.4
- Date
About
A benchmark that challenges AI agents to rebuild complete programs from scratch using only compiled binaries and documentation. Tests whether language models can reverse-engineer and implement working codebases that reproduce original program behavior.
What it does
ProgramBench asks a model to rebuild a program it can only run. Each task ships a compiled command line tool inside a container with the source stripped out, plus documentation. The agent writes a whole codebase from scratch, offline. The harness then takes the agent's archive, builds it in a container with name resolution disabled, and runs machine generated behavioral test suites against the resulting binary. Results land as per instance JSON with per test status, and a summary command turns them into a pass fraction over the full benchmark.
Why it's ranked here
The interesting part is not the task idea, it is how hard the harness works to avoid flattering a submission. Build time network access is cut inside the container, unattempted instances count as zero rather than being dropped from the average, and a submission's own numbers can be recomputed without Docker or re-run end to end with it. Unreliable tests are excluded by recorded reason, including tests that pass on a stub binary. The evaluation module carries a written warning that a silent skip is worse than a loud failure. That is a scoring philosophy, and it shows.
What's good
Design choices are documented where they bite. The container layer explains why a timed out command needs an in container process sweep, and why archives are streamed through the container's own archive tool instead of the plain copy command, so symlinks and modes survive. Network blocking states its own limits: raw IP connections still work and a root process could undo it. Submission URLs are restricted to http and https to avoid local file reads. Scores are checked against a hash of the built artifact, and heavy log data can be split out and pulled back losslessly.
Tradeoffs
The images are built for linux on x86 only, so a Mac or Windows host is out unless you accept emulation. Docker is required for anything past the cheapest verification tier, ten CPU cores per container is the default, and test archives are pulled from HuggingFace on demand. The task set is fixed at whatever ships in the package, so adding your own program is not a supported path. Test suites were themselves model generated, which is why a list of exclusion reasons exists at all. Some evaluation internals are private helpers, so building on them means reading source.
How to use it well
This is for people measuring coding agents, not for people shipping features. It fits a research or model evaluation loop: run your agent offline against the containers, collect one archive per task, then hand the run directory to the harness and read the printed summary rather than raw per test output. Third parties auditing someone else's claimed numbers get the most value, since the cheap tier needs only the Python package. It does not host or run your agent, and it does not measure patch style tasks on existing repositories. Bring your own agent framework.
Technical notes+
Packaging is declared in pyproject.toml: Python 3.10 or newer, a console script pointing at src/programbench/cli/main.py, and runtime dependencies including typer, pydantic, junitparser, pyyaml and huggingface_hub. src/programbench/container.py wraps a long lived container started with a sleep entrypoint, streams archives in through the container's own extractor to preserve symlinks and modes, and sweeps surviving in-container processes after a host side timeout. src/programbench/utils/internet_control.py overwrites the container resolver config with an unroutable nameserver before the build script runs and restores it afterwards, raising if the rewrite did not take effect. src/programbench/eval/eval.py models results with pydantic and parses JUnit XML, including a counter for parallel worker crashes; it also carries a standing note addressed to AI agents editing it, which is repository policy text and not an instruction to a reader. src/programbench/submission.py fixes the resolved threshold at 1.0 and near-resolved at 0.95 and divides by the full instance count, and src/programbench/verify.py splits checking into a no-Docker recompute and a full re-evaluation. Task data is one directory per instance, for example src/programbench/data/tasks/burntsushi__ripgrep.3b7fd44/task.yaml, pinning repository, commit, language and difficulty. src/programbench/utils/instance_filters.py handles regex, slice and shuffle selection, and tests/test_eval.py covers parsing, crash counting and score filtering. CLAUDE.md and docs/README.md document the exclusion reasons and the run directory layout, and LICENSE is MIT.
Observed
- License
- MIT, copyright Meta Platforms, per LICENSE
- Language and floor
- Python, requires 3.10 or newer per pyproject.toml
- Install surface
- Published Python package, installable with pip or uv, one console entry point
- Interface
- Command line only: evaluate a run directory, print a summary, sync test blobs, submit
- Platform
- Container images are built for linux on x86 only; macOS and Windows hosts need emulation
- External dependencies
- Docker for evaluation, HuggingFace for on-demand test archives
- Data layout
- One directory per benchmark instance with a task manifest and a test list, shipped inside the package
- Verification
- Two tiers: recompute scores from submitted output without Docker, or re-run the full evaluation
- Build isolation
- DNS blackholed inside the build container; raw IP traffic and root override are documented as not covered
- Tests
- A pytest suite is present in the tree covering XML parsing and score filtering
Read from README.md, pyproject.toml, docs/README.md, CLAUDE.md, LICENSE, src/programbench/constants.py, src/programbench/container.py, src/programbench/submission.py, src/programbench/verify.py, src/programbench/cli/main.py, src/programbench/eval/eval.py, src/programbench/utils/internet_control.py, src/programbench/utils/instance_filters.py, src/programbench/data/tasks/burntsushi__ripgrep.3b7fd44/task.yaml, tests/test_eval.py.
What it can do
Evaluate AI agent reverse-engineering capabilities
AI agent/model and compiled binary → Performance benchmark score
Test program reconstruction from binaries
Compiled binary and documentation → Working codebase that reproduces original behavior
Compare AI model code generation abilities
Multiple AI models and benchmark test cases → Comparative performance results
Validate reconstructed program functionality
Generated codebase and original program binary → Behavioral equivalence assessment
Benchmark code architecture capabilities
AI agent and program specifications → Software architecture quality metrics
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.