Which is better, Cloudflare Sandbox or Fly Sprites?
It depends on what must survive when the agent goes idle. For agents that wait on a model, Runtime has the lowest cost: $0.64 for the job, against $1.35 on Cloudflare and $2.40 on Sprites. Its pause keeps memory and processes until you wake it. Pick Cloudflare Sandbox if your app already lives on Workers and wants sandboxes on its account and bindings. Pick Fly Sprites for a 100 GB disk and very cheap sleep, $0.02 per GB-month.
At a glance
Cloudflare's sandboxes run on Cloudflare Containers, so their prices are the Containers prices.
| Cloudflare Sandbox SDK | Fly Sprites | Runtime | |
|---|---|---|---|
| Isolation | A container in its own VM | Firecracker microVM | Firecracker microVM, own kernel |
| CPU | $0.072 per active vCPU-hour, metered in 10 ms steps | $0.0385 per CPU-hour of measured CPU | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.009 per provisioned GiB-hour; at least 3 GiB per vCPU | $0.021875 per GB-hour of memory in use; managed by Fly | $0.0075 per reserved GiB-hour |
| Disk | $0.000252 per provisioned GB-hour | 100 GB; you pay for the bytes written | Included while running; paused storage $0.08 per GB-month |
| Plan fee | Workers Paid, at least $5 a month | None required; optional monthly plans | None; prepaid credit from $10 |
| Free start | No free tier; the plan includes 375 vCPU-minutes a month | $30 of trial credit | 100 free hours of a 1 GB machine in the first 30 days, no card |
| When idle | Filesystem-only snapshots; processes restart | Pauses after about 30 seconds; disk kept, memory kept at first | Pause keeps files, memory and processes while you have credit |
| Interfaces | A TypeScript SDK called from a Cloudflare Worker | API, CLI, MCP server; JavaScript, Python, Go, Elixir SDKs | API, CLI, MCP server, JavaScript and Python SDKs |
Which one keeps my work when the agent goes idle?
Sprites, of the two. After about 30 seconds with nothing to do, a Sprite pauses, and compute billing stops. At first it is warm: memory is frozen in place, and the next request resumes it in 100 to 500 ms. Later it goes cold, dropping memory and running processes. The next wake then takes 1 to 2 seconds, and processes start fresh. Its disk survives both: files, installed packages and git repositories stay.
Cloudflare stops an instance after its configured inactivity timeout. Public-beta filesystem snapshots restore saved files after a stop, but memory, processes and shell state restart. Snapshots expire 30 days after creation or last restore. R2 buckets can hold data independently.
A paused Runtime sandbox keeps its files, its memory and its running processes, all three while you have credit. It wakes by itself on the next request.
Cost for the same job
1,000 runs of a 2 vCPU sandbox. Each run lasts 60 seconds and keeps the CPU busy for 20 CPU-seconds: an agent that mostly waits for a model. The Sprite is assumed to use all 4 GB for the whole minute, and Runtime gets 4 GiB. Cloudflare's smallest custom 2 vCPU size has 6 GiB, because it needs at least 3 GiB per vCPU. It gets 12 GB of disk, the size in Cloudflare's own example.
- CPU
- 1,000 × 20 s × $0.000020
- $0.40
- Memory
- 1,000 × 60 s × 6 × $0.0000025
- $0.90
- Disk
- 1,000 × 60 s × 12 × $0.00000007
- $0.05
- CPU
- 1,000 × 20 s / 3,600 × $0.0385
- $0.21
- Memory
- 1,000 × 90 s / 3,600 × 4 × $0.021875
- $2.19
- CPU
- 1,000 × 20 s / 3,600 × $0.025
- $0.14
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0075
- $0.50
At 100,000 runs a month, the cost is $135.04 on Cloudflare, $240.14 on Sprites, and $63.89 on Runtime. With both CPUs busy for the whole minute, the job costs $1.33 on Runtime, against $3.35 on Cloudflare and $3.47 on Sprites. Runtime is cheaper however busy the sandbox is. Plan fees, Workers requests, Durable Object time, stored disk, network and free credits are left out.
The two CPU rates are almost the same, so memory decides it. A Sprite pays only for the memory it actually uses. One that uses 1 GB costs $0.76 for these runs, less than Cloudflare's $1.35. Cloudflare bills its 6 GiB whether it is used or not. The Cloudflare figure also assumes each sandbox is destroyed when its run ends. A sandbox left alone bills its memory and disk until its configured inactivity timeout ends.
Which one to pick
- Pick Cloudflare Sandbox if your app already lives on Workers and you want sandboxes that share its account, billing and bindings, placed near users across Cloudflare's network.
- Pick Fly Sprites for a long-lived agent machine with a 100 GB disk that pauses itself between tasks, and very cheap sleep. A sleeping Sprite's disk costs $0.02 per GB-month.
- Pick Runtime for measured CPU at over 30% below either rate, memory you size and plan against, and a pause that keeps memory and processes until you wake it.
Switch from either one
The calls map one to one. The 0.x Cloudflare SDK's getSandbox(env.Sandbox, name) and a
Sprite by name both become Sandbox.getOrCreate(name). That call returns the
sandbox with that name, waking it if it is paused, or creates one.
sandbox.exec(cmd) becomes exec(cmd), and sprite.execFile(cmd, args)
becomes exec([cmd, ...args]):
TypeScriptimport { Sandbox } from "withruntime";const dev = await Sandbox.getOrCreate("dev", { idlePauseSeconds: 900 });await dev.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n");await dev.exec(["python3", "/workspace/invoice.py"]);// The next process, or tomorrow, gets the same sandbox and its files.Cloudflare's proxyToSandbox becomes box.previews.create(port), served from
Runtime's own address rather than through your Worker. Or give your coding
agent the one instruction in migration. It switches the project
on a branch, tests it on the free usage, and reports the monthly saving.
Credit you add within 30 days of signing up is matched, up to $1,000 in total. The full side-by-sides are
Runtime vs Cloudflare and
Runtime vs Fly.io. For the two Fly products, see
Fly Machines vs Sprites.
Runtime Cloud
Runtime runs the same job for 53% less than Cloudflare and 73% less than Sprites. 1,000 one-minute runs of a 2 vCPU sandbox with 4 GB in use cost $1.35 on Cloudflare, $2.40 on Sprites and $0.64 on Runtime. All three bill CPU as measured. Runtime's rate is $0.025 a vCPU-hour, over 30% below either rival's. A paused Runtime sandbox keeps its memory for as long as you choose. Rates checked 25 October 2026.
Get going with npx withruntime login, which comes with free monthly usage and needs no card. Read the migration guide when you are ready to move code.
Sources
Fly.io prices checked 25 October 2026.
Cloudflare sandbox lifetime, snapshot behavior checked 25 October 2026. Rates checked 25 October 2026; the Sprite and Cloudflare sandbox lifecycle pages read 26 October 2026.
Cloudflare Containers pricing, Containers limits and instance types, Sandbox lifecycle, Sandbox backup and restore
Runtime pricing
Facts on this page were checked on 26 October 2026.