Evaluating agents entirely on the Hub
TDLR: Agents can now be evaluated on realistic, long-running benchmarks entirely on the Hugging Face Hub. We evaluated six open models, from Hy4 to Inkling-2-Mini, on Google's Physical-Engineering's Last Exam (PLE). All pieces, from sandboxing to traces, ran on HF's infrastructure. Code is here.
AI benchmarks are no longer a prompt and an answer. Each task is a container holding a whole project, sometimes with several apps running inside it. A harness drives the model through tens or hundreds of tool calls, and grading may need a container of its own plus an LLM judge. Running all of this usually takes a workstation with Docker, a handful of API keys, and a laptop that has to stay awake for a day.
This post explains how we did it, what broke along the way, and how to read the numbers.
PLE is one of the natively supported benchmarks on the Hub (learn more about this new feature here).
If you're designing an evaluation of your own (choosing the claim, checking the verifier, reporting uncertainty, deciding what to open), start with How to build and maintain an agentic evaluation. This post is the second half. It focuses on running a large, hard and private benchmark at scale on the Hub, with harnesses that weren't built for it.
In short
Every piece of the run lives on the Hub. The benchmark's tasks are a gated dataset, the models are served through Inference Providers, and the evaluation framework, Harbor, runs each task in an HF Jobs sandbox, which is serverless CPU and GPU compute. Each PLE task comes with a Docker image, and the complex ones are stored in the Hub's container registry. Each finished trial is pushed to a private dataset as a session trace. Once you've run the launch_job.sh script, you can close your laptop.
We evaluated all six models with Terminus-2, a minimal agent harness created the by Harbor authors. We also ran GLM-5.3-Flash and the two Inkling models with OpenAI's Codex, a more sophisticated harness. Connecting them to the Hub took three thin infrastructure adapters. These are explained in detail below.
A full run costs between about $7 and $220. PLE has 29 tasks and the agent gets 3 attempts (trials) at each; for GLM-5.3-Flash that came to $47–60 per harness, almost all of it inference, and sandboxes add about two dollars. Bigger models and longer Codex sessions cost more, as the cost section shows.
The harness matters as much as the model. On the same tasks, with the same model and the same judge, GLM-5.3-Flash scores 0.273 with terminus-2 and 0.152 with Codex, while both Inkling models do better with Codex. The two harnesses don't run under the same conditions, though: terminus-2 has no image input and we capped it at 150 turns, while Codex sees images and has no turn cap. Across the six models, Hy4 scores highest, at 0.349 with terminus-2. The Harness Leaderboard compares more agent harnesses on the same benchmarks.
Why run evaluations on the Hub
Three things are hard about agent evals, and the Hub already has an answer for each:
Problem
Usual setup
On the Hub
Where the task runs
Docker on a workstation, or a sandbox vendor account
HF Jobs sandboxes, sized per task, billed to your org
Where the model runs
One API key per provider
Inference Providers: access to a wide variety of models, billed to your org
Where the results go
A local jobs/ folder
A private dataset: one trace per trial, live, browsable
The fourth piece is the benchmark itself. PLE is published as Harbor task folders in a gated dataset. Its terms forbid redistributing the tasks, so everything that contains task content (agent traces, run archives, images) stays private in the evaluating org. That's the protected column of the release-strategy table in the evaluation guide: with a gated benchmark you can still open the method, the code and the scores, but the traces stay with the people who agreed to the terms.
The stack
The figure below summarizes the overall architecture:
You start a run like this (GitHub repository is here):
export HF_BILL_TO=<your-org> TRACES_REPO=<your-org>/<private-dataset>
AGENT=Codex TASKS=<task ids> N_ATTEMPTS=3 N_CONCURRENT=29 scripts/launch_job.shThe launcher sends the committed code to a CPU Job as an archive. Harbor runs there and creates one sandbox per trial: 29 tasks with 3 trials each, as the environment variables above say. While the run continues, a small watcher pushes each finished trial's trace and an updated per-task results file to a private dataset. Progress lines (TRIAL … reward=…, ALERT …) show up in the Job logs, so you can follow a run from your phone. HF_BILL_TO sets the Hugging Face org that pays, and AGENT picks the harness, Codex in the example above.
A run that partly failed doesn't have to be repeated: a regrade job takes the run archive from the dataset and re-runs only the graders of the trials whose grading failed.
Adapter 1: Harbor environments on HF Jobs sandboxes
Hugging Face provides a Sandbox: an isolated environment in which agents can run. It's powered by Jobs and runs a small exec and file server, created in seconds from any public image. Harbor's built-in hf-sandbox environment runs on top of it, and it is what the evaluation guide uses. PLE asks for a bit more: network rules that change between phases (setup with network, an agent without it, a grader that may reach only its judge) and images built from multi-stage Dockerfiles. So we wrote a small environment for Harbor 0.20 on the same Sandbox API.
Each task declares the CPUs and memory it needs, and the adapter picks the cheapest CPU flavor that covers them; most PLE tasks fit cpu-basic or cpu-upgrade. Single-stage Dockerfiles need no builder at all: the sandbox starts from the FROM image, and the adapter replays the Dockerfile inside it (RUN, ENV, WORKDIR, COPY, …). Anything that can't be replayed faithfully fails loudly rather than building something different.
Network rules change per phase. After setup, every command runs under a Landlock ruleset that denies outbound TCP; it's inherited by every child process and can't be undone, even by root. Where a phase needs an allowlist, a small CONNECT proxy started before confinement forwards only to the allowed hosts, which is how PLE's judge-graded verifiers reach exactly one host. huggingface_hub 2.5.0 has since added network policies to sandboxes. They fit graders and agents that run from prebuilt images directly, but we kept Landlock for the multi-service world tasks.
Finally, agents like Codex run as a single command that lasts for hours. Commands that may run longer than a few minutes are therefore started detached and polled with short requests.
Adapter 2: task images that a Space can't build
Twelve PLE tasks are worlds: a 14-stage Dockerfile with FreeCAD, LibreOffice, MySQL, PostgreSQL, Redis, Nextcloud, OpenProject, Wiki.js, Collabora and a gateway in front of a dozen MCP servers, started by a health check. Up to 12 GB of RAM at runtime, ~8 GB of image.
A Docker Space builder ran out of memory at OpenProject's asset precompile on every hardware tier. Instead, kaniko in a cpu-performance Job (32 vCPU / 256 GB) builds each image in 36–86 minutes and pushes it to a private repo in the Hub's container registry (cr.hf.co). We built all 12 images in parallel. They have to stay private, because they contain gated benchmark data.
Jobs pull public images, but a sandbox can't be given credentials for a private one. Kaniko's single-snapshot builds are the public base image plus a few build layers, so the image adapter starts the sandbox from the public base and streams the build layers into it, applying OCI whiteouts. It uses a short-lived, pull-only token for that one repository, and the HF token never enters the sandbox. The 7–8 GB of layers apply in 3–7 minutes.
The task's health check starts the apps. The apps, the agent and the grader's evidence-collection hook all share one Landlock domain that allows TCP only to the world's loopback ports (MCP gateway, MCP servers, web apps, databases), which we measured per image with a probe. Ports 80 and 443 are never allowed. In Docker terms, it's --network none plus loopback.
Adapter 3: models from inside the sandbox
We evaluate each model on 2 harnesses: Terminus-2 and Codex. Terminus-2 calls the model from the orchestrator and only sends keystrokes into the sandbox, so the sandbox never needs network. Codex, like most coding agents, runs inside the sandbox and calls the model API itself. That's how the PLE leaderboard runs it, so a leaderboard-style run needs a model path out of an otherwise sealed sandbox, without handing the agent a credential.
The model adapter is a ~350-line relay, using only the Python standard library, that starts on 127.0.0.1 before confinement.
The token stays out of the agent's reach. The relay reads it from a file that it then deletes, marks itself non-dumpable, and lives outside the agent's Landlock domain, so even root in the sandbox gets EACCES on its memory and environment. The agent gets a dummy key, and its only route out is the relay's port, which forwards only /v1/* to the router and pins the model id.
Last, it adapts to what Codex expects. Codex groups MCP servers and its sub-agent tools into namespace tools, which the Chat Completions API doesn't have, so the relay flattens them and maps the calls back. We also register the relay as a custom provider, so Codex compacts long contexts locally instead of asking for server-side compaction, which only OpenAI offers.
Codex itself (the leaderboard's version, 0.162.1) is installed while the sandbox still has network, before confinement, in a private Node.js so the world's own apps keep theirs.
Results on PLE
Below are the results of six open models, all served through Inference Providers. Claude Opus-5.5 was leveraged as a judge for rubric and checks-judge tasks, as in PLE's own setup (see the paper for details). Each score is a mean over the 29 dev tasks of each task's mean reward over 3 attempts.
Model
Provider
Harness
All 29 tasks
12 world tasks
17 other tasks
deepinfra
terminus-2
0.349
0.360
0.341
primeintellect
Codex
0.278
0.291
0.269
terminus-2
0.231
0.292
0.188
fireworks-ai
terminus-2
0.273
0.333
0.230
Codex
0.152
0.214
0.108
deepinfra
terminus-2
0.266
0.294
0.245
primeintellect
Codex
0.212
0.294
0.154
terminus-2
0.157
0.285
0.067
deepinfra
terminus-2
0.172
0.234
0.128
terminus-2 ran with a 150-turn cap and without image input, so it can't look at the drawings and floor plans that some tasks depend on; Codex is version 0.162.1 with reasoning effort high and the 6-hour task limit. GLM-5.3-Flash ran on dataset revision e0c21fa, before the dataset was re-published; the other models ran on 9ca4de8. The two tasks that differ between the revisions scored 0 for every model and harness. The aggregate results of every run are public in OpenEvals/ple-harbor-results, and they're shown on the PLE leaderboard as community results from open pull requests on the model repos; the traces stay private because they contain task data.
The ranking depends on the harness. GLM-5.3-Flash does much better with terminus-2, while Inkling-2-Small and Inkling-2-Mini do better with Codex, so no single harness gives a fair comparison across models. For the Inkling models, almost all of the difference is on the 17 non-world tasks; on the world tasks, the two harnesses land within a hundredth of each other. Under terminus-2, the weaker models often hit the 150-turn cap without submitting anything (42 of 87 attempts for Inkling-2-Mini, against 10 for Hy4), which Codex, with no turn cap, avoids.
The chart below takes GLM-5.3-Flash task by task.
For GLM-5.3-Flash, with the same tasks and judge, terminus-2 beats Codex on 24 of 29 tasks; Codex wins 3, and 2 are tied at zero. The gap holds when the task set is resampled, and the PLE leaderboard shows the same effect across models: for some open models, the best and worst harness differ by a factor of four.
Under Codex, GLM-5.3-Flash keeps its sessions short. It works for a median of 4.4 minutes per task and then writes a completion summary, rather than running out of time. Under terminus-2, the median is about 15 minutes on the world tasks.
The worlds turned out to be not the hardest tasks. Both harnesses score higher on the world tasks than on the others, even though terminus-2 has no MCP client and reached the apps only with curl.
Variance within a task is real. The three attempts at one task range from 0.14 to 0.61 in places, so single-attempt numbers on 29 tasks would be noisy, while the 3-attempt mean is stable to about ±0.015 for this setup.
These are community results, not official leaderboard submissions. The full list of caveats is in Limitations.
What it cost
The two GLM-5.3-Flash runs are the ones we costed in full. Everything below is billed to one org: Jobs and sandboxes by the minute, the model per token through Inference Providers, the judge per token on its own API. The table covers every trial that went into the two scores, including the ones that failed and were re-run; it leaves out development probes and smoke tests.
terminus-2 (29 tasks × 3)
Codex (29 tasks × 3)
Model: GLM-5.3-Flash via Inference Providers
$43–52
$41–43
Sandboxes: cpu-basic / cpu-upgrade
$1.93 (76 sandbox-hours)
$0.73 (31 sandbox-hours)
Judge: Claude Opus 5.5 (estimated)
≈ $6
≈ $5
Total
≈ $51–60
≈ $47–49
Per task (3 attempts)
≈ $1.80–2.10
≈ $1.60–1.70
Median agent time per attempt
32 min
4.6 min
Shared, one-time: building the 12 world images took 13 kaniko jobs, 11.7 hours on cpu-performance, for $22.21 (including one failed build). The orchestrator jobs ran on cpu-basic for 17 hours in total, for $0.17.
Inference is the most expensive part, but caching reduces the costs. Agents resend their whole context every turn: terminus-2 read 895M input tokens and Codex 1.23B, but 96% and 99% of them were cache hits. The ranges come from the router's own per-token prices, which varied between calls in our measurements ($0.15–0.225 per million uncached input tokens, about $0.03 cached, $0.50–0.75 output).
Sandboxes are almost free. CPU sandboxes cost $0.01–0.03 an hour, so even 29 trials in parallel, each with its own grader sandbox, add up to about two dollars. The judge cost is an estimate: the graders don't record token usage, so we estimated it from the size of what each rubric call reads, with Opus 5.5 at $4 / $20 per million tokens.
On wall-clock time, 29 tasks × 3 attempts with Codex, 29 at a time, took 98 minutes, and the 12 world tasks × 3 with terminus-2, 12 at a time, took about 2 hours. The 6-hour task limit was never close.
For scale, the PLE leaderboard lists about $14 per task for GLM 5.2 with Codex at list prices; GLM-5.3-Flash is a smaller, much cheaper model, and with this harness it also stops much earlier.
For the other runs, here is the model cost alone, from the token counts in the trajectories at the router's per-token prices. Sandboxes and the judge add a similar few dollars per run as for GLM-5.3-Flash.
Model
terminus-2
Codex
Hy4
$85
GLM-5.3
$201
Inkling-2-Small
$41
≈ $220
Inkling-2-Mini
$18
≈ $216
Hy4-flash
$7
Codex costs much more per run than terminus-2 for the same model. It has no turn cap, keeps full tool outputs and images in its history, and makes many small calls that each resend the context, so the Inkling Codex runs read 6–11 billion input tokens, most of them cache hits. Provider prices matter too: GLM-5.3 cost more than Hy4 mainly because its provider charges about three times as much for cached input, and it also wrote about twice as many output tokens.
Limitations
These runs aren't official leaderboard submissions. terminus-2 isn't one of the leaderboard's harnesses, and it ran with a 150-turn cap. Codex ran with reasoning effort high, the highest the router accepts, rather than max, with web search disabled. It also ran through the relay's Responses-to-Chat translation, which doesn't send the model's reasoning back to it between turns. And Codex has no built-in settings for GLM-5.3-Flash, so it used fallback values, including a context window smaller than the model's, which makes it compact earlier.
Network isolation is weaker for world tasks. Landlock filters by port, not by address, so a process in a world task could reach any internet host on one of the ~40 allowed app ports (never 80 or 443). UDP isn't blocked in any task.
World tasks depend on private images. Their images live in a private repo in the Hub's container registry, and Jobs can't pull private images yet, so adapter 2 streams the build layers into each sandbox instead. Those images are also rebuilt on today's base: they're layered onto the current public python:3.13-slim-trixie, so if that tag moves, the base under the build layers changes.
Some trials were re-run. Trials that failed because of our harness, not the agent, were re-run with the same attempt count: 7 in the terminus-2 runs (6 hit a port gap in two world images, 1 lost its terminal) and 10 in the Codex run (cut exec streams, remote compaction). We re-ran only the graders, not the agents, for the first terminus-2 run, after a working-directory bug in our backend, and for two Codex trials (a DNS failure and a timeout). One Codex trial that crashed but was still graded 0.0 was excluded in favour of its re-run. In the later runs, 5 Hy4-flash attempts and 1 GLM-5.3 attempt that lost their sandbox or hit a provider error were re-run the same way.
The models ran on different providers, chosen for price and tool-call support, and a provider's serving setup, such as quantization, can change a score. Codex runs also hit one limit of our setup: when the images in a Codex session's history passed the router's 30 MB per-request limit, the session ended early. That happened in 5 Inkling attempts, all on the floor-plan tasks, and they count as graded zeros.
Three attempts per task is not many. Attempts at the same task vary a lot (0.14 to 0.61 in one case). The 29-task means are stable to about ±0.015 over attempts, but a different set of tasks could move them by ±0.08.
Finally, terminus-2 has no image input and no MCP client. It scored near zero on the three floor-plan tasks, where it reads images pixel by pixel until it runs out of turns, and it used the world apps only through curl.
What broke, and what we changed
In case you're building something similar, here are some things you can leverage:
Symptom
Cause
Fix
Space builds OOM-killed
builder memory is fixed
kaniko in a large CPU Job
pull access denied for a private image
Jobs take no registry credentials
apply build layers inside the sandbox
kaniko fails on rm -rf /tmp/*
it runs RUN steps in the Job's own filesystem
skip the Job's mounted file in cleanups
world never becomes healthy
apps talk to each other on ports we hadn't allowed
probe each image's listening ports
413 Payload Too Large
Responses endpoint capped bodies at ~100 KB (now 32 MB)
serve Responses over Chat Completions
RemoteProtocolError after hours
one exec stream for a 2-hour command
detached commands, short polls
Codex sees no MCP tools
namespace tool type dropped
flatten and map back
"remote compaction v2" errors
Codex treats the relay as OpenAI
register it as a custom provider
Each of these turned into a failed trial first. Because every trial's trace and the run archive land in the dataset as soon as they exist, a failure is an archive to read rather than a log that scrolled away, and a partial failure is a regrade rather than a re-run.
What's next
We plan to land all features into HF's infra, making the adapters unnecessary. This way, you'll be able to run everything with Harbor's built-in hf-sandbox environment.
We've already made the code base more general, so that it works with any Harbor benchmark. We've already ran evals for Long-Horizon-Terminal-Bench and Terminal-Bench v4.1, more on that soon.
We also plan to evaluate the harness adapters trained in Introducing harness adapters.
Openings: run your own benchmark this way
Nothing here is specific to PLE. Publish your tasks in Harbor format in a dataset, gated if the terms require it. Point the orchestrator at that dataset, with an org to bill and a private dataset for the traces. Build any images that can't be replayed with one kaniko Job per task. Then pick a harness and a model on Inference Providers, and read the traces in the dataset viewer while the run is still going.
If you evaluate a model or a harness this way, we'd love to hear what broke for you.
Acknowledgments and sources
Thanks to the authors of PLE for releasing a benchmark of real engineering work, with a public dev set, graders and a documented route for running it with Harbor, and to the Harbor maintainers for a task format and runtime that made an HF Jobs backend a matter of one environment class.
Benchmark:
R. Han, Y. Zhuang, A. Ray, H. Yu, Z. CuiZhu, G. Lee, Y. Ming, B. Roy, V. Sakalkar, V. Tirumalashetty, B. Gokturk, T. Pfister, C.-Y. Lee. PLE: Physical-Engineering's Last Exam, 2026. arXiv:2610.30537
PLE dev set (29 tasks, gated): google/physical-engineerings-last-exam, pinned at commit
e0c21faPLE dev leaderboard, used for the harness versions, reasoning settings and reference scores quoted here: ple-bench.com/leaderboard
Harnesses and framework:
Harbor 0.20.0: task format, orchestrator and the
terminus-2agentCodex 0.162.1, the version on the PLE leaderboard
Models:
Evaluated, through Inference Providers: zai-org/GLM-5.3-Flash (fireworks-ai), zai-org/GLM-5.3, tencent/Hy4 and tencent/Hy4-flash (deepinfra), thinkingmachines/Inkling-2-Small and thinkingmachines/Inkling-2-Mini (primeintellect)
Judge: Claude Opus 5.5 (Anthropic), the judge PLE's rubric and checks-judge graders are calibrated with
Hugging Face infrastructure:
HF Jobs and the
SandboxAPI in huggingface_hub 2.4.0Session Trace format for the per-trial traces
The Hub's container registry (
cr.hf.co) for the world-task imageshuggingface_hub2.5.0 sandbox network policies, (see adapter 1)
Other tools:
Related:
Introducing harness adapters, the companion post on training per-harness adapters
All scores in this post come from our own runs (private traces and run archives in the evaluating org) and are reproducible from them with the scoring script in the code release.