> ## 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.

# BoxCompute sandboxes

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

BoxCompute provides isolated VM sandboxes inside account-owned workspaces that agents create and run commands in through a single account-scoped API.

The following table shows what CostGraph runs on this provider.

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

## Connect

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

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

2. Enter these fields:

   * **API key** (`BOXCOMPUTE_API_KEY`, required): A BoxCompute API key from app.boxcompute.ai/api-keys.
   * **Workspace ID** (`BOXCOMPUTE_WORKSPACE_ID`, required): The BoxCompute workspace sandboxes are created in.

3. Click **Connect**.

### Your own dispatcher

To keep the key out of CostGraph or reach a private network, run your own dispatcher instead.
Set `provider` to `boxcompute` 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 BoxCompute costs, connect the [BoxCompute integration](https://docs.costgraph.ai/costgraph/integrations/boxcompute.md).

## Key and permissions

BOXCOMPUTE\_API\_KEY is a BoxCompute API key (bc\_live\_...), created at app.boxcompute.ai/api-keys via New API key > Create key; shown once. BOXCOMPUTE\_WORKSPACE\_ID is the id of a workspace owned by the account (listable with sandbox:read).

Keys have scopes: workspace:create, sandbox:read, sandbox:create, sandbox:execute, sandbox:delete, usage:read, email:send. CostGraph needs sandbox:create, sandbox:read (inspect/list), sandbox:execute and sandbox:delete. However, keys created on the API keys page get all seven scopes and there is no scope picker, so in practice a dashboard key has full account access.

Sources: [boxcompute.ai: docs](https://boxcompute.ai/docs), [boxcompute.ai: api keys](https://boxcompute.ai/docs/api-keys), [boxcompute.ai: sandboxes](https://boxcompute.ai/docs/sandboxes), [boxcompute.ai: execute](https://boxcompute.ai/docs/execute).

## Limits

* Execute timeoutSeconds 1-900 (default 120); maxOutputBytes up to 1,048,576. ([source](https://boxcompute.ai/docs/execute))
* A running VM stops 30 minutes after the last API call that used it, and requests sleep after about 42 hours of continuous uptime (disk kept, processes stop). ([source](https://boxcompute.ai/docs/sandboxes))
* VM Sandboxes are labelled Beta; root disk 30 GiB; max 10 workspaces per account; each run billed at least 60 s. Sizes, regions and architecture are not documented. ([source](https://boxcompute.ai/docs/sandboxes))

## 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.