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

# Archil sandboxes

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

Archil persistent sandboxes are Firecracker microVMs whose root filesystem is a durable Archil disk, with pause/resume and fork, managed through the Archil control-plane 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 Archil on Integrations, and CostGraph starts sandboxes in your Archil account. You don't run anything yourself.

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

2. Enter these fields:

   * **API key** (`ARCHIL_API_KEY`, required): An Archil API key from API Keys in the Archil console.
   * **Region** (`ARCHIL_REGION`, required): The Archil region the key was created in, for example aws-us-east-1.

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 `archil` 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 Archil costs, connect the [Archil integration](https://docs.costgraph.ai/costgraph/integrations/archil.md).

## Key and permissions

ARCHIL\_API\_KEY is an Archil control-plane API key (key-...), created in the Archil console via API Keys > Create API Key (or disk CLI / createApiKey). ARCHIL\_REGION is the Archil region id the key was created in, for example aws-us-east-1, aws-us-west-2, aws-eu-west-1; a key works only in its own region.

Keys are not scoped: full access to the organization or personal account within the key's region. The docs state API keys 'have full access to disks in the organization or personal account which created them, including the ability to read data, delete disks, and run sandboxes.'

Sources: [docs.archil.com: authorization](https://docs.archil.com/concepts/authorization.md), [docs.archil.com: limits](https://docs.archil.com/reference/limits.md), [docs.archil.com: regions](https://docs.archil.com/reference/regions.md), [docs.archil.com: introduction](https://docs.archil.com/compute/sandboxes/introduction.md), [docs.archil.com: typescript](https://docs.archil.com/sdks/typescript).

## Limits

* Max 32 vCPU and 64 GiB memory per sandbox; x86-64 images only. ([source](https://docs.archil.com/reference/limits.md))
* Max session length 24 hours, then the sandbox pauses with processes intact; default idle timeout 30 minutes (max 24 hours). On the Free plan a session lasts at most 30 minutes. ([source](https://docs.archil.com/reference/limits.md))
* Persistent sandboxes run only in the AWS public regions aws-us-east-1, aws-us-west-2, aws-eu-west-1 (not gcp-us-central1). ([source](https://docs.archil.com/reference/regions.md))
* Persistent sandboxes are generally available; no per-command timeout. ([source](https://docs.archil.com/compute/sandboxes/introduction.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.