Skip to content
Markdown

How to choose a sandbox for AI agents

An agent sandbox is an isolated computer where an AI agent can run programs, install dependencies and work with files.

The right one completes your real jobs safely, reliably and at the lowest total cost. This page gives the checks that decide it, and where Runtime stands on each.

Updated

On this page

Where Runtime stands out#

  • It bills the CPU your agent uses. Most agents spend most of their time waiting on a model. Runtime charges measured CPU at $0.025 per vCPU-hour, with a floor of a twentieth of a vCPU, and $0.0075 per GiB-hour of memory.
  • Idle time bills only storage. A sandbox pauses itself after 300 seconds with nothing happening in it. It wakes on the next request. Its memory and processes are intact.
  • It costs 42% to 88% less than fourteen other sandbox providers on an agent job that mostly waits (the comparison).
  • Every sandbox is a Firecracker microVM with its own kernel, on dedicated servers Runtime operates.
  • Pause keeps memory. A paused sandbox wakes with its processes still running, kept while you have credit. Forks copy a running sandbox, memory included.
  • An uptime promise. Paid accounts get 99% API uptime a month. If a month falls short, 10% of that month's charges is returned as credit automatically (Uptime Promise).
  • The agent sets itself up. It asks for access. You approve once in the browser. No key goes into a prompt or a project file.
  • Built for agents that retry and spend. Idempotency keys on every write, read-only keys, and a daily spending limit per key.
  • Everything around the sandbox. Network rules, secrets the sandbox never sees, volumes, bucket mounts, a desktop, metrics, webhooks and OpenTelemetry export come on every account. Custom domains, TCP ports, dedicated outbound addresses and WireGuard private networks come on paid accounts (products).
  • Free to try. 100 free hours of a 1 GB machine every month, no card. Then prepaid credit from $10, with no plan fee.

Start with the workload#

Write down one representative task. For example: install a repository's pinned dependencies, run its test suite, make one change, and export the test report.

Record the language version, CPU and memory needs, network destinations, files to keep, expected duration and acceptable failure rate.

Requirement What to verify Runtime
Isolated code execution Boundary between guest, host and other tenants A Firecracker microVM with its own kernel for every sandbox
Agent integration Actual remote execution, structured results, file round trip API, CLI, Python, JavaScript and MCP; an OpenAI Agents SDK sandbox client and ready tools for ten agent frameworks; MCP servers from a catalog run in a sandbox
Easy authentication Connection without secrets in prompts or project files Browser-approved CLI connection; local MCP reuses it
Outbound network Your package registries and service destinations work Every port with a kept top-up, 80 and 443 without credit; per-sandbox rules; secrets the sandbox never sees
Public app hosting Reachability, ingress auth and abuse controls Previews: an HTTPS address per port, private by default; custom domains and TCP ports with a kept top-up
Pause and restoration Files and memory survive; expiry and failed wake are explicit Files, memory and processes kept while you have credit; a failed wake says so
Custom environments Dependencies installed once, reused on every start Custom images from a recipe, any public or private image, or a Dockerfile
Storage Data that outlives a sandbox, and your own buckets Volumes backed up off their server daily; S3, R2 and GCS buckets mounted as directories
Predictable cost CPU, memory, idle time, storage, retries and fees Pauses itself after 300 seconds idle; measured CPU with a floor, reserved memory, separately quoted paused storage, 100 GiB out a month free
Spending control Limits an agent cannot raise itself Read-only keys and a daily spending limit per key, set only by a person
Observability What each sandbox did, in the tools you already watch CPU and memory metrics, signed webhooks and OpenTelemetry export, at no charge
Private connectivity Fixed egress for allow-lists; a way into your own network Dedicated outbound addresses with credit, WireGuard private networks with a kept top-up; identity tokens for AWS and Google Cloud
Team access Roles for people, and a record of who changed what Single sign-on (SAML, OIDC) and SCIM free; owner, admin, developer and billing roles; an audit log kept at least 400 days
Reliability A published uptime figure, and what you get when it is missed 99% a month for paid accounts, 10% back automatically; a status page checked from outside

For exact terms, read security, pricing, free usage, and the API reference.

Measure completed jobs#

Run the same inputs, dependency versions and output checks on every candidate. Separate cold starts from warm or resumed runs. Run enough repetitions to show slow runs and failures. Record:

  • Time from request to an executable environment.
  • Dependency setup, task execution and artifact export time.
  • Median and 95th-percentile end-to-end completion time.
  • Successful, failed and retried jobs, including exhausted capacity.
  • CPU-seconds, allocated memory, running duration and retained storage.
  • Total charge divided by successful jobs, including failed attempts.

State hardware, region, concurrency, dates, SDK versions, CPU guarantees and pricing assumptions. A shared CPU ceiling is not a reserved physical core, so compare like with like.

Exercise the failures you will have to handle#

Try a lost create response, an execution timeout, a nonzero exit code, a refused network destination, a time limit that ran out, and unavailable capacity on wake.

  • Retrying the same operation should not create duplicate work or charges.
  • Revoking one agent's credential should stop its access without breaking another agent's connection.
  • For a pause test, write a file and keep a small in-memory value. Pause, restore, then verify both. A clean boot is not proof that memory came back.

Where Runtime fits best#

Runtime fits coding agents, test execution, file processing and multi-step jobs on Linux. Its measured CPU saves the most on workloads that wait on model or network responses.

A running sandbox still pays its CPU floor and reserved memory. Paused storage is billed separately. Inbound traffic is free, and each account's first 100 GiB out a month is free, then $0.02 per GB (10⁹ bytes). Sandboxes run Linux on CPUs, in one US region today. See products for everything available.

Compared with a specific provider#

The same job on each provider: 1,000 runs of a 2 vCPU, 4 GiB sandbox, 60 seconds each, 20 CPU-seconds of work. Rival rates were checked 25 October 2026. Each provider's page gives its date.

Provider Cost for 1,000 runs Runtime saves
Runtime $0.64 —
Northflank $1.11 42%
Cloudflare Sandbox $1.35 53%
Prime Sandboxes $1.52 58%
Fly Machines $1.53 58%
Morph $1.67 62%
Vercel Sandbox $2.12 70%
Freestyle $2.25 72%
Fly Sprites $2.40 73%
CodeSandbox $2.48 74%
E2B $2.76 77%
Daytona $2.76 77%
Blaxel $3.45 81%
Modal Sandboxes $3.97 84%
AWS Lambda MicroVMs $4.20 85%
Runloop $5.33 88%

Each page has the working, a side-by-side table, and how to switch. The saving is largest for agents that wait. For a job that keeps every CPU busy the whole time, Northflank's allocated rate is lower than Runtime's.

Switch with one prompt#

Give your coding agent the one instruction in migration. It replaces the old provider's calls on a branch, tests them on the free usage, and tells you what you save each month. Your old code stays on the main branch until you merge. Code written for E2B, Daytona, Vercel Sandbox or Blaxel runs after changing one import. Whichever provider you are moving from, credit you add within 30 days of signing up is matched, up to $1,000 in total (welcome match). For a new project, start with getting started.

Try it on your own work. Sign up, then paste the setup prompt into your coding agent.

Start free, no card

Was this page right?