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

# Beam sandboxes

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

Beam (beam.cloud) is a serverless CPU/GPU cloud whose Sandboxes are disposable containers for agent code that boot in seconds and can fork from snapshots.

The following table shows what CostGraph runs on this provider.

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

## Connect

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

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

2. Enter these fields:

   * **API token** (`BEAM_TOKEN`, required): A Beam workspace API token from Settings > API keys.
   * **Workspace ID** (`BEAM_WORKSPACE_ID`, required): The ID of the Beam workspace the token belongs to.

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 `beam` 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).

## Key and permissions

BEAM\_TOKEN is a Beam workspace API token, created in the Beam dashboard under Settings > API keys (platform.beam.cloud/settings/api-keys). BEAM\_WORKSPACE\_ID is the workspace's external\_id, returned by GET [https://app.beam.cloud/api/v1/workspace/current](https://app.beam.cloud/api/v1/workspace/current) with that token.

Beam API tokens are workspace credentials with no per-token scopes or roles.

Sources: [docs.beam.cloud: authentication](https://docs.beam.cloud/v2/getting-started/authentication.md), [docs.beam.cloud: platform api](https://docs.beam.cloud/v2/reference/platform-api.md), [docs.beam.cloud: configuration](https://docs.beam.cloud/v2/sandbox/configuration.md), [docs.beam.cloud: overview](https://docs.beam.cloud/v2/sandbox/overview.md), [docs.beam.cloud: pricing and billing](https://docs.beam.cloud/v2/resources/pricing-and-billing.md).

## Limits

* Sandbox lifetime is keep\_warm\_seconds, a TTL from creation, not an idle timer: 'Running processes do not make a finite TTL unlimited.' Python default is 600 seconds; -1 means run until explicitly terminated; sb.update\_ttl() resets it. ([source](https://docs.beam.cloud/v2/sandbox/configuration.md))
* Python Sandbox defaults to 1 CPU and 128 MiB memory; larger cpu/memory and GPUs are requested per sandbox. No per-sandbox maximum is documented. ([source](https://docs.beam.cloud/v2/sandbox/overview.md))
* Billing is usage-based; prepaid workloads stop when the credit balance runs out. ([source](https://docs.beam.cloud/v2/resources/pricing-and-billing.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.