Cloudflare Sandbox vs Agent 37

Cloudflare Sandbox gives you containers inside the Workers platform that sleep when idle and start again from a fresh disk. Agent 37 gives each user an always-on agent machine that keeps its disk and can sleep with its memory saved.

The companies and products

Cloudflare Sandbox

Cloudflare Sandbox SDK runs untrusted or AI-generated code in Linux containers on Cloudflare's network, driven from a Cloudflare Worker.

Each sandbox is a Cloudflare Container backed by a Durable Object, and each container runs in its own Firecracker microVM with its own kernel and network. You build a linux/amd64 image, pick an instance type of up to 4 vCPU and 12 GiB, and reach the sandbox through your own Worker. It suits teams already on Workers who want short-lived sandboxes that sleep when idle; for code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

Agent 37

Agent 37 hosts AI agents, one isolated, always-on sandbox per user, behind one API.

You create an instance from a template (Hermes, OpenClaw, Claude Code, Codex, OpenCode, Pi, Grok or your own Docker image) and talk to it through a chat API, files, exec, SSH and HTTPS URLs. The default instance is a container enforced by gVisor; a VM type gives a full Linux machine with its own kernel for Docker, Kubernetes and Android emulators. It is built for companies that give each of their customers an agent.

Which use cases each one fits

For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “13th cheapest of 345” means 12 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.

Use case and its workloadCloudflare Sandbox: price rankAgent 37: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A long coding session needs its files to stay put; Agent 37 and boat keep the disk, while Cloudflare starts from a fresh disk after sleep unless your code saves a snapshot.
162nd of 367, with limits
$1,543 a month
2nd cheapest of 367
$551 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
Agent 37 is built for always-on assistants that sleep with their memory kept; Cloudflare wipes the disk on sleep, and boat keeps the disk but reboots on resume.
207th of 366, with limits
$2,188 a month
Cheapest of 366
$279 a month
5th cheapest of 366
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Both suit short code runs: Cloudflare bills CPU only while busy and Agent 37's small default sandboxes are cheap, while boat's start limits make large bursts a poor fit.
13th cheapest of 345
$144 a month
Cheapest of 345
$22 a month
186th of 345, with limits
$2,000 a month
Sandboxes for your users
300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month
Cloudflare limits an account by resources (1,500 vCPU at once), not sandbox count; Agent 37 stops at 200 instances, counting sleeping and stopped ones; boat plans go up to 2,000 at once.
9th cheapest of 361
$731 a month
30th of 361, with limits
$79 a month
Cheapest of 361
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
144th of 360, with limits
$9,428 a month
6th of 360, with limits
$363 a month
34th of 360, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
45th cheapest of 364
$818 a month
90th of 364, with limits
$58 a month
10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Docker builds need room and full Docker; Cloudflare caps disk at 20 GB by default and turns off iptables, Agent 37 needs its VM type, and boat runs Docker in every sandbox.
301st of 377, with limits
$704 a month
2nd cheapest of 377
$84 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
Agent 37 and boat keep a machine and its disk around the clock; Cloudflare starts from a fresh disk after sleep.
70th cheapest of 368
$93 a month
3rd cheapest of 368
$12 a month
18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Cloudflare removed its built-in desktop, Agent 37 adds a noVNC desktop through a template build, and boat streams a 60fps desktop out of the box.
166th of 369, with limits
$460 a month
Cheapest of 369
$53 a month
6th cheapest of 369
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
210th of 367, with limits
$233 a month
48th of 367, with limits
$29 a month
7th cheapest of 367
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
250th of 346, with limits
$286 a month
Cheapest of 346
$32 a month
6th cheapest of 346
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
169th of 338, with limits
$5,741 a month
36th of 338, with limits
$648 a month
71st of 338, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
Neither Cloudflare nor Agent 37 can fork a running sandbox; boat can, and adds raw TCP and nested VMs, which Cloudflare containers cannot offer.
239th of 360, with limits
$325 a month
Cheapest of 360
$43 a month
2nd cheapest of 360
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Can't run itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureCloudflare SandboxAgent 37boat
IsolationFirecracker microVM per container, own kernel and networkgVisor by default; full VM as an opt-in instance typeEvery sandbox is a full VM with its own kernel, on dedicated AMD Ryzen 9 9950X hosts
Largest machine4 vCPU / 12 GiB / 20 GB disk by default (can be raised)Up to 16 vCPU / 32 GB after a first top-upUp to 16 vCPU / 32 GB, depending on plan
Files between sessionsFresh disk after sleep; snapshots (public beta, 30 days) or R2 backups when your code saves themDisk kept until you delete the instanceDisk kept; snapshot every minute and on stop; a stopped sandbox costs nothing
Sleep when idleStops after inactivity and wakes on the next requestOpt-in auto-sleep (default 15 minutes) with memory checkpointed, wakes on the next requestNo idle timer; a time limit you set (default 1 hour), or no limit
Fork a running sandboxNo fork; restore a saved snapshot or backup into a new sandboxNo fork; daily backups plus one on-demand backup, restored in place onlyYes, without stopping it; named snapshots as shareable templates
Docker insidedocker:dind with iptables and IP forwarding turned offOnly on the VM type, at 2.5x the default compute rateFull Docker, root and systemd in every sandbox
Nested virtualizationNot documented/dev/kvm on the VM type, with a ready Android template/dev/kvm in every sandbox, Android emulator works
DesktopBuilt-in desktop removed in SDK 0.10.2; bring your ownnoVNC desktop through a template build or the Ubuntu VM template60fps desktop and Chromium, computer-use API, embeddable stream
Inbound trafficHTTP and WebSocket previews routed through your Worker; no raw TCP or public IPHTTPS URL per port, signed URLs, custom domains; no public IP, SSH through a WebSocket tunnelHTTPS URLs for up to 50 ports, token-protected; raw TCP; own IPv6 or IPv4
Egress controlallowedHosts deny-by-default list plus outbound handlers you write in Worker codeNo provider-side allowlistNo provider-side allowlist
Keeping keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeManaged LLM, search and Composio through a per-instance token; your own keys go in as env varsManaged proxy for model providers and any HTTPS API you register; switch a credential to another account
Coding agentsRun Claude Code, Codex, OpenCode or Pi in your image; OpenCode has an SDK helperHermes, OpenClaw, Claude Code, Codex, Grok, OpenCode, Pi templates, with a chat API per instanceClaude Code, Codex, pi, OpenCode and more built in, with a prompt, steer and events API
Custom imagesYour own linux/amd64 container imageYour own linux/amd64 Docker image as a templateTemplates from named snapshots, no Dockerfile builds
RegionsSeveral regions across Cloudflare's networkDedicated servers in the United StatesEU only: Germany, Finland, France, with EU data residency
Every feature Battleships tracks (43)
FeatureCloudflare SandboxAgent 37boat
Full VM (own kernel)YesNoYes
Docker insideYesNoYes
Nested virtualizationNoNoYes
RootYesYesYes
SystemdNot publishedNot publishedYes
Desktop GUINoYesYes
BrowserNoYesYes
Computer-use APINoYesYes
SSHYesYesYes
Persistent diskNoYesYes
Pause/resumeNoYesYes
Automatic snapshotsNoYesYes
Fork/cloneNoYesYes
Live fork (no pause)NoYesYes
Memory forkNoNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNot publishedYes
Public IPv4NoNoNo
Egress allowlistYesNoNo
Secret proxyYesYesYes
Secret proxy for any APIYesNoYes
Preinstalled agentsYesYesYes
Agent harness APIYesYesYes
MCP serverNoNoNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoNoNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceYesNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNoYesYes
Usage per sandbox (API)Not publishedYesYes
Audit logsYesNot publishedNo
SSOYesNoNo
SOC 2YesYesNo
HIPAAYesNoNo
EU data residencyYesNoYes
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
Agent 37Not measured
boat26.69 runs/s

boat scores 26.69 runs/s on the hpc-sandbox-benchmarks Node.js build-and-test loop at 4 vCPU / 8 GB. Neither Cloudflare Sandbox nor Agent 37 has a result on that benchmark, so there is no comparable CPU number between the three. Agent 37 says its default instances share host resources and sells dedicated cores on its Performance type.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. Cloudflare Sandbox and Agent 37 have no published run in this suite yet, so there is no like-for-like number to compare.

Pricing in five scenarios

Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.

ScenarioCloudflare Sandbox, a monthAgent 37, a monthboat, a month
One coding agent, workdays
4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days
$39 · Workers Paid · with limits$6 · Wallet (any top-up)$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$148 · Workers Paid · with limits$12 · Wallet (any top-up)$26 · $20/mo
50 agents in parallel
50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside
$1,660 · Workers Paid · with limits$329 · Wallet ($100 lifetime top-ups)$317 · $20/mo × 3 seats
Sandboxes for your users
2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once
$476 · Workers Paid$33 · Wallet ($250 lifetime top-ups) · with limits$200 · $100/mo × 2 seats
1,000 short jobs at once
2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month
$1,889 · Workers Paid · with limits$73 · Wallet ($250 lifetime top-ups) · with limits$2,000 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy; memory and disk are billed on the instance size until the container sleeps, and 4 vCPU always comes with 12 GiB.

Agent 37: A prepaid wallet with no plan fee, metered per minute on what you reserve. Disk is billed even while stopped or asleep, and Performance and VM compute cost 4x and 2.5x the default rate.

Agent 37: A monthly plan from $20, all of it usage credit, billed per second while a sandbox runs. A stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

Cloudflare's disk resets after sleep and tops out at 20 GB by default, so the scenarios that keep 50 GB of files between days do not fit without your own snapshot code. Agent 37 caps instances at 200 on its top self-serve tier, counting sleeping and stopped ones, which is short of the 300 at once that sandboxes for your users need. In the 1,000-job burst Cloudflare's 1,500 vCPU account limit falls short of 2,000, and boat runs into its start limits.

ScenarioCloudflare SandboxAgent 37boat
One coding agent, workdays
  • missing persistent disk
  • egress price not published
None that bite
One agent that never stops
  • missing persistent disk
  • egress price not published
None that bite
50 agents in parallel
  • missing persistent disk
  • egress price not published
None that bite
Sandboxes for your usersNone that bite
  • max 200 concurrent
  • egress price not published
None that bite
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • max 200 concurrent
  • shared vCPUs on this tier: heavy, sustained CPU use can be slowed by other tenants
  • egress price not published
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use Cloudflare Sandbox when

your app already runs on Workers and you want short sandboxes that sleep when idle, wake on request and follow egress rules you write.

  • Egress rules you can program. Cloudflare can block every host except the ones you list, and run your own code on each outbound request.
  • No sandbox count cap. Accounts are limited by resources, 1,500 vCPU at once by default, so many small sandboxes for your users fit.
  • Next to the rest of Workers. If your app already runs on Workers, sandboxes sit next to Durable Objects and R2, in several regions.

Use Agent 37 when

you host one mostly idle assistant per customer in the US that should keep its files, sleep with its memory saved and wake on the next message.

  • Sleeps and keeps its memory. Useful for assistants that sit idle most of the day: an instance sleeps, keeps its memory and wakes on the next message.
  • A machine that keeps its files. An instance keeps its disk across sleeps and stops, so an agent's repo and installed tools are still there.
  • Ready agent templates and dedicated cores. Start from Hermes, OpenClaw or Claude Code templates, or your own Docker image, and pick dedicated cores when speed must stay steady.

Where boat fits

Look at boat when your agents do hours of real work: installs, builds, Docker and emulators. Cloudflare resets the disk on sleep and Agent 37 needs a pricier VM type for Docker, while every boat sandbox is a full VM that keeps its files and can be forked while it runs.

A full VM is the default

On Cloudflare, Docker runs with iptables turned off and disk is 20 GB by default. On Agent 37 the default gVisor type cannot run Docker, and the VM type bills 2.5x with no systemd.

Files kept, and forks of running machines

A Cloudflare sandbox loses its repo and packages on sleep unless your code saves a snapshot. Agent 37 keeps the disk but cannot fork, so every parallel try rebuilds its state from the start.

Keys stay outside, for any API

On Cloudflare you write and maintain the outbound handler that adds every token. On Agent 37 your own keys sit as env vars inside a machine the agent controls.

Use boat when your agents do real work for hours on a full VM with Docker, systemd and a desktop, with forks of running machines and keys kept outside for any API. Compare it one to one: boat vs Cloudflare Sandbox and boat vs Agent 37.

Questions people ask

Is Cloudflare Sandbox cheaper than Agent 37?

No. Agent 37's estimate is lower in all five scenarios on this page, for example $12 against $148 a month for one agent that never stops. Agent 37 does not fit sandboxes for your users at 300 at once, because its self-serve tiers stop at 200 instances.

Which is faster?

There is no comparable measurement: neither Cloudflare Sandbox nor Agent 37 has a result on the hpc-sandbox-benchmarks loop. boat scores 26.69 runs/s there at 4 vCPU / 8 GB.

Can I run Docker on Cloudflare Sandbox or Agent 37?

On Cloudflare, docker:dind works with iptables and IP forwarding turned off. On Agent 37, only the VM type runs Docker, at 2.5x the default compute rate. boat runs full Docker in every sandbox.

Which one keeps my files?

Agent 37 keeps an instance's disk until you delete it, and can save its memory when it sleeps. Cloudflare starts from a fresh disk after sleep unless your code saved a snapshot or an R2 backup. boat keeps the disk and saves it every minute.

Where do they run?

Cloudflare places containers in several regions of its network. Agent 37 runs on dedicated servers in the United States. boat runs only in the EU, in Germany, Finland and France.

Can I limit where a sandbox connects to?

On Cloudflare, yes: allowedHosts blocks every host not on your list, and outbound handlers can change each request. Agent 37 and boat do not offer a provider-side egress allowlist.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons