> ## 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.

# Templates

> The images sandboxes start from.

A template is the image a sandbox boots from, plus its default size. Every template runs Ubuntu 24.04 with E2B's `envd` 0.5.13 on port 49983, the user `user` (uid 1000) and `tini`, and starts nothing else at boot unless it says so. That keeps idle sandboxes small, which is what keeps them cheap.

| Template | Adds | vCPU | Memory | Disk |
| - | - | - | - | - |
| `base` (default) | git, less, unzip, xz-utils, OpenSSH client and an on-demand SSH server | 2 | 1 GiB | 1 GiB |
| `python` | `base` + Python 3.12, build-essential, uv, a venv at `/opt/venv` with numpy, pandas, requests, httpx | 2 | 2 GiB | 2 GiB |
| `node` | `base` + Node.js 24 LTS, npm, pnpm (`npm i -g` goes to `~/.npm-global`) | 2 | 2 GiB | 2 GiB |
| `code-interpreter` | `python` + Jupyter Server and E2B's code-interpreter server on port 49999 | 2 | 2 GiB | 2 GiB |
| `desktop` | Xvfb, XFCE, xdotool, scrot, x11vnc, noVNC on 6080, Google Chrome. Nothing runs until you start the desktop | 2 | 2 GiB | 4 GiB |
| `coding-agent` | `python` + Node 24, Bun, Rust, Java 21, gh, Docker CLI (no daemon), Chrome, ripgrep, jq and seven coding-agent CLIs: Claude Code, Codex, OpenCode, pi, Kimi Code, Mistral Vibe, Cursor Agent | 2 | 4 GiB | 8 GiB |

Pick one by name:

```python template.py theme={null}
from anona import Sandbox

sbx = Sandbox.create("python")
print(sbx.get_info().template_id)
sbx.kill()
```

```typescript template.ts theme={null}
import { Sandbox } from "@anona/sdk";

const sbx = await Sandbox.create("python");
console.log((await sbx.getInfo()).templateId);
await sbx.kill();
```

```bash template.sh theme={null}
anona-compute run -t python -- 'echo running in a python sandbox'
anona-compute config set default_template python   # the CLI's default for create and run
```

## code-interpreter

The `code-interpreter` template runs E2B's own code-interpreter server (a Python kernel behind Jupyter) on port 49999, the server the `e2b-code-interpreter` SDK talks to. Create it with `Sandbox.create(template="code-interpreter")` from that SDK. Running the `e2b-code-interpreter` SDK end to end against Anona is not part of the published compatibility checks yet.

## coding-agent

Each agent CLI in `coding-agent` has the `anona-computer-use` MCP server registered in its own config, and an `anona` skill installed. The computer-use server is a placeholder today: its `screenshot`, `mouse_move`, `click`, `type_text` and `key` tools call `scrot` and `xdotool` and need a running X display. The agents need their own provider credentials; pass them as environment variables at create time.

## Build your own

Build a template from a Dockerfile with the CLI, or from the E2B SDK's `Template.build`. The gateway builds the image with BuildKit in an isolated builder, adds the Anona runtime layer (`envd`, the entrypoint and the guest agent), pushes it and registers it; sandboxes then start from it by name.

```bash template_build.sh theme={null}
cat > Dockerfile <<'EOF'
FROM python:3.12-slim
RUN pip install --no-cache-dir polars
EOF

anona-compute template build --name my-env          # builds the current directory, streams the log
anona-compute template list
anona-compute template info my-env
anona-compute template logs my-env
anona-compute create -t my-env                      # a sandbox from it
anona-compute template delete my-env
```

```python template_build.py theme={null}
from e2b import Template  # the stock SDK's build flow works unchanged

template = (
    Template()
    .from_image("python:3.12-slim")
    .run_cmd("pip install --no-cache-dir polars")
)
Template.build(template, alias="my-env", cpu_count=2, memory_mb=2048)
```

What the builder enforces:

* Every `FROM` is pinned by digest at build time, so a rebuild gets the same base.
* `EXPOSE 49983` (envd) is refused; the Anona runtime owns that port.
* The build runs with no credentials, no privileges and its own CPU, memory, PID and time limits, on a network whose only way out is a proxy that applies the same [platform floor](https://docs.anonalabs.com/compute/concepts/networking.md) as a sandbox.
* The image's `CMD`/`ENTRYPOINT` runs at sandbox start only when the last stage declares one, or with `--start-cmd`.
* `.dockerignore` in the build context is honoured.

Defaults and limits: 2 vCPU and 2 GiB per sandbox unless `--cpu`/`--memory` say otherwise (at most 8 vCPU and 16 GiB), 20 templates per organization, 2 builds at a time, and a build context up to 1 GiB. Deleting a template leaves sandboxes that already run from it alone; new creates stop resolving the name.

The dashboard's **Templates** page lists templates, build status and build logs, and deletes them.

> [!WARNING]
>
> Template builds have been exercised end to end against a real gateway, BuildKit and a local registry (`tests/templates/run_e2e.sh`), with sandbox creation through the fake engine. Registration against CubeSandbox on AWS has not been run yet.

> [!NOTE]
>
> Template sizes are the preview defaults and may change. The create request has no CPU or memory fields, in E2B as here; a sandbox gets its template's size.


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