Cloudflare Sandbox vs AWS AgentCore

Cloudflare Sandbox runs a container per sandbox inside the Workers platform. It sleeps when idle, wakes on the next request, and keeps files through snapshots or R2 that your code sets up. AWS AgentCore is an AWS platform for hosting agents, with microVM sessions of up to 8 hours, managed Code Interpreter and Browser tools, and sessions of up to 14 days on EC2 in your own account.

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. 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. The disk resets when the container stops, and your code keeps files with snapshots, automatic saves, R2 backups or R2 bucket mounts. It suits teams already on Workers who want sandboxes that sleep when idle. For code that only calls known methods, Cloudflare also offers Dynamic Workers, which run JavaScript in V8 isolates.

AWS AgentCore

Amazon Bedrock AgentCore is a set of AWS services to deploy and run AI agents: a Runtime that hosts your agent code, plus built-in Code Interpreter and Browser tools.

AgentCore is not a sandbox product first. It is a hyperscaler's agent platform: you push a container image or code, and each Runtime session gets its own Firecracker microVM. You reach a session through AgentCore APIs, an interactive shell API and authenticated HTTPS session endpoints. Around it sit managed tools (Code Interpreter, Browser) and services for memory, identity, gateways and evaluations. An Instances compute type runs longer sessions on EC2 in your own account. It is built for teams who already build on AWS and want agents to stay inside their account, IAM and VPC.

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. “43rd cheapest of 361” means 42 of the other 360 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 rankAWS AgentCore: price rankboat: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
On Cloudflare the disk resets on sleep unless your code snapshots it or mounts R2, and a sandbox has 20 GB of disk at most. On AgentCore only paths under /mnt survive a stop: session storage, EFS, S3 Files or EBS on Instances. boat saves a full VM's disk with no code.
192nd of 365, with limits
$1,543 a month
132nd of 365, with limits
$888 a month
5th cheapest of 365
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
An assistant that runs all month outlasts an AgentCore microVM's 8 hours, so it needs the Instances type, up to 14 days per session. Cloudflare sets no fixed maximum, and your code keeps the files. boat runs 24/7 once auto-stop is off on a paid plan.
43rd cheapest of 361
$2,188 a month
109th of 361, with limits
$1,300 a month
6th cheapest of 361
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Both fit short code runs well and bill CPU only while busy: Cloudflare Sandbox, and AgentCore Code Interpreter. A running boat sandbox bills at full rate, busy or idle, and each plan includes a set number of starts.
17th cheapest of 336
$144 a month
11th cheapest of 336
$114 a month
189th of 336, 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 routes HTTP previews through your Worker, so your users can open a sandbox's app. AgentCore session endpoints need an AWS signature or an OAuth token on every request. boat gives each sandbox up to 50 HTTPS URLs, token-gated by default or public.
19th cheapest of 349
$731 a month
205th of 349, with limits
$506 a month
3rd cheapest of 349
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
147th of 349, with limits
$9,428 a month
129th of 349, with limits
$8,075 a month
39th of 349, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
60th cheapest of 359
$818 a month
46th cheapest of 359
$650 a month
10th cheapest of 359
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
Cloudflare has 20 GB of disk at most and runs Docker with iptables turned off. AgentCore does not document Docker inside a session. boat runs Docker with BuildKit and has /dev/kvm on every sandbox.
303rd of 374, with limits
$704 a month
51st cheapest of 374
$399 a month
2nd cheapest of 374
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A dev box needs SSH and a disk that keeps installed packages. Cloudflare has SSH and keeps files through snapshots or R2. AgentCore has an interactive shell API, no SSH, and keeps files under /mnt only. boat has SSH and saves its disk with no code.
123rd cheapest of 371
$93 a month
242nd of 371, with limits
$52 a month
19th cheapest of 371
$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; you build one into your image or use the separate Browser Run service. AgentCore Browser drives a browser window, not a whole desktop. boat streams a desktop at 1920x1080, 60 fps.
207th of 367, with limits
$460 a month
146th of 367, with limits
$202 a month
7th cheapest of 367
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
AgentCore Browser is a managed Chromium with live view and session replay. Cloudflare offers headless browsers through the separate Browser Run service. boat runs Chrome on a full machine with a desktop you can watch.
68th of 356, with limits
$233 a month
4th cheapest of 356
$144 a month
7th cheapest of 356
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
102nd cheapest of 343
$286 a month
32nd cheapest of 343
$287 a month
6th cheapest of 343
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
168th of 327, with limits
$5,741 a month
164th of 327, with limits
$5,458 a month
73rd of 327, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
25th cheapest of 351
$325 a month
108th of 351, with limits
$294 a month
3rd cheapest of 351
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Not ranked: misses a requirementNot ranked: misses a requirementNot ranked: misses a requirement

Key features

FeatureCloudflare SandboxAWS AgentCoreboat
IsolationFirecracker microVM per container, own kernel and networkFirecracker microVM per Runtime session; Code Interpreter and Browser in a containerized environmentFull VM with its own kernel, on a physical host dedicated to boat (AMD Ryzen 7 9700X or Ryzen 9 9950X); vCPUs are shared
Biggest machine4 vCPU / 12 GiB / 20 GB disk2 vCPU / 8 GB per microVM session, not adjustable; on Instances, the EC2 type you pick sets the size16 vCPU / 32 GB / 251 GB disk (needs the $100 plan or higher)
Session lengthNo fixed maximum; stops after inactivity and wakes on the next requestUp to 8 hours per lifecycle on microVMs, 15 idle minutes by default; up to 14 days on InstancesAuto-stop 1 hour by default, up to 30 days, or off on a paid plan for no cap
What survives a stopDisk is fresh after sleep; keep files with snapshots (public beta, 30 days), scheduled automatic saves, R2 backups or a mounted R2 bucketPaths under /mnt: 1 GB session storage (preview), your own EFS or S3 Files in a VPC, or EBS volumes on InstancesDisk saved every minute and at each stop, with no code; kept at least 14 days after a stop; memory is not saved
Snapshots and forkSnapshot or back up a running sandbox, then start new sandboxes from it; no one-call forkNo session snapshot or fork; on Instances you can seed EBS volumes from your own EBS snapshotsAutomatic snapshot every minute; fork a running sandbox in one call
Docker insidedocker:dind with iptables and IP forwarding turned offRoot inside the microVM; Docker not documentedDocker with BuildKit and Compose, root and systemd
Nested virtualizationNot documentedNot documentedYes, /dev/kvm for Android emulators and VMs
Browser and desktopBuilt-in desktop removed in SDK 0.10.2; headless browsers through the separate Browser Run serviceManaged Chromium with live view, session recording and replay, profiles and proxies; no desktop beyond the browser window1920x1080, 60 fps desktop and Chrome, with computer tools for agents; no GPU
Inbound trafficHTTP and WebSocket previews routed through your Worker; SSH; no raw TCP inbound or public IPAuthenticated HTTPS session endpoint for 1 to 5 ports (IAM or OAuth on every request, not on Instances); interactive shell API; no SSHUp to 50 HTTPS URLs, token-gated by default or public; SSH; raw ports over public IPv6
Egress rulesallowedHosts deny-by-default list plus outbound handlers you write in Worker codeSecurity groups in VPC mode; no per-request HTTP rulesOpen internet, no provider-side allowlist
Private networkingNo private network into your own cloud documentedVPC mode with security groups, PrivateLink and a NAT gateway for a fixed outbound IPOpen internet; the IP address changes at every resume
Keeping API keys out of the sandboxYour outbound handler adds the token for any HTTP or HTTPS host; you write the codeAgentCore Identity stores OAuth tokens and API keys and hands them to your agent codeOptional paid proxy ($1 a day while on, plus $1 per 1,000 requests) for model providers and custom HTTPS APIs; other secrets enter the sandbox
Coding agentsGuides for Claude Code, Codex, OpenCode and Pi in your imageAWS's own managed harness built on Strands Agents, or your own agent code in your imageSeven installed (Claude Code, Codex, pi, OpenCode and more), with a prompt, steer and events API
GPUs and regionsNo GPU; several regions of Cloudflare's network, pin to a region or jurisdictionNVIDIA G-series and Inferentia2 on Instances; 21 commercial AWS regions plus GovCloudNo GPU; Germany, Finland and France, no US or Asia region
Every feature Battleships tracks (43)
FeatureCloudflare SandboxAWS AgentCoreboat
Full VM (own kernel)YesYesYes
Docker insideYesNot publishedYes
Nested virtualizationNo documented wayNo documented wayYes
RootYesYesYes
SystemdNot publishedNo documented wayYes
Desktop GUINo documented wayNo documented wayYes
BrowserWith your own setupYesYes
Computer-use APINo documented wayYesYes
SSHYesNo documented wayYes
Persistent diskWith your own setupYesYes
Pause/resumeNo documented wayNo documented wayYes
Automatic snapshotsWith your own setupNo documented wayYes
Fork/cloneWith your own setupNo documented wayYes
Live fork (no pause)With your own setupNo documented wayYes
Memory forkNo documented wayNo documented wayNo documented way
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesNo documented wayYes
Idle auto-stopYesYesNo documented way
Wake on requestYesYesNo documented way
HTTPS preview URLsYesYesYes
Raw TCP inboundNo documented wayNo documented wayYes
Public IPv4No documented wayNo documented wayNo documented way
Egress allowlistYesYesNo documented way
Secret proxyYesNo documented wayYes
Secret proxy for any APIYesNo documented wayYes
Preinstalled agentsYesNo documented wayYes
Agent harness APIWith your own setupNo documented wayYes
MCP serverNo documented wayYesNo documented way
GPUNo documented wayYesNo documented way
WindowsNo documented wayNo documented wayNo documented way
Arm64No documented wayYesNo documented way
Self-hostingNo documented wayNo documented wayNo documented way
BYOCNo documented wayYesNo documented way
Open sourceYesNo documented wayNo documented way
Scoped API keysNot publishedNot publishedYes
Spend limitsNo documented wayWith your own setupYes
Usage per sandbox (API)Not publishedNo documented wayYes
Audit logsYesYesNo documented way
SSOYesYesNo documented way
SOC 2YesYesNo documented way
HIPAAYesYesNo documented way
EU data residencyYesYesNo documented way
Zero data retentionNot publishedNot publishedYes

Performance

Cloudflare SandboxNot measured
AWS AgentCoreNot measured
boat28.06 runs/s

Cloudflare Sandbox and AWS AgentCore are not in StarSling's run of 3 October 2026 (run 37073680030), so we cannot say which has faster CPU. In that run boat did 28.06 runs/s on the V8 Web Tooling Benchmark at 4 vCPU / 8 GB, second of 15, on an AMD Ryzen 9 9950X host; boat also places some sandboxes on other hosts. ComputeSDK measured a 671 ms median start for Cloudflare with 100 at once (2026-11-06, default size); AgentCore and boat are not in ComputeSDK.

V8 Web Tooling Benchmark at a 4 vCPU / 8 GB target, runs per second, higher is better. Source: StarSling's run of 3 October 2026 (run 37073680030), median of 5 sandboxes. Providers ran on different hardware in different regions. StarSling gives a shared rank when the run cannot separate two providers. Every boat sandbox in this run ran on an AMD Ryzen 9 9950X host. boat also places some sandboxes on AMD Ryzen 7 9700X hosts, which this run did not measure. Cloudflare Sandbox and AWS AgentCore are not in the public benchmarks we use, so we cannot say which is faster.

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. Start limits, per-start fees and plan minimums are in the price, boat's included.

ScenarioCloudflare Sandbox, a monthAWS AgentCore, 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$26 · Pay-as-you-go (Instances) · with limits$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$148 · Workers Paid$107 · Pay-as-you-go (Instances) · with limits$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$1,286 · Pay-as-you-go (Instances) · with limits$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$423 · Pay-as-you-go · 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$1,615 · Pay-as-you-go (Instances)$8,800 · $2000/mo · with limits

Cloudflare Sandbox: You need Workers Paid ($5 a month minimum). CPU is billed only while busy, at $0.072 per vCPU-hour. Memory and disk are billed on the instance size until the container sleeps, and 4 vCPU always comes with 12 GiB. Durable Object and Worker requests come on top, and snapshot pricing is not published.

AWS AgentCore: No monthly fee. Runtime microVMs, Code Interpreter and Browser bill per second for CPU actually used and peak memory. The 4 vCPU shape in these scenarios is the Instances type: the EC2 on-demand price plus a 12% fee, with EBS storage (billed also while stopped) and data transfer on top. The scenario prices leave out EBS storage.

AWS AgentCore: Plans cost $20, $100, $500 or $2,000 a month, and the whole plan price comes back as VM time for that month. A 4 vCPU / 8 GB sandbox costs $0.036 an hour, billed per second while it runs, busy or idle. A stopped sandbox has no compute charge; saved snapshots above the included count and the AI proxy, if on, still bill. The $20 plan includes 200 starts a day; extra starts cost $0.03 to $0.07.

Limits in those scenarios

Cloudflare's local disk tops out at 20 GB and resets after sleep, so the scenarios that keep 50 GB of files need your own snapshot, automatic-save or R2 code, and its 1,500 vCPU account limit is short of the 2,000 vCPU the 1,000-job burst needs unless Cloudflare raises it. AgentCore needs the Instances type for a 4 vCPU agent, where sessions stop at 14 days and only files under /mnt survive a stop, so the agent scenarios are marked as not fitting as-is. For sandboxes your users open, the priced AgentCore option is Code Interpreter, a different kind of product. On boat, the $2,000 plan includes 90 starts a minute, extra starts cost $0.03 to $0.07, and starts above 270 a minute fail with 429, so boat does not fit 1,000 jobs at once.

ScenarioCloudflare SandboxAWS AgentCoreboat
One coding agent, workdaysNone for this scenario
  • files survive a stop only in capacity provider EBS volumes under /mnt: packages installed elsewhere reset
  • disk beyond 0 GiB: price unknown
None for this scenario
One agent that never stopsNone for this scenario
  • Pay-as-you-go (Instances): sessions capped at 336 h
  • files survive a stop only in capacity provider EBS volumes under /mnt: packages installed elsewhere reset
  • disk beyond 0 GiB: price unknown
None for this scenario
50 agents in parallelNone for this scenario
  • files survive a stop only in capacity provider EBS volumes under /mnt: packages installed elsewhere reset
  • disk beyond 0 GiB: price unknown
None for this scenario
Sandboxes for your usersNone for this scenario
  • different kind of product: code interpreter
None for this scenario
1,000 short jobs at once
  • Workers Paid: max 1,500 vCPU running at once (needs 2,000)
  • disk beyond 0 GiB: price unknown
  • 2,400 starts/day included, paid above that (needs ~6,667)
  • 600 starts/hour included, paid above that (needs ~1,000)
  • starts above 90/min are paid, and starts above 270/min fail with 429

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 the next request and follow egress rules you write in code.

  • Egress rules you can program. Cloudflare can block every host except the ones you list, and run your own code on each outbound HTTP request.
  • Sleeps when idle, wakes on request. Useful for many short, spiky sessions: a sandbox sleeps when idle, wakes on the next request, and bills CPU only while busy.
  • Previews and a bigger box than a microVM session. Your users can open a sandbox's app through HTTP previews, and one sandbox can use up to 4 vCPU and 12 GiB.

Use AWS AgentCore when

your agents must stay inside your AWS account and VPC, need a GPU or a US or Asia region, or are short code and browser tasks that fit its managed tools.

  • It lives inside your AWS account. Teams built on AWS keep agents behind their own IAM, VPC, security groups and PrivateLink, in 21 commercial regions.
  • GPUs and two-week sessions on Instances. Agents that need a GPU or a session of up to 14 days can run on EC2 in your account.
  • A managed browser for agents. AgentCore Browser gives agents a managed Chromium with live view, session recording and replay, saved profiles and proxies.

Where boat fits

Cloudflare Sandbox and AgentCore both start each session from an image and keep files in places your setup chooses. If your agents work for hours on one machine, installing packages, building with Docker and running the app they make, look at boat: each agent gets a full VM that saves its disk with no code.

A disk kept with no code

On Cloudflare your code keeps files with snapshots, automatic saves or R2. On AgentCore only paths under /mnt survive a stop. boat saves the disk every minute and at each stop, and can fork a running sandbox. A resume is like a reboot.

A whole machine

Cloudflare tops out at 4 vCPU and 20 GB of disk, with iptables off for Docker. An AgentCore microVM stops at 2 vCPU and 8 hours; Instances on EC2 go further. boat gives up to 16 vCPU with Docker, systemd and /dev/kvm.

Share what the agent builds

Cloudflare previews go through Worker code you write. AgentCore session endpoints need AWS credentials or an OAuth token on every request. boat gives each sandbox up to 50 HTTPS URLs, token-gated by default or public, plus SSH.

Use boat when your agents do real work on one machine for hours: installs, builds, Docker, emulators and a desktop, with a disk saved every minute and URLs you can share. Compare it one to one: boat vs Cloudflare Sandbox and boat vs AWS AgentCore.

boat's own limits
  • Plans start at $20 a month. The plan price comes back as VM time for that month. Unused time does not carry over. Source
  • Starts (create, fork, resume): the $20 plan includes 12 a minute, 60 an hour and 200 a day. The $2,000 plan includes 90 a minute, 600 an hour and 2,400 a day. Extra starts cost $0.03 to $0.07. A start fails with 429 above 3 times the included starts per minute, or 6 times per hour or per day. Source
  • A stopped sandbox has no compute charge. boat keeps its disk for at least 14 days. A saved snapshot keeps it longer; extra saved snapshots and the AI credentials proxy are paid. Source
  • Auto-stop defaults to 1 hour. You can turn it off on a paid plan. The trial allows 2 hours at most. Source
  • boat saves the disk every minute and at each stop. Memory, running programs and /tmp are not saved: a resume is like a reboot. A machine failure loses writes after the last good snapshot. Source
  • Machines run in Germany, Finland and France only. Snapshot copies can be stored outside the EU. Source
  • Public IPv6 and outbound IPv4. No dedicated IPv4. The IP changes at each resume. Source
  • Hosts are AMD Ryzen 7 9700X and Ryzen 9 9950X. vCPUs are shared. No GPU. You cannot boot your own Docker image. Source

Questions people ask

Is Cloudflare Sandbox cheaper than AWS AgentCore?

In all five scenarios on this page, AgentCore's estimate is lower, for example $107 against $148 a month for one agent that never stops, and $1,286 against $1,660 for 50 agents in parallel. Its 4 vCPU shapes use the Instances type, with EBS storage billed on top. boat costs less than both in four of the five, for example $26 and $317; for 1,000 short jobs at once boat does not fit.

Which is faster, Cloudflare Sandbox or AWS AgentCore?

We cannot say: neither is in StarSling's CPU run. boat did 28.06 V8 Web Tooling runs/s there at 4 vCPU / 8 GB, on a Ryzen 9 9950X host. ComputeSDK measured a 671 ms median start for Cloudflare with 100 at once; AgentCore is not in it.

Can Cloudflare Sandbox or AgentCore run Docker?

Cloudflare supports docker:dind with iptables and IP forwarding turned off, because containers cannot change iptables. AgentCore runs your image as root, but its docs do not say Docker works inside a session. boat runs Docker with BuildKit and Compose, systemd and /dev/kvm.

Do files survive when a session stops?

On Cloudflare, yes when your code keeps them: a snapshot (public beta, kept 30 days), a scheduled automatic save, an R2 backup or a mounted R2 bucket. On AgentCore, paths under /mnt survive: session storage, your own EFS or S3 Files, or EBS volumes on Instances. boat saves the disk every minute and at each stop with no code; a machine failure loses writes after the last good snapshot.

How long can a session run?

Cloudflare sets no fixed maximum and stops a sandbox after inactivity. AgentCore microVM sessions last up to 8 hours, and Instances sessions up to 14 days. boat has no session cap once auto-stop is off on a paid plan (default 1 hour).

Where do they run?

Cloudflare places containers in several regions of its network, and you can pin a region or jurisdiction. AgentCore runs in 21 commercial AWS regions plus GovCloud. boat runs on machines in Germany, Finland and France, with no US or Asia region.

Try boat

Install the CLI, then run boat new.

7-day free trial

More comparisons