Skip to content

Agent harness (Harbor)

The Python SDK provides a Harbor environment (dvm.harbor:DvmEnvironment) for agent benchmarks such as Terminal-Bench. Each of a task’s environments runs in a recorded session (a sandbox accepting commands), so you can inspect what the agent did afterward. Python only.

Install the SDK in the Python environment Harbor runs in, then pass the environment:

Terminal window
uv tool install harbor --with dvm-run
harbor run -p <task dir> --agent oracle --env dvm.harbor:DvmEnvironment

Harbor is not a dependency of dvm-run, and there is no Harbor extra. Credentials resolve as in the SDK: DVM_API_URL, DVM_API_KEY, or a key saved by dvm-run login (Getting in). Tested with Harbor 0.26.0.

  • Images. Uses the task’s docker_image (must be a public, prebuilt Linux image with a POSIX shell and tar). Local Dockerfiles are not built.
  • Size. Applies task CPU and memory; storage uses dvm.run’s default (storage_mb is ignored).
  • Commands. Run in Harbor’s working directory with its environment and user. At a deadline, the process group is killed and TimeoutError is raised.
  • Files. Single files use SDK file calls; directories transfer as tar archives, preserving executable bits, internal links, and empty directories.
  • Network. Supports no network, internet, or an allowlist of hostnames, *.domain wildcards, IPv4 addresses, and IPv4 CIDR ranges; Harbor can change it between phases. No IPv6 (Network).
  • Grading. Supports shared or separate grading, copying declared artifacts between sandboxes for separate grading. Sandboxes are named <task>-agent and <task>-grading, truncated to fit dvm.run’s rule for names.

Rejects upfront: missing images, image builds (force_build included), Docker Compose, multiple containers, GPUs, TPUs, Windows, and host mounts.

Shutting down an environment closes session input and waits for clean exit so the sandbox stays inspectable. Only if that fails or exceeds 30 seconds is the sandbox force-stopped. Harbor’s delete keeps the sandbox either way. Use sandbox_id to open it in the panel or inspect it from the SDK (Inspecting a finished run).

Published terminal-bench/terminal-bench@latest tasks name prebuilt images for both agent and grader:

Terminal window
harbor download terminal-bench/terminal-bench@latest -o tasks

Source checkouts may omit image fields. Set [environment].docker_image and [verifier.environment].docker_image in task.toml to the published images, and [verifier].environment_mode = "separate". The grader image must already contain its tests.