Skip to content

Sandbox API

Base path: /api/sandbox

All endpoints require authentication. See API Overview for auth details.

GET /api/sandbox/config

Response:

{
"mode": "selective",
"scope_mode": "session",
"workspace_access": "rw",
"resource_limits": {
"cpu_cores": 1.0,
"memory_mb": 512,
"disk_mb": 2048,
"max_processes": 50,
"timeout_seconds": 300
},
"network_policy": {
"enabled": false,
"allowed_domains": [],
"blocked_domains": []
}
}
PUT /api/sandbox/config
{
"mode": "all",
"network_policy": {
"enabled": true,
"allowed_domains": ["api.github.com", "registry.npmjs.org"]
}
}

Config values:

FieldOptionsDescription
modeoff, selective, allSandboxing mode
scope_modesession, agent, sharedContainer persistence
workspace_accessnone, ro, rwAccess to agent workspace
GET /api/sandbox/status
{
"docker_available": true,
"docker_version": "25.0.4",
"active_containers": 2,
"total_executions_today": 247
}
GET /api/sandbox/containers

Response:

{
"containers": [
{
"id": "container_abc123",
"agent_id": "agent_123",
"scope": "agent",
"status": "running",
"created_at": "2026-03-02T10:00:00Z",
"cpu_percent": 5.2,
"memory_mb": 256,
"executions_count": 42
}
]
}
GET /api/sandbox/containers/{id}
POST /api/sandbox/containers/{id}/stop
POST /api/sandbox/containers/{id}/restart
DELETE /api/sandbox/containers/{id}

Permanently removes the container and its data.

POST /api/sandbox/containers/cleanup

Removes idle or orphaned containers.

GET /api/sandbox/containers/{id}/snapshots
POST /api/sandbox/containers/{id}/snapshots
POST /api/sandbox/containers/{id}/snapshots/{sid}/rollback
DELETE /api/sandbox/containers/{id}/snapshots/{sid}

Save and restore container state via snapshots.

GET /api/sandbox/templates
POST /api/sandbox/templates
POST /api/sandbox/templates/{id}/build
POST /api/sandbox/templates/{id}/pull
DELETE /api/sandbox/templates/{id}

Manage container image templates.

GET /api/sandbox/audit
GET /api/sandbox/audit/summary
POST /api/sandbox/audit/cleanup
GET /api/sandbox/audit/{id}/output

Query sandbox execution audit logs.

GET /api/sandbox/pool
POST /api/sandbox/pool/drain

Manage the pre-warmed container pool.

GET /api/sandbox/gpu

List available GPU resources.

Default limits by permission tier:

TierCPUMemoryDiskTimeoutNetwork
Sandbox0.25 cores128 MB512 MB60sNone
Restricted0.5 cores256 MB1 GB120sNone
Standard1.0 core512 MB2 GB300sRestricted
Elevated2.0 cores1 GB5 GB600sFull
Unrestricted4.0 cores2 GB10 GB1800sFull