Blog · 05 · 2026-10-10 · 3 min

HUD on denv

Run HUD environments on denv as a runtime, give HUD's MCP-driven agents a forkable world, and move HUD datasets between HUD and Harbor without leaving denv.

HUD builds environments as Docker images with an MCP controller inside: the agent speaks MCP to the environment, the environment exposes tools such as a shell, a browser, or a desktop, and a task is an async function that yields the prompt and then the reward. hud eval runs a dataset; hud dev iterates on an environment locally. Runtimes decide where the image runs: local, Docker, Modal, Daytona, a TCP attach to something already running, or HUD's hosted runtime. HUD interoperates with Harbor datasets and trains through Tinker.

denv is a runtime for HUD, and the way to run HUD environments inside your own cloud.

pip install "denv[hud]"
export DENV_SERVER=https://api.denv.ai DENV_API_KEY=dak_…

denv as the HUD runtime

HUD on denv: each framework operation on the left becomes the denv call on the right.HUD · WHAT THE ADAPTER DOEShud.Environment(img, runtime=DenvRuntime())runtime.start()POST /v1/sandboxes · MCP portMCP toolsHTTP on published port, or stdio via execsetup / evaluatePOST /v1/envs/{id}/execenv.grade()denv verify → rewardruntime.stop()DELETE /v1/envs/{id}
Fig. 1 What the adapter does, call by call.
import hud
from denv.hud import DenvRuntime

env = hud.Environment("ghcr.io/you/ops-env:v2", runtime=DenvRuntime())

@env.template()
async def triage(prompt: str):
    yield prompt
    yield await env.grade()      # 0–1

DenvRuntime implements HUD's runtime protocol: start the image as a denv sandbox, expose the controller's MCP endpoint, exec for setup steps, stop. Concretely:

  • start. POST /v1/sandboxes {image, ports:[controller_port], egress}. The MCP controller's port is published and HUD connects to it. The sandbox returns when the controller answers.
  • MCP transport. HTTP over the published port today. Over stdio through denv exec when the environment prefers it, which also works with egress denied.
  • exec. HUD's setup and evaluate steps run through POST /v1/envs/{id}/exec.
  • stop. DELETE /v1/envs/{id}.

HUD's HUDRuntime rejects GPU requests and resource limits. DenvRuntime accepts cpus, memory_mb and pids and renders them as caps; GPU follows device passthrough.

A forkable world under HUD

HUD rebuilds the environment per task. On denv, a task can fork a version instead:

env = hud.Environment.from_denv_version("ver_01M4…", runtime=DenvRuntime())

The fork carries the services and data declared in the environment's compose file; the HUD controller runs in the x-denv.agent.service. Browser tasks against a seeded SaaS replica, or an ops task that starts in the middle of an incident, begin in that state rather than booting into it. Fork cost is about a second on ZFS and does not grow with the size of the data.

env.fork() during a task snapshots the live environment and returns a new Environment bound to the child, so a grader can evaluate several continuations from one state, or a task can checkpoint before a risky step.

Grading as a separate principal

denv verify: the agent runs in fork A as an unprivileged user with egress denied. Its processes are stopped, declared submission paths are copied to a root-owned location, special files are refused, fork B is made, the verifier image grades in fork B as a separate principal, and the reward and evidence land in the record.DENV VERIFY · THE GRADER NEVER SHARES A PROCESS TREE WITH THE AGENTagent runsagent runs fork A · uid 1000 · caps · egress ✗stopstop every agent process killedcollectcollect declared paths → root-owned copyrefuserefuse symlink · fifo · device → score 0forkfork fork B from Agradegrade verifier image · separate principalrecordrecord reward + evidence in the deploymentfork A is left as the agent left it, for inspection
Fig. 2 denv verify. Grading happens on a fork, as a separate principal, after the agent is stopped.

HUD graders are inline Python, Bash in the environment, an LLM judge, or a combination, and HUD supports a separate verifier environment. On denv the separate verifier is the default for the rl-environment kind: env.grade() calls denv verify, which stops the agent's processes in a fork, collects the paths declared in x-denv.verifier.collect to a root-owned location, refuses special files, and runs the verifier image there. The reward is the task's second yield; the verifier's evidence is in the environment's deployment record. The agent's environment is untouched for inspection.

Inline and LLM-judge graders work unchanged; they simply call back into the sandbox or the model.

Datasets between HUD and Harbor

HUD already converts Harbor tasks. denv adds the other direction and keeps the environment constant across formats: denv export --harbor from the same version that DenvRuntime runs under HUD, so a dataset published on both HUD and Harbor Hub refers to the same pinned images and the same verifier.

Hosted targets

HUD's own Modal and Daytona runtimes run the environment on those providers. When denv's E2B, Daytona, Modal and Prime targets ship, DenvRuntime can place the sandbox on any of them while keeping denv's versions, verdict log and verifier semantics; the console shows the capability row for the chosen target. Until then DenvRuntime places on your own machines.

Conformance

The committed conformance run installs hud-python, starts HUD's reference text environment through DenvRuntime, runs one task through hud eval with a mock model, asserts a reward is produced, and checks the environment is destroyed.

Status

Ships today. Running a HUD environment image as a denv sandbox with the raw client, and attaching HUD to its published MCP port through HUD's TCP runtime. The denv.hud package is not yet published.

Ships today (2026-10-11). denv verify itself, callable from any grader through Client().verify().

Committed by this post. denv.hud.DenvRuntime with HTTP and stdio MCP transports; from_denv_version and env.fork(); env.grade() wired to it; caps from HUD resource requests; hosted targets through the same runtime; conformance with HUD's reference environment.