Cloud VMs for AI agents, paused while they think
Every sandbox is a Firecracker microVM with its own kernel and root inside. It starts in about 0.15 s, pauses with its memory and processes when idle, and wakes in about 0.1 s at the next call, exactly where it was; an SSH login or a web request wakes it too.
From $0.018 an hour for 2 vCPU and 4 GiB, billed by the second. Paused, 30% of that. Starting one is free.
7 days with $1 of usage. A card is required, and the plan’s first payment comes when the trial ends.
- create_sandbox()→ k3x9q2m7 · 0.12 s
- run_command(k3x9q2m7, command="pytest -q")→ exit 0
- pause_after_idle 300 s→ p8d1z5w0 PAUSED
- run_command(p8d1z5w0, command="git pull")→ RUNNING · 0.08 s
- create_sandbox(template="evals@1")→ b6g0s4k8 · 0.22 s
- stop_after_idle 1800 s→ t5v0b9x1 STOPPED
- k3x9q2m7 RUNNING k3x9q2m7 PAUSED 0.08 s
- a4r8w2e6 PAUSED a4r8w2e6 RUNNING 0.08 s
- h7c1q5u9 PAUSED
- f2j6n0x4 PAUSED
- y9d3l7p1 PAUSED
- p8d1z5w0 RUNNING p8d1z5w0 PAUSED 0.08 s
- m2c7r4n6 PAUSED m2c7r4n6 RUNNING 0.08 s
- t5v0b9x1 STOPPED
- b6g0s4k8 PAUSED
- q1w5e9r3 STOPPED
- n3z7v1c5 RUNNING
- u8i2o6p0 PAUSED
3 RUNNING × $0.018 + 7 PAUSED × $0.0054 = $0.092/h
- ~0.15 s to start a sandbox from a template
- ~0.1 s to wake a paused one, memory and processes as they were
- $0.018/h for 2 vCPU, 4 GiB and 10 GiB while running
- 1 s billing step: each run rounded up to a second, 10 s at least
- $0 to create or start a sandbox
Measured on our servers on 18 November 2026, through an API 16 ms away: a create’s median 123 ms (SMALL) to 158 ms (XLARGE), a resume 124 ms, a command to a paused sandbox 80 ms.
What teams run on it
- Code your model writes An AI product runs each user’s code in a sandbox of its own: a command and its output in one call, files edited in place, a port at its own address.
- Coding agents in the cloud Claude Code, Codex and OpenCode are installed in every sandbox. One call gives an agent a prompt, another streams each tool call it makes.
- RL and evals Save a prepared environment as a template and start a thousand runs a day from it, each from the same state, with no start fee.
- Computer use Chrome on a 1280×800 desktop in every sandbox: click, type and take a screenshot in one call, drive it with Playwright or Puppeteer, or watch it live.
Pay for the work, not for the wait
An agent spends most of its time thinking, and its sandbox waits for it. So a sandbox pauses by itself when nothing calls it, holds everything it had, and is back in about 0.1 s at the next call.
-
While it works
Your code runs, its ports answer and the agent’s tools work. Billed by the second at its size’s price: $0.018 an hour for 2 vCPU and 4 GiB, each run rounded up to a second, 10 s at least.
$0.018 an hour -
While your agent thinks
After 5 quiet minutes it pauses, at 30% of the price, with everything held as it was: a dev server, a REPL’s variables, a build halfway through. The next call or SSH login wakes it in about 0.1 s, a page visit in about 0.2 s.
$0.0054 an hour -
While nobody calls it
After 30 quiet minutes it stops: running programs end, and every file stays, encrypted, at $0.03 per GiB a month of its own data. A resume brings it back with its files in place in about 0.2 s, or up to about 10 s per GiB after a long stop.
$0.03 per GiB a month
The 5 and 30 minutes are defaults: both timers are set per sandbox, and 0 turns one off. A command started with keep_awake holds a sandbox awake, and nothing is deleted unless you set a timer for it.
Everything an agent’s computer does
Thirteen things a sandbox does, each with a page on how it works.
-
A microVM with its own kernel
Each sandbox is a Firecracker microVM with its own Linux kernel and root inside: install anything, run Docker, change any file. It starts in about 0.15 s.
How it works -
Pauses with its memory
A paused sandbox keeps its memory, processes and files at 30% of the price, and the next call wakes it in about 0.1 s, exactly where it was.
How it works -
Pauses itself when idle
Five minutes without a call and a sandbox pauses, memory kept; thirty and it stops, files kept. Every timer is set per sandbox, and 0 turns it off.
How it works -
Billed by the second, starts free
Running time by the second from $0.018 an hour, paused time at 30% of that, a stopped sandbox by the GiB of its own files. Creating and starting one cost nothing.
How it works -
Code execution in one call
Run the code your model writes and get its exit code and output in one call, stream long jobs, edit files by exact replacement, and open a terminal in the browser.
How it works -
Claude Code and Codex, installed
Claude Code, Codex and OpenCode run in every sandbox with every permission: one call gives one a prompt, another streams each tool call, and your API key stays outside.
How it works -
A desktop with Chrome
Every sandbox has a 1280×800 screen with Chrome: click, type and screenshot in one call, drive it with Playwright or Puppeteer, or watch it live and take over.
How it works -
Plain SSH, scp and tunnels
ssh, scp, sftp and ssh -L into any sandbox with a workspace key or a token as the password; a login wakes a paused one.
How it works -
A URL for every port
A dev server on port 3000 answers at its own HTTPS address, public or behind a token, and a visit wakes a paused sandbox in about 0.2 s.
How it works -
Save a sandbox as a template
Set a sandbox up once and save it as a template, packages and Docker images included; start as many sandboxes as you need from it, each in about 0.22 s.
How it works -
Only the hosts you allow
List the domains, IPs and ports a sandbox may reach: every other host is refused, even in DNS, and a change applies while it runs.
How it works -
API keys the sandbox never holds
Code in the sandbox sees a placeholder. Its requests still work: the real API key is put in on the way out, only to the hosts you name.
How it works -
See everything a sandbox did
CPU, memory, disk and network for 24 hours, and every change of state, command, host reached and agent turn, as a list or a live stream.
How it works
For your agent, your code and your terminal
All three drive sandboxes through the same API and sign in with one Pethost token.
- MCP server Add it to Claude, ChatGPT, Cursor or any MCP client. It signs in with your Pethost account, and your agent makes, starts and pauses sandboxes with it.
- SDKs Python, TypeScript, Go and Rust, generated from the API, each with the same methods.
- CLI
pethost sandboxmakes, runs and opens sandboxes from your terminal.
Install pip install pethost
from pethost.sandboxes import Sandboxes
sandboxes = Sandboxes() # reads PETHOST_TOKEN
box = sandboxes.create_sandbox("base")
result = sandboxes.run_command(box.sandbox_id, command="python3 -c 'print(6 * 7)'")
print(result.stdout) # 42
Install npm install pethost
import { Sandboxes } from "pethost/sandboxes";
const sandboxes = new Sandboxes({ token: process.env.PETHOST_TOKEN! });
const box = await sandboxes.createSandbox({ template: "base" });
const result = await sandboxes.runCommand({ sandboxId: box.sandboxId, command: "node -p 6*7" });
console.log(result.stdout); // 42
Install go get github.com/pethost-dev/sdk/go
client := sandboxes.NewClient(sandboxes.Config{Token: os.Getenv("PETHOST_TOKEN")})
box, err := client.CreateSandbox(ctx, &sandboxes.CreateSandboxRequest{Template: "base"})
check(err)
result, err := client.RunCommand(ctx, &sandboxes.RunCommandRequest{
SandboxID: box.SandboxID, Command: "echo $((6 * 7))",
})
check(err)
fmt.Println(result.Stdout) // 42
Install cargo add pethost
use pethost::sandboxes::{types::*, Client};
let client = Client::new(&std::env::var("PETHOST_TOKEN")?);
let base = CreateSandboxRequest { template: "base".into(), ..Default::default() };
let sandbox = client.create_sandbox(base).await?;
let command = RunCommandRequest { sandbox_id: sandbox.sandbox_id, command: "echo $((6 * 7))".into(), ..Default::default() };
let result = client.run_command(command).await?;
println!("{}", result.stdout); // 42
Install curl -fsSL https://pethost.dev/install.sh | sh
pethost sandbox new --name api-dev --size small
pethost sandbox run api-dev -- python3 -c 'print(6 * 7)'
pethost sandbox shell api-dev # a shell inside
How it compares
Prices and features as each vendor’s own pages stated them on 21 November 2026, for 2 vCPU and 4 GiB.
What each one does
| Pethost | E2B | Daytona | Modal | Vercel Sandbox | boat.dev | |
|---|---|---|---|---|---|---|
| Isolation | Yes Firecracker microVM | Yes Firecracker | Partly containers; a Linux VM class1 | Partly gVisor; a VM runtime option2 | Yes Firecracker | Yes a VM per sandbox |
| Running, 2 vCPU · 4 GiB, an hour | $0.018 | $0.1656 | $0.1656 plus disk past 5 GiB | $0.2380 | $0.1104 at 10% CPU, $0.3408 at 100% CPU | $0.018 |
| Pause keeps memory and processes | Yes 30% of the running price | Yes free while paused | Partly VM class only, disk billed3 | Partly memory snapshots in alpha, kept 7 days4 | No filesystem only | No “There is no pause” |
| No start fee | Yes | Yes | Yes | Yes | Partly $0.60 per million creations | No $0.03–$0.07 past included starts5 |
| Custom templates | Yes saved from a sandbox | Yes a template builder | Yes from an image or a Dockerfile | Yes images | Yes images, snapshots | Yes saved snapshots |
| Egress allow-list | Yes domains, IPs, CIDRs, ports | Yes | Partly tier 3 and up6 | Partly beta, TLS on port 443 | Yes | No |
| API keys kept out of the sandbox | Yes swapped in by the proxy | Yes | Not stated on the pages we read | Partly beta | Yes | Partly AI keys only, $1 a day + $1 per 1,000 requests |
| SSH, scp, tunnels | Yes | Partly through a WebSocket proxy | Not stated on the pages we read | Not stated on the pages we read | No its CLI only | Yes |
| Desktop for computer use | Yes Chrome, 1280×800 | Yes | Yes | Not stated on the pages we read | Not stated on the pages we read | Yes |
| MCP server for sandboxes | Yes | Partly a tool gateway inside the sandbox | Yes | Not stated on the pages we read | Not stated on the pages we read | Partly for its docs only |
| SDKs | Python, TypeScript, Go, Rust | Python, JS/TS | Python, TS, Ruby, Go, Java | Python, JS, Go | TypeScript | Python, TypeScript |
| Where | EU | US; EU on request | US, EU | regions at 1.15–1.75× the price | 19 regions | EU |
| Least monthly bill | $20, all of it usage | $0 on Hobby | $0 | $0, with $30 of credit a month | $0 on Hobby | $20, all of it usage |
✓ Yes◐ Partly✗ No? Not stated on the pages we read
- Daytona runs containers by default; its Linux VM class pauses.
- Modal runs sandboxes in gVisor and offers a VM runtime option.
- Daytona bills a paused VM for its disk only; the memory kept is not billed.
- Modal’s memory snapshots are in alpha and expire 7 days after they are made.
- boat.dev includes 12, 60 and 200 starts a minute, hour and day on its $20 plan, sells more at $0.03 to $0.07 each, and refuses past 6 times as many (3 times a minute).
- Daytona’s tiers 1 and 2 restrict network access to essential services, and a sandbox cannot change that.
- E2B and Daytona have no monthly minimum: one light agent costs less there than our $20 plan. Four such agents cost more there than the plan.
- E2B charges nothing for a paused sandbox, and Daytona its disk only; ours costs 30% of the running price, and its wake is never refused. Over a month the running price weighs more.
One hour of 2 vCPU and 4 GiB
- PethostSMALL $0.018
- boat.devsmall $0.018
- Cloudflare Containers2 vCPU · 4 GiB · 8 GB $0.052 at 10% CPU $0.182 at 100% CPU
- Northflank $0.0667
- Vercel Sandbox $0.1104 at 10% CPU $0.3408 at 100% CPU
- E2B $0.1656
- Daytona $0.1656 plus disk past 5 GiB
- Blaxel $0.1656 while active
- Modal $0.2380
- RunloopMEDIUM $0.3195
One hour running, 2 vCPU and 4 GiB, compute only, at each vendor’s list price on 21 November 2026.
Two workloads, a month
An agent: one sandbox, 2 hours active and 22 kept idle a day
| Vendor | Kept idle as | Memory kept | Usage | Bill |
|---|---|---|---|---|
| Pethost | paused | Yes | $4.64 | $20the plan, which covers about four such agents |
| E2B | paused, for free | Yes | $9.94 | $9.94on Hobby, with a pause every hour; $159.94 on Pro |
| Daytona | VM class, paused | Yes | $10.17 | $10.17 |
| Blaxel | standby | Yes | $11.74 | $11.74 |
| boat.dev | stopped | No | $1.08 | $20 |
| Modal | a snapshot, 24 h at most | No | $14.28 | $0within the $30 monthly credit |
With memory kept, the agent’s month costs $4.64 here, less than half of E2B’s, Daytona’s or Blaxel’s. boat.dev costs less when memory may go. For one agent alone, E2B and Daytona bill less than our $20 plan; from four agents on, the plan is less.
Evals: 1,000 sandboxes a day, 60 seconds each
| Vendor | Compute | Start fees | Bill |
|---|---|---|---|
| Pethost | $9.00 | $0 | $20 |
| boat.dev | $9.00 | $144 on its $100 plan, or $1,500 on its $20 plan | $244 |
| E2B | $82.80 | $0 | $82.80 on Hobby |
| Daytona | $82.96 | $0 | $82.96 |
| Modal | $118.98 | $0 | $88.98 after the $30 credit |
| Vercel Sandbox | $55.22 at 10% CPU, $170.42 at 100% CPU | $0.02 | $55.22 at 10% CPU, $170.42 at 100% CPU |
Short, numerous sandboxes cost least here. At boat.dev the start fees are most of the bill.
Starts are free and no plan counts them, so 1,000 a day add nothing to the bill; on the $20 plan 50 SMALL sandboxes run at once.
2 vCPU and 4 GiB everywhere, a 30-day month, 5 GiB of the sandbox’s own data kept while it is idle. Credits that run out are not counted; credits that come every month are.
The plan’s price is your usage
Each plan’s monthly price comes back in full as usage at the rates below. Past it, a balance you top up pays: from $10 to $1,000, and it never expires.
-
$20a month
- Included usage
- $20
- vCPUs at once
- 100running and paused sandboxes count
- Largest size
- LARGE
- Templates
- 5 GiB
-
$100a month
- Included usage
- $100
- vCPUs at once
- 600running and paused sandboxes count
- Largest size
- XLARGE
- Templates
- 30 GiB
Free trial
7 days with $1 of usage, 4 vCPUs at once and sizes up to DEFAULT. A card is required, and the plan’s first payment comes when the trial ends or when you start the plan.
- vCPUs at once
- 4
- Largest size
- DEFAULT
| Size | Running | Paused |
|---|---|---|
| SMALL2 vCPU · 4 GiB · 10 GiB | $0.018 an hour | $0.0054 an hour |
| DEFAULT4 vCPU · 8 GiB · 20 GiB | $0.036 an hour | $0.0108 an hour |
| LARGE8 vCPU · 16 GiB · 40 GiB | $0.072 an hour | $0.0216 an hour |
| XLARGE16 vCPU · 32 GiB · 80 GiB | $0.20 an hour | $0.06 an hour |
- Stopped: $0.03 per GiB a month of the sandbox’s own data, never empty space.
- Templates: free, within the plan’s room.
- $20 of usage is 1,111 hours of a SMALL sandbox running, or 3,704 hours paused.
Prices in US dollars, before tax. In the EU you pay the same numbers in euros, plus VAT.
Questions
How is one sandbox kept apart from another?
Each sandbox is its own Firecracker microVM with its own Linux kernel, started inside Firecracker’s jailer: its own chroot, an unprivileged user, cgroup limits, a seccomp filter and its own network namespace. Inside you are root. Nested virtualization is off, and API keys bound as secrets never enter the VM.
Are vCPUs and memory shared with other sandboxes?
The hardware is shared, as at any cloud in this price range: many sandboxes run on one server, and each is held to its size, never more than its vCPUs’ time and its memory. A busy neighbour can slow a sandbox’s CPU, and a server short of memory pauses sandboxes that have been idle a minute or more early, which the next call wakes as usual.
Where do sandboxes run, and where is my data?
In the EU. Sandboxes run in the EU, and what they keep, a stopped sandbox’s files and your templates, is stored in the EU, encrypted, each with a key of its own. There is one region, so there is nothing to pick. The privacy policy names who processes what.
What happens when my agent goes quiet?
After 5 minutes with no call, SSH session or web request, the sandbox pauses: memory and processes are kept at 30% of the running price, and the next call wakes it in about 0.1 s. After 30 minutes it stops: its files are kept at $0.03 per GiB a month, and its processes end. Nothing is deleted unless you set a timer for it. A command started with keep_awake holds it awake.
Are there GPUs?
No. The largest size is 16 vCPU, 32 GiB of memory and 80 GiB of disk.
What are the limits?
A plan sets how many vCPUs its running and paused sandboxes hold at once (100 on the $20 plan, that is 50 SMALL sandboxes) and its largest size. Starts are free and unlimited, with one limit against abuse for every workspace: 300 a minute. Stopped sandboxes have no count limit, and no sandbox has a limit on how long it lives. A sandbox opens up to 20 public ports.
How does billing work?
A plan’s monthly price is usage it includes. A running sandbox is billed by the second at its size’s price, each run rounded up to a second with 10 s at least; a paused one at 30% of that; a stopped one by the GiB its own data takes. Creating and starting cost nothing. Usage past the plan is paid from a balance you top up, from $10 to $1,000, which never expires.
If both run out, running and paused sandboxes are stopped and nothing new starts until money comes in; nothing is deleted.
How is it different from E2B?
Both run each sandbox in a Firecracker microVM, and both keep memory and processes when a sandbox pauses. 2 vCPU and 4 GiB cost $0.018 an hour running here and $0.1656 at E2B, which charges nothing while paused, where we charge 30%. E2B has a free Hobby plan with a one-time $100 credit; our plans start at $20 a month, all of it usage. Sandboxes here have plain SSH and run in the EU; E2B runs in the US unless you ask for its EU cluster. E2B’s figures are from its own pages on 21 November 2026.
Is there a free trial?
Yes: 7 days with $1 of usage, 4 vCPUs at once and sizes up to DEFAULT, which is 55 hours of a SMALL sandbox running. A card is required, and the plan’s first payment comes when the trial ends.