Cloudflare Sandbox SDK vs Fly.io Sprites
Choose Cloudflare Sandbox SDK for teams building on Cloudflare Workers that want per-user sandboxes with egress and credentials controlled in code; choose Fly.io Sprites for long-running, stateful agent computers that should cost nothing while idle. Cloudflare Sandbox SDK uses MicroVM (Containers) isolation and is open source; Fly.io Sprites uses MicroVM isolation.
Cloudflare Sandbox SDK vs Fly.io Sprites at a glance
| Attribute | Cloudflare Sandbox SDK | Fly.io Sprites |
|---|---|---|
| What it is | A TypeScript SDK for Cloudflare Workers that runs untrusted code in Linux sandboxes backed by Cloudflare Containers and Durable Objects. | Persistent, hardware-isolated Linux computers for AI agents with a durable 100 GB disk, checkpoints, and no compute charges while idle. |
| Isolation | Each container instance is a microVM with its own kernel and network (per Cloudflare docs); Dynamic Workers (V8 isolates) available for JavaScript-only code | Dedicated microVM with hardware-level isolation (Fly docs); reported to be Firecracker-based |
| Open source | Yes (SDK Apache-2.0 (runs only on Cloudflare)) | No (SDKs MIT) |
| Self-host / BYOC | No / No | No / No |
| SDKs | TypeScript (Workers) | JavaScript/TypeScript, Go, Python, Elixir |
| Cold start (vendor claim) | Container cold starts “often in the 1–3 second range” depending on image (vendor docs) | Warm wake 100–500 ms with processes preserved; cold wake 1–2 s (vendor docs) |
| Max session | No fixed cap; runs while its Durable Object is active, then up to a 6-hour inactivity timeout | No lifetime limit — a Sprite persists until destroyed and sleeps after ~30 s idle |
| Persistence | Ephemeral disk by default; container snapshots (up to 20 GB, 30 days), directory backups to R2, S3/R2 bucket mounts and Durable Object storage | 100 GB durable disk per Sprite that survives sleep; copy-on-write checkpoints (~1 s) with restore; memory preserved on warm pause |
| GPU | Not documented | No GPU option documented |
| Networking | Egress controlled from Worker code: disable internet and intercept outbound HTTP to allow specific hosts and inject credentials; preview URLs routed through your Worker | HTTPS URL per Sprite (org-private by default); outbound open by default with optional DNS-based domain allow/deny policy; connectors broker API credentials |
| Pricing | Cloudflare Containers rates in 10 ms increments: $0.000020 per vCPU-second (active) + $0.0000025 per GiB-second + disk; requires the $5/month Workers Paid plan | Per second, compute only while active: $0.0385 per CPU-hour + $0.021875 per GB-hour memory; storage billed while idle |
| Compliance | Not documented | Fly.io is SOC 2 Type 2; HIPAA BAA and DPA available (company-wide) |
| Best for | Teams building on Cloudflare Workers that want per-user sandboxes with egress and credentials controlled in code | Long-running, stateful agent computers that should cost nothing while idle |
Verified November 8, 2026 from each provider’s documentation. Cold-start figures are vendor claims, not our measurements.
Which should you choose?
Choose Cloudflare Sandbox SDK if…
- You build on Cloudflare Workers and Durable Objects
- You want egress and credentials controlled in your own code
- You want global placement on Cloudflare’s network
- You want a lighter isolate option for JS-only code
Choose Fly.io Sprites if…
- You want a persistent computer per agent or per user
- Your agents are idle most of the time and you want to pay only for active compute
- You want fast checkpoints and rollback
- You want Elixir or Go SDKs
Both are worth piloting with your own image and region. See the full Cloudflare Sandbox SDK profile and Fly.io Sprites profile, or the complete comparison.
Frequently asked questions
Is Cloudflare Sandbox SDK or Fly.io Sprites better for AI agents?
Which is open source, Cloudflare Sandbox SDK or Fly.io Sprites?
How do Cloudflare Sandbox SDK and Fly.io Sprites isolate code?
Sources
Cite this page
Agent Sandboxes. (2026). Cloudflare Sandbox SDK vs Fly.io Sprites. agentsandboxes.org. Last reviewed November 8, 2026. https://agentsandboxes.org/compare/cloudflare-sandbox-vs-fly-sprites/
Found an error or a missing sandbox? Submit a correction — every entry links to the sources it relies on.