# E2B vs Fly Sprites: pricing, isolation and limits Both run Firecracker microVMs. E2B bills allocated vCPUs and memory; Sprites bill CPU used and memory in use, and pause themselves. **Runtime runs the same job for 77% less than E2B and 81% less than Sprites.** 1,000 one-minute runs of a 2 vCPU, 4 GiB sandbox cost $2.76 on E2B, $3.31 on Sprites with all 4 GB in use, and $0.64 on Runtime. Runtime bills measured CPU like Sprites, at about a third of the rate, and its memory costs less than either. Rates checked 23 September 2026. ## 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.07 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.04375 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 | vCPUs and memory chosen per sandbox | | 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 a month | None required; optional monthly plans | None; prepaid credit from $10 | | Free start | $100 of usage credit, once | $30 of trial credit | 50 sandbox hours, 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, 1 to 365 days | | 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.39 in the job below, against $1.68 on E2B. Memory is where Sprites cost more. It is $0.04375 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.92 for memory and $3.31 in total. A Sprite's memory figure is what it actually uses. The same job using 1 GB costs $1.12 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 is $0.025 a vCPU-hour and its memory $0.0075 a GiB-hour, so 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. ``` E2B CPU 1,000 × 60 s / 3,600 × 2 × $0.0504 = $1.68 Memory 1,000 × 60 s / 3,600 × 4 × $0.0162 = $1.08 Total $2.76 Sprites CPU 1,000 × 20 s / 3,600 × $0.07 = $0.39 Memory 1,000 × 60 s / 3,600 × 4 × $0.04375 = $2.92 Total $3.31 Runtime CPU 1,000 × 20 s / 3,600 × $0.025 = $0.14 Memory 1,000 × 60 s / 3,600 × 4 × $0.0075 = $0.50 Total $0.64 ``` At 100,000 runs a month that is $276.00 on E2B, $330.56 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 $5.25 on Sprites, so Runtime is cheaper however busy the sandbox is. A Sprite also stays awake for about 30 seconds after its last activity unless you delete it. 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, keeps its disk always, and keeps 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 you pause or kill it, and 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 for the retention you choose, 1 to 365 days. The next request wakes it, usually in about half a second. ```ts check import { Sandbox } from "withruntime"; const sbx = await Sandbox.create({ idlePauseSeconds: 600 }); // ten idle minutes await sbx.update({ idlePauseSeconds: 1800 }); // change it later; 0 turns it off ``` ```python check from withruntime import Sandbox dev = 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 about a third of Sprites' rate and half of E2B's allocated rate, memory you size and plan against, and pause that keeps memory for as long as you choose. ## Switch from either one From E2B, change one import: ```ts no-run import { Sandbox } from "withruntime/e2b"; // was: from "e2b" ``` ```python no-run from withruntime.e2b import Sandbox # was: from e2b import Sandbox ``` From Sprites, the calls map one to one: `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])`: ```ts import { Sandbox } from "withruntime"; const box = await Sandbox.create({ funding: "trial" }); try { console.log((await box.exec(["python3", "-c", "print(6 * 7)"], { check: true })).stdout); } finally { await box.stop(); } ``` Or give your coding agent the one instruction in [migration](/docs/migrate): it switches the project on a branch, tests it on the free trial and reports the monthly saving. `npx withruntime compare --from fly` (or `--from e2b`) prices what you ran at the old provider's rates, and `npx withruntime switch --from fly` before your first top-up matches that top-up with credit, up to $100. The full side-by-sides are [Runtime vs E2B](/docs/e2b-alternative) and [Runtime vs Fly.io](/docs/fly-alternative). ## Sources E2B and Fly.io pricing pages rechecked 25 September 2026; the rest checked 23 September 2026. - [E2B pricing](https://e2b.dev/pricing), [E2B sandbox persistence](https://docs.e2b.dev/sandbox/persistence) - [Fly.io pricing](https://fly.io/pricing/), [Sprites](https://fly.io/sprites/), [Sprites documentation](https://docs.sprites.dev/), [Sprites lifecycle and persistence](https://docs.sprites.dev/concepts/lifecycle/) - Runtime [pricing](/docs/pricing) and the [JavaScript guide](/docs/javascript#pause-wake-extend) Facts on this page were checked on 25 September 2026.