Sandbox pricing for agent code execution

A code sandbox for an agent is usually a small Linux microVM or container, started for one task and thrown away. Vendors price it on vCPU and memory by the second, but they differ on what they count: some charge for the CPU a sandbox was given, some for the CPU it actually used, and some add a monthly plan, a fee per sandbox or a cap on how many run at once. rent.dev runs its own sandboxes billed per second from one prepaid balance, priced on provisioned memory plus the CPU used, and its price board runs the same task through each vendor with published rates.

rent.dev: one API for the sandboxes and GPU pods an agent needs.

The same task at each sandbox vendor

Each price is one task on a 2 vCPU, 4 GiB sandbox, from rent.dev's price board, generated 2026-11-14. See the whole board. Browse the full catalog.

SandboxBilled byAgent loop, 30 minInteractive, 30 minWorkspace, 4 hRate read
rent.devrent.dev$0.0452$0.0828$0.4640
Northflank cloudNorthflank$0.0346$0.0346$0.27652026-11-11
Cloudflare containersCloudflare$0.0452$0.0740$0.41932026-11-11
Fly.io spritesFly.io$0.0508$0.0662$0.43742026-11-11
Vercel sandboxVercel$0.0552$0.1064$0.54402026-11-11
Modal sandboxModal$0.0569$0.0835$0.49772026-11-11
Daytona sandboxDaytona$0.0828$0.0828$0.66242026-11-11
E2B sandboxE2B$0.0828$0.0828$0.66242026-11-11

Questions

How does sandbox pricing compare for agent code execution?
Compare the cost of one task, not the hourly rate. An agent loop that runs a few commands and then waits on a model spends most of its life idle, so a vendor that bills used CPU charges much less for it than one that bills allotted CPU at the same list rate. Add any fee per creation, plan fee and storage, then price the task at your real length and CPU load. rent.dev's price board at rent.dev/prices does this for three common agent tasks. On rent.dev's price board, generated 2026-11-14, one agent loop task (30 min on 2 vCPU and 4 GiB) costs from $0.0346 on Northflank's cloud to $0.0828 on E2B's sandbox.
How long can code sandboxes run?
Each vendor sets a default timeout and a maximum session length, and both vary by plan: defaults are often a few minutes, and maximums run from about an hour on free tiers to a day or more on paid plans. A rent.dev sandbox ends at the timeout set when it is created, five minutes unless the agent asks for more, and POST /v1/sandboxes/{id}:extend sets a new timeout while it runs.
What affects sandbox startup time and cost?
How the sandbox is made. Restoring a prepared template or snapshot takes from well under a second to a few seconds, while pulling and unpacking a large image takes much longer. Region, image size and whether the vendor keeps warm capacity matter too. Startup costs money when the meter runs during boot, and it costs the agent wall-clock time on every task, so bake dependencies into a template instead of installing them in each sandbox.
Do sandboxes charge while idle?
Usually, for as long as the sandbox exists: its memory stays allocated whether or not code runs. Where CPU is billed by use, an idle sandbox costs mostly its memory. Set a short timeout, and end the sandbox when the task is done rather than leaving it to expire. rent.dev's price board, generated 2026-11-14, prices its agent loop task with the CPU busy 10% of its 30 min, and on rent.dev's own sandboxes that task costs $0.0452.