Kimi K3.1 Pro on Sail: as low as $0.70 input, $0.10 cached input, and $6 output per million tokens.
Blog
Three pixel-art sandboxes side by side with a sandcastle, a white sail, and a green shovel.

How to pick your sandbox

A guide to choosing a sandbox provider for your AI workload.

Everyone seems to have a sandbox product now. But how to choose the right one?

To start, what is a sandbox?

A sandbox runs code in an isolated environment with restricted access to the host system.

The simplest form of a sandbox is a host on AWS EC2, where a typical instance is already a virtual machine (VM) with its own operating system and kernel. Code running inside that VM is isolated from other instances. This works fine for small workloads. However, if you wanted to run thousands of isolated workloads, you’d need to manage provisioning, isolation, orchestration, and resource allocation yourself. Furthermore, if you wanted to run a long-horizon agent, you’d need to either leave the host running and pay for provisioned resources while it sits idle or automate stopping or hibernating it to save on compute costs.

Managed sandbox providers abstract away this complexity, giving you an API to spin up isolated environments and run code without worrying about the underlying infrastructure.

What are sandboxes used for?

  • Code execution: An agent writes a script, executes it, and reads the results. AI code interpreters, data analysis, and the generation or testing of small programs are good examples. Startup speed and security are especially important. Environments are typically short-lived, so long-term persistence matters less.
  • Cloud agents: Instead of running agents locally (no more walking around with your laptop open), you can give them a computer in the cloud. Also known as devboxes, these environments let agents write code, install dependencies, run applications, and retain state across long-horizon tasks. Persistence, security, and pricing become particularly important because agents may need access to an environment for days, spending much of that time idle. In the case of personal agents, they may even have access to personal and credit card information (lol, why would you do that).
  • Large-scale rollouts: Evals and RL post-training both follow this workflow, in which thousands of environments can run in parallel to assess a model’s capabilities. Evals measure model performance while RL rollouts collect trajectories and rewards to update weights between batches. Services like Tinker can handle model training and sampling, while sandboxes provide the environments where agents execute tasks. For both use cases, scalability, reproducibility, and pricing are particularly important. Both running evaluations and collecting trajectories for training require thousands of consistent environments operating efficiently.

I wanted to visualize what matters most for each workload. I looked at persistence1, security2, startup/resume latency3, scalability4, performance5, pricing6, reproducibility7, and compatibility8. Security is a baseline requirement for all three, so I plotted the other seven factors.

Of course, these rankings are pretty subjective. They're meant to illustrate the relative importance of each dimension across workloads, and there are certainly exceptions (like PaperBench or MLE-bench, where long-running experiments make persistence much more valuable).

What do providers offer?

Here’s how sandbox providers compare for three different workloads. The docs have the full provider comparison.

Running a quick script

A spreadsheet has the same invoice ID listed with two different totals. You ask an assistant to find every case like it, and it writes a small Python script on the fly. A sandbox lets you give that script the spreadsheet while keeping your app’s credentials and other users’ files out of reach. If the script takes 200 ms and the sandbox takes 400 ms to start, you spend twice as long waiting as you do running the check. The columns to watch are start/resume time and start/resume fee.

Startup time and fees
Provider
Sailboxes<2s$0.01 per creation on Free. $0 on Pro/Enterprise. Free resume.
E2B<1sNone listed
Daytona<500msNone listed
EC2 On-DemandMinutesNone listed
Modal<500msNone listed
Cloudflare<3sNone listed
AWS AgentCore1sNone listed
Vercel<1sPro $0.60 per million creations. Hobby includes 5,000/month.
  1. Indicative start/resume times from different workloads and methods.
  2. Usage minimums are separate from one-time fees. EC2 On-Demand has a 60-second minimum for per-second billing. Vercel bills at least one minute of provisioned memory and AgentCore Code Interpreter at least one second of usage.

Using a personal assistant

“Find me a table for four next Saturday.” Your assistant opens a browser in a sandbox and checks menus, availability, and cancellation policies. It finds a few places that work, but you need to check with your friends before booking. When you get back to it a few days later, your agent should wake up quickly, remember the list and why it ruled out the other places, and recheck availability before confirming the booking.

For personal assistants and other long-horizon background agents, autosleep between tasks matters. You don’t want to pay for a sandbox that’s just sitting there.

Also pay attention to memory snapshots. In order to resume the same browser process after sleep, the sandbox needs to preserve its memory. Check the provider’s sleep policy for how long the sandbox can stay asleep and the cost while asleep column for any storage charges. If the agent works for hours at a stretch, look at max runtime too.

Sleep and session state
  1. Costs cover sleep, pause, stop, or termination. Plan fees still apply.

Rolling out thousands of evals

Before shipping a new version of your coding agent, you want to see if it fixes more bugs. You give both versions the same 5,000 bug reports and see which fixes pass the tests. Both agents get separate sandboxes for each bug, with the same repo checkout and dependencies. Each can edit files and run tests without touching the other’s work.

Start with concurrent sandboxes. With 100 slots, 10,000 half-hour evals take at least 50 hours. Maximum machine size matters if the tests need to compile a large repo, and small differences in fees and usage rates add up... an extra cent per run is $100 across the batch! For long-horizon evals, those rates also tell you whether you’ll pay for reserved capacity while the sandbox is running but idle.

Rollout capacity and compute rates
Provider
Sailboxes200 reserved vCPUs on Free, 10,000 on Pro64 vCPUs, 256 GiB RAM$0.015 active vCPU·h$0.008 active GiB·h
E2BHobby 10 / Pro 100 included (expandable to 1,100)8 vCPUs, 8 GiB RAM$0.0504 reserved vCPU·h$0.0162 reserved GiB·h
DaytonaShared CPU, RAM, and disk quotas by tier4 vCPUs, 8 GiB RAM$0.0504 reserved vCPU·h$0.0162 reserved GiB·h
EC2 On-DemandRegional vCPU quota by instance family groupVaries by instance type$0.063 reserved vCPU·h†$0.007875 reserved GiB·h†
ModalStarter 100 / Team 5,000 containers64 vCPUs, 336 GB RAM$0.071 usage/request* vCPU·h$0.024 usage/request* GiB·h
CloudflareShared account quotas for CPU, RAM, and disk4 vCPUs, 12 GiB RAM$0.072 active vCPU·h$0.009 reserved GiB·h
AWS AgentCore1,000 Code Interpreter sessions per account and region by default2 vCPUs, 8 GB RAM$0.0895 active vCPU·h$0.00945 active GB·h
VercelHobby 10 / Pro 10,00032 vCPUs, 64 GB RAM$0.128 active vCPU·h$0.0212 reserved GB·h
  1. Active Sailboxes share the organization’s vCPU quota. Pro fits up to 1,250 at 8 vCPUs each. Sleep and pause release capacity.
  2. *Modal bills the greater of request and usage for CPU and RAM. Bursting depends on available capacity. One physical core counts as two vCPUs.
  3. †Both EC2 rates use the same r6i.16xlarge host price in Oregon. Use $4.032/hour on demand for total cost.

Where do sailboxes fit?

Sailboxes provide AI workflows with a flexible compute environment, whether you’re running a quick script, keeping an agent running for days, or launching thousands of parallel rollouts.

At Sail, we believe that AI workflows shouldn't require different compute infrastructure for every use case; you should be able to do it all in a single, flexible environment without worrying about the underlying infrastructure.

You don’t need to provision resources upfront: memory9 scales automatically up to the configured limit, and CPU usage is metered independently of the configured vCPU limit. Every Sailbox comes with default limits of 8 vCPUs, 64 GiB of memory, and 256 GiB of disk. You can raise those limits to 64 vCPUs, 256 GiB of memory, and 1 TiB of disk. You pay for actual usage. Sailbox resource limits

With no fixed runtime limit, Sailboxes can remain available for as long as your agents need them. They also automatically sleep when idle, preserving their state without incurring additional sandbox usage charges until they wake.

To make this work, Sailboxes are run on spot compute10, and we go deeper into the infrastructure stack to dynamically manage memory allocation and live-migrate VMs between physical machines to improve utilization.

The best sandbox depends on your workload and the trade-offs you’re willing to make. We expect more agents to work independently in the background. Those agents will need workspaces that preserve state between tasks, scale resources as demand changes, and sleep when idle.

If those are the things you're optimizing for, give Sailboxes a try.

Notes

  1. Persistence Maximum sandbox lifetime, durability of running processes, state preservation, and pause/resume capabilities. ↩
  2. Security Strength of isolation between sandboxes, filesystem and network restrictions, and secrets management. ↩
  3. Startup/resume latency How quickly a sandbox can start from scratch, resume from a suspended state, and execute its first command. ↩
  4. Scalability How many sandboxes can run concurrently, how quickly they can be provisioned at scale, and how reliably the platform manages them. ↩
  5. Performance CPU and memory availability, execution speed, filesystem I/O, network performance, and resource flexibility. ↩
  6. Pricing Compute and memory rates, idle billing, storage costs, minimum charges, and total cost per workload. ↩
  7. Reproducibility Ability to create identical environments, clone or snapshot existing states, and reliably reset environments between runs. ↩
  8. Compatibility Support for different operating systems, programming languages, packages, dependencies, and tools (e.g., Docker, browsers, GPUs, and custom environments). ↩
  9. Nirvik Baruah on memory allocation ↩
  10. Spot instances are spare cloud compute capacity sold at steep discounts, but they can be reclaimed by the provider at short notice. This makes them great for cheap, disposable workloads but trickier for long-running agents. ↩
Back to blog