> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anonalabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# A dev box for a coding agent

> Claude Code or Codex inside a sandbox, with previews you can open.

**You want** a coding agent to work in its own machine: install packages, run servers, break things.

**Pieces.** The `coding-agent` [template](https://docs.anonalabs.com/compute/concepts/templates.md#coding-agent) ships seven agent CLIs (Claude Code, Codex, OpenCode, pi, Kimi Code, Mistral Vibe, Cursor Agent), Node, Python, Bun, Rust, Java, `gh`, Chrome, `ripgrep` and `jq`, with 2 vCPU, 4 GiB and 8 GiB of disk.

**1. Create the sandbox with the agent's key**

Pass the provider key as an environment variable at create time. The agents need their own credentials.

```bash coding_box.sh theme={null}
SANDBOX_ID=$(anona-compute create -t coding-agent --timeout 1h --json | jq -r .sandboxID)
echo "$SANDBOX_ID"
anona-compute delete "$SANDBOX_ID"
```

**2. Work in it**

Open a terminal with [`anona-compute ssh`](https://docs.anonalabs.com/compute/guides/ssh) or watch and take over from the browser with [live view](https://docs.anonalabs.com/compute/guides/live-view.md).

**3. Show what it built**

When the agent starts a dev server on a port, share it with a [preview link](https://docs.anonalabs.com/compute/guides/preview-links.md): `anona-compute preview "$SANDBOX_ID" 3000`. The link works for anyone who has it, until it expires (1 minute to 24 hours).

**Driving it from your own agent.** Register the [MCP server](https://docs.anonalabs.com/compute/guides/mcp.md) so an outer agent can create these boxes and hand work to the one inside.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.