# moatbox documentation

> moatbox runs coding agents inside private virtual machines called spaces and records what they do.

moatbox is a hosted service at `https://app.moatbox.dev`. You run coding agents (Claude Code, Codex, opencode) inside **spaces**. A space is a Firecracker microVM with its own disk, running on moatbox servers or on a server your team links. You reach it from the dashboard, over SSH, from your editor, or from the `moatbox` CLI.

## Main ideas

**Space.** One virtual machine with a 50 GB disk, sized from 2 vCPU and 2 GB of memory up to 16 vCPU and 32 GB. A space goes to sleep after a stretch with no work and keeps its disk while it sleeps, and its memory unless saving or restoring the memory fails. Opening it, starting a run or connecting over SSH wakes it. See [Spaces](https://docs.moatbox.dev/spaces.md).

**Run.** One agent working on one task inside a space. You start a run from the space's Agents page with **New agent**, and the run page shows its timeline. See [Running agents](https://docs.moatbox.dev/agents.md).

**Gateway and approvals.** Integration keys stay in the moatbox gateway instead of the space. The gateway holds risky actions for a person to approve or deny, and denies one that nobody decides on within five minutes. A delayed send goes out when its window ends instead, and a team rule can auto-approve chosen kinds of action. See [Approvals](https://docs.moatbox.dev/approvals.md) and [Integrations](https://docs.moatbox.dev/integrations.md).

**Environment.** A team-level template for new spaces: repositories to clone, variables, secret files, a setup script, an AI profile and which integrations reach the space. Each save makes a new version. Running spaces keep their version until you upgrade them or turn on **Apply changes to running spaces**. See [Environments](https://docs.moatbox.dev/environments.md).

**Connect.** Every space answers on the moatbox SSH gateway under the alias `moatbox-<space>`. The dashboard's **Open in…** menu prints the setup for your terminal or editor, and a space can also join your Tailscale tailnet. See [Connect to a space](https://docs.moatbox.dev/connect.md).

## All pages

**Start**

- [moatbox documentation](https://docs.moatbox.dev/index.md): this page.
- [Quickstart](https://docs.moatbox.dev/quickstart.md): sign in, create a space, start a run, connect from your terminal.

**Spaces**

- [Spaces](https://docs.moatbox.dev/spaces.md): sizes, states, sleep and wake, auto-stop, time limits, trash, forks.
- [Environments](https://docs.moatbox.dev/environments.md): what new spaces start with, versions, the default environment, safe mode.
- [Connect to a space](https://docs.moatbox.dev/connect.md): SSH gateway, Open in…, `moatbox login`, CLI commands, Tailscale.

**Agents**

- [Running agents](https://docs.moatbox.dev/agents.md)
- [Signing agents in](https://docs.moatbox.dev/agent-sign-in.md)
- [Approvals](https://docs.moatbox.dev/approvals.md)
- [Integrations](https://docs.moatbox.dev/integrations.md)

**Keep and undo**

- [Snapshots, restore and undo](https://docs.moatbox.dev/snapshots.md)
- [Privacy and data retention](https://docs.moatbox.dev/privacy.md)

**Build on moatbox**

- [API keys](https://docs.moatbox.dev/api-keys.md)
- [HTTP API](https://docs.moatbox.dev/api.md)
- [MCP server](https://docs.moatbox.dev/mcp.md)
- [Events, webhooks and telemetry](https://docs.moatbox.dev/events-and-webhooks.md)

**Teams and CI**

- [Teams, roles and the audit log](https://docs.moatbox.dev/teams.md)
- [GitHub Actions runners](https://docs.moatbox.dev/ci.md)

## For agents

You can read every page as Markdown: add `.md` to its URL. `/llms.txt` lists all pages with their Markdown links, and `/llms-full.txt` holds every page in one file.
