Which is better, E2B or Fly Sprites?
It depends on how often your agents go quiet. Runtime has the lowest bill here whether they wait or compute: $0.64 for the waiting job, against $2.40 on Sprites and $2.76 on E2B. It measures CPU like Sprites, at a lower rate, and lets you size memory yourself. Pick E2B for self-hosting or for pauses with no expiry. Pick Sprites for cold storage at $0.02 per GB-month, or for the Go and Elixir SDKs.
At a glance
| E2B | Fly Sprites | Runtime | |
|---|---|---|---|
| Isolation | Firecracker microVM, own kernel | Firecracker microVM | Firecracker microVM, own kernel |
| CPU | $0.0504 per allocated vCPU-hour | $0.0385 per CPU-hour of measured CPU | $0.025 per vCPU-hour of measured CPU, with a small floor |
| Memory | $0.0162 per allocated GiB-hour | $0.021875 per GB-hour of memory in use | $0.0075 per reserved GiB-hour |
| Size | 1 to 8 vCPUs and 1 to 8 GiB, set per sandbox | Memory managed by Fly; 100 GB disk | Up to 16 vCPUs and 64 GiB, sized separately |
| Storage | 10 GiB on Hobby, 20 GiB on Pro, included | $0.50 per GB-month hot, $0.02 per GB-month cold | Included while running; paused storage $0.08 per GB-month |
| Plan fee | Hobby $0; Pro $150 per month | None required; optional monthly plans | None; prepaid credit from $10 |
| Free start | $100 of usage credit, once | $30 of trial credit | 100 free hours of a 1 GB machine in the first 30 days, no card |
| When idle | Pause keeps files, memory and processes | Pauses itself; memory kept at first, the disk kept always | Pause keeps files, memory and processes while you have credit |
| SDKs | JavaScript and Python | JavaScript, Python, Go and Elixir | JavaScript and Python |
Are Sprites cheaper than E2B?
Only when the sandbox uses little memory. Sprites bill CPU the way Runtime does, by what the code uses, so a waiting agent pays almost nothing for CPU: $0.21 in the job below, against $1.68 on E2B. Memory is where Sprites cost more. It is $0.021875 per GB-hour of memory in use, against E2B's $0.0162 per allocated GiB-hour. So a Sprite using all 4 GB pays $2.19 for memory and $2.40 in total.
A Sprite is billed for the memory it actually uses. The same job using 1 GB costs $0.76 on Sprites, well under E2B's $2.76. A busy job moves the other way: Sprites' CPU charge grows with use, while E2B's does not.
Runtime's measured CPU costs $0.025 per vCPU-hour, and its memory $0.0075 per GiB-hour. It is cheaper than both, whichever way the job leans.
Cost for the same job
1,000 runs of a 2 vCPU, 4 GiB 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.
- CPU
- 1,000 × 60 s / 3,600 × 2 × $0.0504
- $1.68
- Memory
- 1,000 × 60 s / 3,600 × 4 × $0.0162
- $1.08
- 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 per month, that is $276.00 on E2B, $240.14 on Sprites and $63.89 on Runtime. With both CPUs busy for the whole minute, it is $1.33 on Runtime, against $2.76 on E2B and $3.47 on Sprites, so Runtime is cheaper however busy the sandbox is. The Sprite figure includes the 30 seconds or so that a Sprite stays awake and billed after its run. Plan fees, storage, network and free credits are left out.
What happens when the agent goes quiet?
This is where the two differ most. A Sprite pauses itself when nothing is happening. It keeps its disk always and its memory at first. When it goes cold, its memory is dropped at a time you do not choose. An E2B sandbox bills its full size until its timeout ends it, or until you pause or kill it. A session lasts at most 1 hour on Hobby and 24 hours on Pro. A paused E2B sandbox keeps files, memory and running processes with no expiry.
Runtime does both: a sandbox can pause itself after a set idle time, and a paused sandbox keeps its files, memory and processes while you have credit. The next request wakes it.
TypeScriptimport { Sandbox } from "withruntime";const sbx = await Sandbox.create({ idlePauseSeconds: 600 }); // ten idle minutesawait sbx.update({ idlePauseSeconds: 1800 }); // change it later; 0 turns it offPythonfrom withruntime import Sandboxdev = Sandbox.get_or_create("dev", idle_pause_seconds=900)dev.exec("git pull || true")Which one to pick
- Pick E2B for fixed sizes billed by the second, paused sandboxes kept with no expiry, or a runtime you can self-host under Apache-2.0.
- Pick Sprites for sandboxes that manage their own sleep, a 100 GB disk, very cheap cold storage at $0.02 per GB-month, or SDKs in Go and Elixir.
- Pick Runtime for measured CPU at 35% below Sprites' rate and 50% below E2B's allocated rate, memory you size and plan against, and a pause that keeps memory for as long as you choose.
Runtime Cloud
Runtime runs the same job for 77% less than E2B and 73% less than Sprites. 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.76 on E2B, $2.40 on Sprites with all 4 GB in use, and $0.64 on Runtime. Runtime bills measured CPU like Sprites, at 35% below the rate, and its memory costs less than either. Rates checked 25 October 2026.
Measure your own agent on the free monthly usage. Start with npx withruntime login.
For E2B code, the migration guide makes the change on a branch.
Switch from either one
From E2B, change one import:
TypeScriptimport { Sandbox } from "withruntime/e2b"; // was: from "e2b"Pythonfrom withruntime.e2b import Sandbox # was: from e2b import SandboxFrom Sprites, the calls map directly: client.createSprite(name) becomes
Sandbox.create(), or Sandbox.getOrCreate(name) to find a named one again,
and sprite.execFile(cmd, args) becomes exec([cmd, ...args]):
TypeScriptimport { Sandbox } from "withruntime";const box = await Sandbox.create();try { await box.files.write("/workspace/invoice.py", "print(sum([125, 250, 375]))\n"); console.log((await box.exec(["python3", "/workspace/invoice.py"], { check: true })).stdout);} finally { await box.stop();}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. npx withruntime compare --from fly (or --from e2b) prices
what you ran at the old provider's rates. Credit you add within 30 days of signing up is matched, up to $1,000 in total. The
full comparisons are Runtime vs E2B and
Runtime vs Fly.io.
Sources
Fly.io prices checked 25 October 2026.
E2B and Fly.io pricing pages rechecked 25 October 2026; the rest checked 25 October 2026.
- E2B pricing, E2B sandbox persistence
- Fly.io pricing, Sprites, Sprites documentation, Sprites lifecycle and persistence
- Runtime pricing and the JavaScript guide
Facts on this page were checked on 26 October 2026.