# Volcengine AgentKit Sandbox

Create the 2x4 sandbox template and the IAM user access key that let Sandcovery run AgentKit sandboxes in your own Volcengine account.

Sandcovery runs each sandbox as a session of an AgentKit sandbox template in your Volcengine account, in `cn-beijing` (Beijing) or `cn-shanghai` (Shanghai), the two regions AgentKit runs in.

## What runs

| Option           | Support                         |
| ---------------- | ------------------------------- |
| Size             | `2x4` only                      |
| Egress           | `allow_all` only                |
| Lifetime         | Up to 24 hours                  |
| Pause and resume | Yes, keeping files              |
| Command output   | Returned when the command exits |
| Region           | `cn-beijing` or `cn-shanghai`   |

A sandbox template fixes the size of every session it starts, so Sandcovery routes Volcengine only `2x4` requests and checks before each create that your template runs 2 vCPU and 4 GiB.

Environment variables set at create are available. A pause keeps the session's files but not its running processes, and a resumed session keeps its original expiry. Files, snapshots, port previews, custom images, disk sizes, idle timeouts, and GPUs are not available on this provider.

## Create the sandbox template

In the [AgentKit console](https://console.volcengine.com/agentkit), open **沙箱模板** (Sandbox Templates) in `cn-beijing` or `cn-shanghai` and create a template from the AIO Sandbox preset with an instance specification of 2 vCPU and 4 GiB. Copy its template ID, which starts with `t-`.

## Create the access key

In the [IAM console](https://console.volcengine.com/iam/identitymanage/user), create a custom policy with this document, create an IAM user with only that policy, and create an access key for that user. Never add your root account's keys. The policy allows only the ten AgentKit calls Sandcovery makes.

```json
{
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "agentkit:GetTool",
        "agentkit:CreateSession",
        "agentkit:GetSession",
        "agentkit:ListSessions",
        "agentkit:DeleteSession",
        "agentkit:SetSessionTtl",
        "agentkit:PauseSession",
        "agentkit:ResumeSession",
        "agentkit:AsyncExecCommand",
        "agentkit:ViewAsyncCommand"
      ],
      "Resource": ["*"]
    }
  ]
}
```

## Add the credential

In **Provider Credentials** in the [dashboard](/app/credentials), add these four fields for Volcengine AgentKit Sandbox:

- IAM user Access Key ID
- IAM user Secret Access Key
- Region, `cn-beijing` or `cn-shanghai`, where the template is
- Sandbox template ID

## Costs

Volcengine bills each running sandbox to your Volcengine account per second, at CNY 0.0000405 per vCPU-second and CNY 0.0000102 per GB-second, plus CNY 0.8 per GB of public outbound traffic, so a `2x4` sandbox costs about CNY 0.45 an hour. Volcengine requires real-name verification and prepaid funds in your account before AgentKit opens.
