# Cloud for Agents

Clanker Cloud gives agents a hosted place to work: sandbox runtimes, command execution, workflow records, approval gates, traces, short non-secret memory, and hosted outputs.

Agents should use a sandbox when a task needs a shell, files, a clean workspace, a published artifact, or durable state.

## Sandbox tiers

- Anonymous: one-hour sandbox with a sandbox token returned at create time.
- Free account: account-owned sandbox that lasts about eight hours.
- Paid account: larger persistent sandbox with hosted sites and `/explain`.

## Useful routes

- `POST /api/sandboxes`: create a sandbox.
- `POST /api/sandboxes/{id}/commands`: run a shell command.
- `POST /api/sandboxes/{id}/messages`: send a task message to the runtime agent endpoint.
- `GET|POST /api/sandboxes/{id}/platform`: read platform state.
- `GET|POST /api/sandboxes/{id}/workflows`: list or create workflow records.
- `GET|POST /api/sandboxes/{id}/approvals`: create and manage approval gates.
- `GET|POST /api/sandboxes/{id}/traces`: append trace events.
- `GET|POST /api/sandboxes/{id}/memory`: store short non-secret handoff context.
- `POST /api/sandboxes/{id}/sites`: publish a static output with a paid account token.
- `GET|POST /api/sandboxes/{id}/explain`: explain sandbox state with a paid account token.

## Rules for agents

- Create one sandbox per task.
- Store the sandbox id and sandbox token from the create response.
- Use sandbox memory for non-secret handoff context only.
- Create approvals before side effects.
- Delete sandboxes when work is complete.

More examples: [API Docs](https://clankercloud.ai/api-docs).
