Run Cloud Agents in a sandbox

Preview

Run Claude Code, Codex and OpenCode in a sandbox, with your own API key, your subscription, or the open models of Munito AI.

The ubuntu template has Claude Code, Codex and OpenCode installed.

AgentAPI keySubscriptionOpen models of Munito AI
Claude CodeANTHROPIC_API_KEYClaude Pro or MaxAnthropic-compatible API
CodexCODEX_API_KEYChatGPTResponses API
OpenCodeThe key of the providerGitHub Copilot, OpenCode Zen or OpenCode GoOpenAI-compatible API

Run an agent

  1. Create a sandbox from the ubuntu template. Put the keys of the agent in env.
  2. Run the agent with a command, or connect over SSH and use its terminal UI.
  3. Read the result in the output of the command, or in the files of the sandbox.
curl -sS --fail-with-body https://api.munito.ai/sandboxes/v1/sandboxes \
  -H "Authorization: Bearer $MUNITO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template": "ubuntu", "timeout": 3600, "env": {"ANTHROPIC_API_KEY": "sk-ant-..."}}'

Each command and each SSH shell of the sandbox gets the variables in env.

Limits

  • Commands and SSH shells run as root.
  • A command runs for 30 minutes or less. For a longer task, use nohup or tmux.
  • A persistent sandbox keeps its files and sign-ins when it pauses.

Keep your keys safe

Each program in the sandbox can read its environment, and the agent can too. Thus:

  • Use a key that you can revoke, with the smallest permissions and spend limit that the task needs.
  • To give a key to one command only, put the key in the env of that command.
  • Sign in to a subscription in the sandbox, over SSH. Then the sign-in does not go through the API.
  • Delete the sandbox when the task is complete.