agent_id coding. It sleeps after 15 idle minutes and wakes when you use it.
Besides the browser, you can:
- open its terminal from your own machine with
singularity sandbox connect, - run commands and move files from a script,
- talk to its coding agent from any OpenAI client.
What you need
A compute API key from Settings > API keys with the Agent Pods permission Read and write pod files, install skills, create and restore backups (pods:control:write), or a Solana keypair.
From your terminal
The
sandbox command is available from CLI 0.5.0.connectneeds Node 22 or newer.- With more than one sandbox, name it: its id, the first few characters of the id, or its name (
singularity sandbox connect 99a7). --keypair <path>signs with a Solana keypair instead of a key.--jsongives machine-readable output.
Terminal over WebSocket
The same path the browser terminal uses. The connection is relayed through the sandbox’s own outbound link: no SSH, no open port.- Open
wss://compute.x402layer.ccfollowed bypath. The ticket works once, within 60 seconds. - Send a text frame
{"cols": 120, "rows": 40}to set the terminal size. - Binary frames you send are keystrokes. Binary frames you receive are terminal output.
- Close code
4006means the terminal closed after 10 idle minutes.
Run a command, read and write files
The Sandbox API works on a Coding sandbox. A sleeping sandbox wakes for these calls.An OpenAI-compatible address
Create a key for the sandbox. It is shown once.agent-pod:
GET /v1/modelsandPOST /v1/chat/completions. With"stream": trueyou getchat.completion.chunkevents ending withdata: [DONE].- Each request is one turn of the sandbox’s coding agent. Up to 1000 requests per key per day.
- OpenCode and Pi on Singularity Layer models use your credits. Claude Code runs only on your own Claude login or Anthropic key.
Other ways in
- MCP:
cloud_pod_exec,cloud_pod_filesandcloud_pod_write_fileon the Singularity MCP work on a Coding sandbox. - Skills:
references/coding-sandbox.mdin the x402-compute skill.
