---
title: "Harbor / Terminal-Bench integration"
description: "Run Harbor and Terminal-Bench trials in E2B sandboxes. Pass -e e2b and Harbor builds each task's environment as an E2B template."
url: "https://e2b.dev/integrations/harbor"
---

# Harbor / Terminal-Bench

> Run Harbor trials, including Terminal-Bench, in E2B sandboxes instead of local containers. One flag moves a job to E2B, so you can raise concurrency without loading your machine.

Training & evals · [All integrations](https://e2b.dev/integrations.md)

## About this integration

- **Maintained by:** Harbor
- **How it works:** Built into Harbor
- **Package:** harbor[e2b]
- **Language:** Python
- **Upstream:** [harbor-framework/harbor · ★ 7.2k](https://github.com/harbor-framework/harbor)
- **Docs:** [docs.harborframework.com](https://docs.harborframework.com/sandboxes/pre-integrated-sandboxes)

## Get started

Paste the prompt into your coding agent, or follow the steps yourself.

### Paste this into your coding agent

```text
Run this project's Harbor evals on E2B sandboxes.

1. Install Harbor with the e2b extra ("harbor[e2b]"), for example with uv tool install.
2. Harbor needs the E2B_API_KEY environment variable. If it isn't set, ask me for my API key from https://console.e2b.dev/?tab=keys. Never hardcode it.
3. Follow the sandbox guide at https://docs.harborframework.com/sandboxes/pre-integrated-sandboxes and run the job with -e e2b, or set environment.type to e2b in the job config.
4. Run one small job and show me the trial results that came back from the sandboxes.
```

## Or set it up yourself

### 1. Install Harbor with E2B

```bash
uv tool install "harbor[e2b]"
```

### 2. Set your API key

```bash
export E2B_API_KEY="e2b_..."
```

### 3. Run Terminal-Bench on E2B

```bash
harbor run \
  -d terminal-bench@2.0 \
  -a codex -m openai/gpt-5.6-sol \
  -e e2b \
  -n 32
```

### 4. Or keep it in a job config

```json
{
  "n_concurrent_trials": 32,
  "environment": {
    "type": "e2b"
  },
  "agents": [
    {
      "name": "codex",
      "model_name": "openai/gpt-5.6-sol"
    }
  ],
  "datasets": [
    {
      "name": "terminal-bench",
      "version": "2.0"
    }
  ]
}
```

## What runs in the sandbox

Each Harbor trial runs in its own E2B sandbox, away from the machine running the job.

- **Code:** The agent under test and the task's verifier, inside the environment the task defines.
- **Environment:** Harbor builds the task's environment into an E2B template once and reuses it across trials.
- **Network:** Tasks can turn internet access off or allow only listed hostnames, and change that while a trial runs.
- **Lifetime:** Sandboxes are deleted after each trial by default. --no-delete keeps them for inspection.

## More training & eval tools

Other RL and eval frameworks that run rollouts on E2B.

- [Hugging Face OpenEnv](https://e2b.dev/integrations/openenv.md): Run OpenEnv environments like Terminus on E2B and get a first reward without a GPU.
- [Hugging Face TRL](https://e2b.dev/integrations/trl.md): Compute code rewards for TRL GRPO training in E2B sandboxes.
- [DSPy RLMs](https://e2b.dev/integrations/dspy.md): Run DSPy recursive language model (RLM) code in E2B sandboxes.

## Links

- [Get API key](https://console.e2b.dev/?tab=keys)
- [Read the docs](https://docs.harborframework.com/sandboxes/pre-integrated-sandboxes)
- [E2B documentation](https://docs.e2b.dev)
