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

# Alibaba Cloud Agent Sandbox sandboxes

> Run CostGraph workflows and CI jobs in Alibaba Cloud Agent Sandbox sandboxes: the key to create, its permissions, and its limits

Alibaba Cloud Agent Sandbox (Flash Edition) is a managed code-execution sandbox service that exposes an E2B-SDK-compatible API for creating, running commands in, listing and killing sandboxes.

The following table shows what CostGraph runs on this provider.

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

## Connect

Connect Alibaba Cloud Agent Sandbox on Integrations, and CostGraph starts sandboxes in your Alibaba Cloud Agent Sandbox account. You don't run anything yourself.

1. In CostGraph, go to **Integrations > Sandbox > Alibaba Cloud Agent Sandbox**.

2. Enter these fields:

   * **API key** (`ALIBABA_SANDBOX_API_KEY`, required): An Agent Sandbox API key from the Agent Sandbox console.
   * **Region** (`ALIBABA_SANDBOX_REGION`, required): The region Agent Sandbox is deployed in, for example cn-hangzhou.

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 `alibaba` 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 Alibaba Cloud Agent Sandbox costs, connect the [Alibaba Cloud Agent Sandbox integration](https://docs.costgraph.ai/costgraph/integrations/alibaba.md).

## Key and permissions

ALIBABA\_SANDBOX\_API\_KEY is an Agent Sandbox Flash Edition API key, created in the Agent Sandbox console under Speed Edition > API Keys > Create an API Key (shown once; requires Function Compute and Agent Sandbox Flash Edition to be activated). ALIBABA\_SANDBOX\_REGION is the region where Flash Edition is deployed (cn-beijing, cn-shanghai, cn-hangzhou, cn-shenzhen, cn-hongkong, ap-southeast-1, us-east-1, us-west-1); it builds `https://api.<region>.sandbox.aliyuncs.com.`

Not documented. The key-creation page lists no scopes or per-key permissions; it only says the account or RAM user creating the key needs permission to manage Flash Edition API keys (no RAM action named).

Sources: [www.alibabacloud.com: create api key](https://www.alibabacloud.com/help/en/agent-sandbox/create-api-key), [www.alibabacloud.com: e2b sdk compatible api list](https://www.alibabacloud.com/help/en/agent-sandbox/e2b-sdk-compatible-api-list), [www.alibabacloud.com: e2b sdk integration parameter description](https://www.alibabacloud.com/help/en/agent-sandbox/e2b-sdk-integration-parameter-description), [www.alibabacloud.com: lifecycle](https://www.alibabacloud.com/help/en/agent-sandbox/user-guide/lifecycle).

## Limits

* Sandbox timeout set via setTimeout cannot exceed 86400 seconds (24 hours). ([source](https://www.alibabacloud.com/help/en/agent-sandbox/user-guide/lifecycle))
* Pause and resume is available only to allowlisted accounts. ([source](https://www.alibabacloud.com/help/en/agent-sandbox/user-guide/lifecycle))
* Snapshots and the Volume API are not supported through the E2B compatibility layer; capabilities depend on account quotas and region availability. CPU/memory caps, architecture and preview status are not documented. ([source](https://www.alibabacloud.com/help/en/agent-sandbox/e2b-sdk-compatible-api-list))
* Key, API URL, domain, template and sandbox must all be in the same account and region or auth/creation fails. ([source](https://www.alibabacloud.com/help/en/agent-sandbox/create-api-key))

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