# Evals with Harbor Run Harbor evals, such as Terminal-Bench, in sandboxes with `fdtn harbor`. No fork, plugin or Docker. ## How it works - `fdtn harbor` runs your installed `harbor`. For `harbor run`, it selects Foundational Compute and passes your key only in Harbor's environment. - Each sandbox start can wait in the queue up to 30 minutes. Harbor alone stops after 1 to 2 minutes. - Harbor keeps its own output, results and exit code, and gets Ctrl-C. ## 1. Install Harbor Needs Python 3.12+, [uv](https://docs.astral.sh/uv/) and the current `fdtn`. Install this tested release: ```bash $ uv tool install "harbor[e2b]==0.25.0" ``` ## 2. Save your API key ```bash $ fdtn auth ``` In CI, set `FDTN_API_KEY` ([API keys](https://fdtn.dev/docs/keys.md)). ## 3. Run two Terminal-Bench tasks The `oracle` agent runs each task's own solution and needs no model key. ```bash $ fdtn harbor run -d terminal-bench@2.0 -a oracle -n 2 \ --include-task-name cancel-async-tasks --include-task-name regex-log $ fdtn harbor view ./jobs # open Harbor's result viewer ``` - The first run builds one template per task, such as `regex-log__37f0f6eb17a7`. Later runs reuse them. Delete with `fdtn template delete --yes`. - Harbor writes logs and a reward per trial under `jobs/`. These two tasks took about 2 minutes, reward 1.0 each. A job can exit 0 while a task gets reward 0. Check each reward. ## 4. Run your own agent or task Replace `-a oracle` with your agent and set its model key in your shell. Pass agent options with `--ek key=value`. ```bash $ fdtn harbor run -p ./my-task -a oracle -n 1 # a task folder on your computer $ fdtn harbor run -d terminal-bench@2.0 -a oracle -n 2 # all 89 tasks ``` ## Options All other options pass to Harbor. `fdtn harbor run --help` shows Harbor's help. | Option | What it does | |---|---| | `-e`, `--env`, `--environment-type`, `--environment-import-path` | Not allowed; `fdtn` sets the environment. | | `-n` | Tasks at once | | `--ek sandbox_timeout_secs=3600` | Sandbox lifetime. Default and maximum 86,400 s (24 h). | | `--environment-build-timeout-multiplier` | Multiplies the 600 s build limit. | ## Limits - A task starts when a machine has its template and enough free memory. - One container per task. - Tasks can run on Host computers. Use public tasks only, with no private data or credentials. [Security](https://fdtn.dev/docs/security.md) - Queue and spending: [Limits and billing](https://fdtn.dev/docs/limits.md). ## Terminal-Bench 2.0 | Tasks | 89 | |---|---| | CPU | 84 × 1 vCPU, 3 × 2, 2 × 4 | | Memory | 69 × 2 GiB, 17 × 4 GiB, 3 × 8 GiB | ## Cost ``` # 1 vCPU, 2 GiB task that runs 15 minutes (1 × $0.018 + 2 × $0.006) = $0.030 per hour $0.030 × 0.25 h = $0.0075 ``` ## Errors | Message | Fix | |---|---| | `Harbor is not installed or is not on PATH.` | Run the install line. Put uv's tool folder on PATH. | | `fdtn selects the Harbor environment. Remove the environment option.` | Remove `-e` or `--env`. | | `No API key on this computer.` | Run `fdtn auth`. In CI, set `FDTN_API_KEY`. | | Trials time out at the start | Lower `-n` and stop unused sandboxes. | | A build stops at its time limit | Add `--environment-build-timeout-multiplier 2`. | Other errors: [Troubleshooting](https://fdtn.dev/docs/troubleshooting.md). ## Next - [**Limits and billing**: Queue and spending limits.](https://fdtn.dev/docs/limits.md) - [**Many sandboxes**: Start groups from your code.](https://fdtn.dev/docs/parallel.md) Source: https://fdtn.dev/docs/harbor/