> ## Documentation Index
> Fetch the complete documentation index at: /llms.txt
> Use this file to discover all available pages before exploring further.

# Harbor

> Run every Harbor benchmark trial in its own isolated boxd machine with a full Docker daemon.

![The banner shows the boxd.sh and Harbor logos, with Harbor described as the agent evaluation framework.](/images/boxd-x-harbor.png)

[Harbor](https://harborframework.com) is a framework for evaluating and optimizing AI agents and models. It runs agents like Claude Code, Codex, or OpenHands against benchmarks like Terminal-Bench and SWE-Bench across many parallel sandboxes. boxd is one of Harbor's built-in environment providers, and it gives every trial its own isolated KVM microVM with a full Docker daemon, so Dockerfile and multi-container `docker-compose.yaml` tasks run unmodified:

```bash
uv tool install "harbor[boxd] @ git+https://github.com/harbor-framework/harbor.git"

export ANTHROPIC_API_KEY=<your-key>
export BOXD_API_KEY=<your-key>    # boxd auth keys create harbor
harbor run --dataset terminal-bench@2.0 --agent claude-code --model anthropic/claude-opus-5-5 --n-concurrent 8 --env boxd
```

The provider [merged upstream](https://github.com/harbor-framework/harbor/pull/2778) after Harbor 0.25.0, so the command above installs Harbor from its main branch. Once a release includes it, `uv tool install "harbor[boxd]"` installs the same provider from PyPI. Harbor running inside a boxd machine needs no `BOXD_API_KEY`, because the SDK authenticates from the machine itself.

Every machine Harbor creates is [isolated](/use-cases/sandboxes.md#cut-off-from-your-fleet-by-design). The agent under test keeps outbound internet for model APIs and package registries. It cannot reach your other machines, and it gets none of your connected integrations or agent logins. Isolation is fixed at creation. Tasks that ask for `no-network` run with the internet cut off as well.

Each concurrent trial is one machine, so your organization's machine quota caps `--n-concurrent`. `boxd manage billing` shows the quota.

## Start trials from a snapshot

For benchmarks, start from a [snapshot](/guides/snapshots.md). Prepare a machine, pull or build the task image on it, save a snapshot, and create every sandbox from it with `--ek from_snapshot=<snapshot>`. Each trial then restores a machine whose Docker cache already holds the task image instead of building it from scratch.

A snapshot lives in one [region](/guides/regions.md), so save it in the region the trials run in. The machine size comes from the snapshot, which means `from_snapshot` cannot be combined with `vcpu` or `memory`.

## Provider options

Pass these with `--ek <name>=<value>`, or under `environment.kwargs` in a job config. Harbor's [example config](https://github.com/harbor-framework/harbor/blob/main/examples/configs/environments/boxd.yaml) documents each one and runs with `harbor run -c boxd.yaml`.

| Option | Default | What it does |
| - | - | - |
| `from_snapshot` | unset | Create each machine from this snapshot. |
| `region` | `BOXD_REGION`, then the org's home region | Region to create machines in, such as `nyc`. The org must have it enabled. |
| `vcpu`, `memory` | the org's default size | Pin the [machine size](/guides/resources.md#machine-sizes). Naming either one picks the whole size, so `vcpu=4` and `memory=16G` are the same request. |
| `auto_destroy_timeout_sec` | `86400` | boxd deletes a machine this long after it boots, so a crashed harness cannot hold machines against your quota. The clock runs mid-trial too, so keep it above your longest trial. `0` turns it off. |
| `create_stagger_sec` | `0.5` | Minimum spacing between machine creations across the job. Raise it toward 1 or 2 seconds at very high concurrency. |
| `keep_machine_on_failure` | `false` | Leave the machine running when a trial fails to start, so you can SSH in and debug it. |

Harbor's [sandbox reference](https://harborframework.com/docs/sandboxes/pre-integrated-sandboxes) lists what each provider supports, from Docker Compose to network policies and CPU and memory limits.
