# Compute (/build/compute)

<PreviewBadge />

Compute chooses where Dome runs a [managed agent](/build/agents/managed). The dashboard and CLI call this resource **compute**. The API calls it a **compute connection**. Every sandbox run starts with a fresh machine, and Dome removes it when the run ends. Use an external compute when you need the sandbox to run in an account or infrastructure you control. Without one, a managed agent uses built-in Dome compute.

## What compute provides [#what-compute-provides]

Compute separates the execution environment from the agent's identity, model, gateway, and triggers. It applies only to managed agents. External agents continue to run in the runtime you operate.

| Capability             | Behavior                                                                                |
| ---------------------- | --------------------------------------------------------------------------------------- |
| Per-run isolation      | Each attempt starts in a fresh sandbox instead of reusing another run's machine.        |
| Provider choice        | Select Dome, Tensorlake, E2B, Vercel, or AWS Nitro when available to your organization. |
| Automatic cleanup      | Dome ends an external sandbox when the run ends and keeps retrying cleanup when needed. |
| Agent-level assignment | A managed agent has one compute assignment. New runs use its current assignment.        |
| Governed execution     | The sandbox uses the agent's existing gateway, rules, audit trail, and run limits.      |

> **Note**: Compute is in preview. Ask an organization owner or administrator to [enable public preview](/manage/public-preview). Providers are available only when your organization enables them. Use `dome compute providers` to see the providers and exact requirements available in your workspace.

## Choose a provider [#choose-a-provider]

The built-in connection is the simplest starting point. An external provider lets you run each sandbox through credentials or infrastructure that you configure.

| Provider   | What you configure                           | When to choose it                                                                       |
| ---------- | -------------------------------------------- | --------------------------------------------------------------------------------------- |
| Dome       | Nothing                                      | Use Dome-managed sandboxes. This built-in connection is the default for managed agents. |
| Tensorlake | API key                                      | Run sandboxes through your Tensorlake account.                                          |
| E2B        | API key                                      | Run sandboxes through your E2B account.                                                 |
| Vercel     | Team ID, project ID, and token               | Run sandboxes through a Vercel project.                                                 |
| AWS Nitro  | Region, EKS cluster, namespace, and IAM role | Run sandboxes in a dedicated Amazon EKS namespace with Nitro Sandbox isolation.         |

Provider settings are not interchangeable. The provider catalog returns the authoritative field names and setup values for your workspace.

```bash
dome compute providers
```

For AWS Nitro, follow the full [AWS Nitro setup guide](/build/compute/aws-nitro). It explains the EKS, IAM, network policy, and validation requirements.

## Understand compute [#understand-compute]

Read the [compute concept](/concepts/agents/compute) to understand how compute fits with managed agents, triggers, gateways, audit, sandbox lifecycle, and configuration portability. It also explains the differences between built-in and external compute before you choose a provider.

## Create a connection [#create-a-connection]

Creating a connection records the provider settings and stores credentials without returning them. Provider settings are readable to authorized users. Credentials are write-only, so retain their source of truth outside Dome.

**CLI**

```bash
dome compute create \
  --name e2b-production \
  --provider e2b \
  --credential api_key="$E2B_API_KEY"
```

> **Note**: Reference: [`dome compute create`](/cli/build/compute#create-a-connection)

**MCP**

Tool: `dome_compute_create`

```json
{
  "name": "e2b-production",
  "provider": "e2b",
  "kind": "sandbox",
  "credentials": {
    "api_key": "{{E2B_API_KEY}}"
  }
}
```

> **Note**: Reference: [compute MCP tools](/reference/mcp/compute)

**API**

```http
POST /v1/compute-connections
Content-Type: application/json

{
  "workspace_id": "{{WORKSPACE_ID}}",
  "name": "e2b-production",
  "provider": "e2b",
  "kind": "sandbox",
  "credentials": {
    "api_key": "{{E2B_API_KEY}}"
  }
}
```

> **Note**: Reference: [compute API](/api/tag/compute)

The connection's provider and kind are immutable. Rename it, replace all provider settings, or replace the complete credential set with an update. A partial credential update is rejected because every provider credential key must be supplied together.

## Assign compute to a managed agent [#assign-compute-to-a-managed-agent]

An agent without an explicit assignment uses built-in Dome compute. Assign a named compute when new runs should use an external provider. An assignment change does not move a run that is already in progress. Assigning external compute also requires `compute.view`, in addition to the managed-agent permission for the create or update.

**CLI**

```bash
dome managed-agents update nightly-triage --compute e2b-production
```

You can set the connection during creation with `dome managed-agents create --compute e2b-production`.

**MCP**

Pass `compute: "e2b-production"` to `dome_managed_agents_create` or `dome_managed_agents_update`.

> **Note**: Reference: [Managed-agent MCP tools](/reference/mcp/managed-agents)

**API**

Set `compute_connection_id` in the create or update managed-agent request.

> **Note**: Reference: [Managed agents API](/api/tag/managed-agents)

## Inspect, validate, and change connections [#inspect-validate-and-change-connections]

Use the connection details and usage information before you modify or remove a connection. The usage response identifies attached agents when you also have permission to view managed agents.

| Task                                | CLI                                                       | API                                                  | MCP                   |
| ----------------------------------- | --------------------------------------------------------- | ---------------------------------------------------- | --------------------- |
| List connections                    | `dome compute list`                                       | `GET /v1/compute-connections`                        | `dome_compute_list`   |
| Read one connection                 | `dome compute get NAME-OR-ID`                             | `GET /v1/compute-connections/{connection_id}`        | `dome_compute_get`    |
| See attached agents and active runs | `dome compute usage NAME-OR-ID`                           | `GET /v1/compute-connections/{connection_id}/usage`  | `dome_compute_usage`  |
| Replace settings or credentials     | `dome compute update NAME-OR-ID`                          | `PATCH /v1/compute-connections/{connection_id}`      | `dome_compute_update` |
| Check AWS Nitro setup               | `dome compute check NAME-OR-ID --wait`                    | `POST /v1/compute-connections/{connection_id}/check` | `dome_compute_check`  |
| Delete a connection                 | `dome compute delete NAME-OR-ID --reassign-to NAME-OR-ID` | `DELETE /v1/compute-connections/{connection_id}`     | `dome_compute_delete` |

AWS Nitro checks run asynchronously. A provider-settings change requests a new check, and `--wait` waits for its result. Other providers do not have a setup check.

## Delete or reassign a connection [#delete-or-reassign-a-connection]

Delete a non-built-in connection only after understanding its assignments. You can move managed agents to another usable sandbox connection as part of deletion. When `reassign_to` is omitted, Dome moves them to the built-in connection.

```bash
dome compute delete e2b-production --reassign-to aws-production
```

Dome rejects a delete while the compute has a running sandbox or a completed sandbox that still needs cleanup. Queued runs follow the agent's new compute. The built-in Dome compute cannot be deleted. If a compute is busy, suspend its managed agents or let their runs finish, then retry the delete.

## Provider validation and preview limits [#provider-validation-and-preview-limits]

Provider validation differs by provider. Knowing that difference helps you choose a safe first test after creating a compute.

| Provider type               | Validation behavior                                                                 | First-run guidance                                                                                                                                   |
| --------------------------- | ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Tensorlake, E2B, and Vercel | Dome stores the credential without calling the provider at create time.             | Start a small manual run to prove the key, provider capacity, egress setup, and provider plan. A rejected key or plan appears as `compute_rejected`. |
| AWS Nitro                   | Dome starts an asynchronous setup check after creation or provider-setting changes. | Wait for the check to pass, then start a manual run to prove the complete path.                                                                      |

Sandbox compute is ephemeral. It does not provide long-running compute, persistent files, customer-managed code, provider selection per run, or per-compute region, size, or concurrency controls.

## AWS Nitro setup checks [#aws-nitro-setup-checks]

AWS Nitro validates a role and EKS configuration in a fixed order. Check results identify the first failed step and distinguish a customer configuration issue from a Dome-side failure or AWS throttling.

| Check                       | What it verifies                                                           |
| --------------------------- | -------------------------------------------------------------------------- |
| `role_trust`                | The configured role can be assumed by Dome's workspace-specific principal. |
| `role_requires_external_id` | The role requires this workspace's external ID.                            |
| `cluster_lookup`            | The EKS cluster exists and meets the supported version requirement.        |
| `cluster_reachable`         | Dome can reach the EKS API endpoint.                                       |
| `namespace`                 | The configured namespace exists and is usable.                             |
| `kubernetes_role`           | The namespace role gives only the required scoped permissions.             |
| `admission_rule`            | The `dome-run-scope` admission rule is installed.                          |
| `sandbox_runtime`           | The `isolated-sandbox` RuntimeClass is available.                          |

Run the check after any infrastructure or IAM change. A run does not wait for an in-progress check, but an unsafe external-ID configuration prevents it from starting.

## Observe compute runs [#observe-compute-runs]

Use managed-agent run details to find the compute provider and Provider ID for an external sandbox. The [compute concept](/concepts/agents/compute#observe-and-move-configuration) explains the sandbox lifecycle and related audit events. For event contracts, use the [audit event catalog](/reference/events/catalog).

## Export and import compute [#export-and-import-compute]

Compute participates in [configuration import and export](/manage/import-export). A non-built-in compute exports as a `dome_compute` resource. Provider credentials export as sensitive variables, never as credential values. Managed agents assigned to an external compute retain that relationship in the export, while an assignment to built-in Dome compute is omitted because it is the default.

Export and import are also preview-gated for compute. Include the compute resource and its managed-agent dependents when you want to reproduce their relationship in another workspace.

## Permissions [#permissions]

Compute access is permission-bound. The following permissions apply in addition to managed-agent permissions when an operation reassigns agents.

| Permission             | Grants                                                                                                    |
| ---------------------- | --------------------------------------------------------------------------------------------------------- |
| `compute.view`         | List and read compute, providers, and usage. Also required to assign external compute to a managed agent. |
| `compute.manage`       | Create, update, check, and delete connections.                                                            |
| `managedagents.manage` | Required with `compute.manage` when deletion moves managed agents.                                        |
| `managedagents.view`   | Shows attached agent details in compute usage.                                                            |

## Related references [#related-references]

Use these references when you automate compute or integrate it into an operational workflow.

* [AWS Nitro setup](/build/compute/aws-nitro)
* [Managed agents](/build/agents/managed)
* [Compute CLI](/cli/build/compute)
* [Compute MCP tools](/reference/mcp/compute)
* [Compute API](/api/tag/compute)
* [Import and export configuration](/manage/import-export)