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

# E2B sandboxes

> Run CostGraph workflows and CI jobs in E2B sandboxes: the key to create, its permissions, and its limits

E2B provides isolated Linux VM sandboxes for AI agents that can be created, paused, resumed and killed via its SDKs and CLI.

The following table shows what CostGraph runs on this provider.

| Workflows | CI runners | Connect with |
| - | - | - |
| Yes | Yes | Integrations or your own dispatcher |

## Connect

Connect E2B on Integrations, and CostGraph starts sandboxes in your E2B account. You don't run anything yourself.

1. In CostGraph, go to **Integrations > Sandbox > E2B**.

2. Enter these fields:

   * **API key** (`E2B_API_KEY`, required): An E2B API key from the Keys tab of the E2B console.

3. Click **Connect**.

Sandbox size comes from the template. Build a template with the size your jobs need and set it as `providerTemplate`.

### Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead.
Set `provider` to `e2b` and the preceding fields as environment variables, as described in [Run your own dispatcher](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md#run-your-own-dispatcher).

To see what E2B costs, connect the [E2B integration](https://docs.costgraph.ai/costgraph/integrations/e2b.md).

## Key and permissions

E2B\_API\_KEY is an E2B API key, found in the E2B console keys tab ([https://console.e2b.dev/?tab=keys](https://console.e2b.dev/?tab=keys)); the same key works for the SDKs and CLI.

Keys are not scoped by permission: "every API key is scoped to exactly one project" (formerly team) and acts on all of that project's sandboxes, templates and limits. No per-key permissions are documented.

Sources: [docs.e2b.dev: api key](https://docs.e2b.dev/api-key.md), [docs.e2b.dev: projects](https://docs.e2b.dev/projects.md), [docs.e2b.dev: billing](https://docs.e2b.dev/billing.md), [docs.e2b.dev: sandbox](https://docs.e2b.dev/sandbox.md), [docs.e2b.dev: sandbox lifetime](https://docs.e2b.dev/faq/sandbox-lifetime.md).

## Limits

* Max continuous runtime without pausing: Hobby 1 hour, Pro 24 hours; pausing resets it and paused sandboxes are kept indefinitely. ([source](https://docs.e2b.dev/billing.md))
* Default sandbox timeout is 5 minutes and the default onTimeout is 'kill' (destructive); set timeoutMs/timeout or call setTimeout to extend. ([source](https://docs.e2b.dev/faq/sandbox-lifetime.md))
* Max 8 vCPU / 8 GiB on Hobby (8+ on Pro via support), disk 10 GiB Hobby / 20+ GiB Pro; default 2 vCPU / 512 MiB; concurrent sandboxes Hobby 20, Pro 100-1,100. ([source](https://docs.e2b.dev/billing.md))
* A single streaming connection is not guaranteed past one hour; reconnect with commands.connect(pid). ([source](https://docs.e2b.dev/faq/sandbox-lifetime.md))
* EU region available on request for workspaces with a payment method. ([source](https://docs.e2b.dev/faq/eu-region.md))

## Related

* [Supported sandbox providers](https://docs.costgraph.ai/costgraph/workflows/sandbox-providers.md)
* [Run workflows on a managed sandbox provider](https://docs.costgraph.ai/costgraph/workflows/managed-sandboxes.md)
* [Run CI jobs in sandboxes](https://docs.costgraph.ai/costgraph/autopilot/ci-sandboxes.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.