# AI agent sandbox

An AI agent sandbox is an isolated machine where an agent runs code, installs packages and edits files without reaching your own computer or servers. Groundbox sandboxes are Linux VMs on dedicated cores, driven from a REST API, a CLI, an MCP server or an SDK, at $0.04 per vCPU-hour.

## What a sandbox needs

| Need | Why | Groundbox |
| --- | --- | --- |
| Isolation | The agent runs code it wrote or downloaded. | A Firecracker VM per sandbox, with its own kernel |
| Commands and files | The agent works through a shell and a file system. | exec, upload and download over the API, CLI and MCP |
| Copies | Try several approaches from one state. | Fork a running sandbox: files and processes are copied |
| Pause | Long tasks wait on people or other jobs. | Pause keeps memory and disk, stop keeps the disk only; $0.05 per GB-month for either |
| Network limits | Keep code and secrets from leaving. | An egress allowlist of hosts |
| Time limits | Stop runaway loops. | Stops after 60 minutes by default; up to 720 hours, renewable |
| Spend limits | An agent with a key can spend money. | A monthly spend cap on every API key |
| Schedules | Evals and syncs that run on their own. | Scheduled runs from a cron expression |

## Start one

With the MCP server, an agent calls tools such as these:

```
create_sandbox   # a new VM, returns its id
run_command      # run a shell command, returns exit code and output
fork_sandbox     # copy a running sandbox
```

The [first sandbox guide](https://groundbox.dev/docs/sandboxes) shows the same steps with curl, and the [MCP server docs](https://groundbox.dev/docs/mcp) list every tool.

## Price

| Item | Price |
| --- | --- |
| CPU | $0.04 per vCPU-hour, billed by the second |
| Memory | Included, up to 4 GB per vCPU |
| Paused or stopped | $0.05 per GB-month |
| Flex | $0.02 per vCPU-hour, started when a machine has spare room |
| Plan | Free: everything, with $5 of usage. $20 a month: $20 of usage included, then pay as you go |

Example: a 2 vCPU sandbox running 8 hours a day for 22 days is 176 hours, or $14.08.

## Other sandbox services

- [Groundbox vs E2B](https://groundbox.dev/compare/e2b): E2B runs sandboxes for AI agents: Linux VMs started on demand from its SDKs.
- [Groundbox vs Daytona](https://groundbox.dev/compare/daytona): Daytona runs sandboxes for AI code, as Linux containers by default or as VMs.

## Questions

### What is an AI agent sandbox?

An isolated machine where an agent can run code, install packages and change files without touching your own computer or servers.

### Why a VM and not a container?

A VM has its own kernel, so code that escapes a process still meets a hardware boundary. A container shares the host's kernel.

### What does a Groundbox sandbox cost?

$0.04 per vCPU-hour, billed by the second, with memory up to 4 GB per vCPU included. A paused sandbox pays $0.05 per GB-month of storage, and so does one stopped with its disk kept.

### How long can a sandbox run?

It stops after 60 minutes by default. The longest timeout is 720 hours, and it can be renewed.

## Sources

Checked on 2026-11-19, on each company's own pages. Prices change; their pages are the final word.

- [E2B pricing](https://e2b.dev/pricing)
- [Daytona pricing](https://www.daytona.io/pricing)

## Related

- [Sandboxes](https://groundbox.dev/sandboxes): A Linux VM for each agent. Fork, pause and resume, scheduled runs, an egress allowlist. $0.04 per vCPU-hour on dedicated cores.
- [First sandbox](https://groundbox.dev/docs/sandboxes): Start a sandbox, run a command and move files, then fork, pause and resume, schedule runs and set an egress allowlist.
- [For coding agents](https://groundbox.dev/agents): One API key and one MCP server for CI and sandboxes. Scopes and a monthly spend cap on every key, and a prompt to hand to your agent.
- [E2B](https://groundbox.dev/compare/e2b): Groundbox and E2B sandboxes for AI agents side by side: CPU and memory prices, sizes, session length, isolation, pause and SDKs.
- [Daytona](https://groundbox.dev/compare/daytona): Groundbox and Daytona sandboxes for AI agents side by side: CPU, memory and storage prices, isolation model, idle handling and SDKs.
- [Modal](https://groundbox.dev/compare/modal): Groundbox and Modal Sandboxes for AI agents side by side: CPU and memory prices, isolation, timeouts, snapshots, GPUs and SDKs.

**Try it:** [sign in with GitHub](https://groundbox.dev/signin). The free plan needs no card.
