@sandboxrouter/sdk 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,9 @@
2
2
 
3
3
  **One API for every sandbox.** A free, open-source router for the places an AI agent can run code: Agent37, Alibaba Cloud, AWS (Bedrock AgentCore and Lambda MicroVMs), Azure Container Apps, Beam, Blaxel, Boat, Cloudflare, CodeSandbox, Daytona, Dedalus Machines, Deno, E2B, exe.dev, Fly.io Sprites, Freestyle, HOPX, InstaBox, Koyeb, Maritime, Modal, Morph, Northflank, Novita, OpenScale, Runloop, Sail, Superserve, Tensorlake, Upstash Box and Vercel, plus Docker on your own machine. It picks a provider by price, speed or capability, and falls back to the next one when a provider is down or rate-limited.
4
4
 
5
- Not every adapter has run against a real account yet. The [Prices](#prices) table shows which have passed the real-account check and which are built from docs and tested against mocks only.
5
+ ```bash
6
+ npm i @sandboxrouter/sdk # plus the SDK of each provider you use: see Install below
7
+ ```
6
8
 
7
9
  ```ts
8
10
  import { Router } from "@sandboxrouter/sdk";
@@ -19,85 +21,60 @@ try {
19
21
 
20
22
  Runs as plain JavaScript on Node 20+. (In TypeScript 5.2+, or Node 24+, `await using sbx = ...` kills the sandbox for you.)
21
23
 
22
- With no size you get 2 vCPU / 4 GB, except on providers whose default image has a fixed size (Daytona 1 vCPU / 1 GB, E2B 2 vCPU / 0.5 GB, OpenScale 2 vCPU / 1 GB), where you get that. Ask for more than that and those providers are skipped unless you pass a custom `image` built at the size you need.
23
-
24
- Switch providers by changing which keys are set, not your code (custom images are the exception: each provider names its own). If one returns a 429, the next one takes the sandbox.
24
+ Set the keys of the providers you use. `create()` starts the sandbox on the cheapest one that fits among those that passed the real-account check, then the untested ones, by public list price (ties alphabetical, and no provider pays for placement). If that provider is down, busy or out of credit, the next one takes it, and every attempt is on `sbx.attempts`. The sandbox stays on that provider until you `kill()` it.
25
25
 
26
- Site: [sandboxrouter.vercel.app](https://sandboxrouter.vercel.app) · npm: [`@sandboxrouter/sdk`](https://www.npmjs.com/package/@sandboxrouter/sdk)
26
+ Site and docs: [sandboxrouter.vercel.app](https://sandboxrouter.vercel.app) · npm: [`@sandboxrouter/sdk`](https://www.npmjs.com/package/@sandboxrouter/sdk)
27
27
 
28
28
  ## Why
29
29
 
30
- Agents need a disposable computer: to run code a model wrote, install packages, run tests, scrape, or do an RL rollout. There are more than a dozen sandbox providers, each with its own SDK, auth, lifecycle and price, and the same 2 vCPU / 4 GB box costs anywhere from a few cents to over thirty cents an hour.
31
-
32
- So every agent team either locks into one provider or writes its own adapter layer. sandboxrouter is that adapter layer, done once, in the open:
33
-
34
- - **One interface.** `create`, `exec`, `writeFile`, `readFile`, `pause`, `kill`, the same on every provider. `exec` streams stdout and stderr as they happen.
35
- - **Routing.** `cheapest` (the default: lowest list price for your size) or `fastest` (lowest cold start you measured with `bench`), or name providers yourself.
36
- - **Fallback.** A failed create moves to the next candidate, and every attempt is recorded on `sbx.attempts`.
37
- - **Capability filters.** Ask for a GPU and only GPU-capable providers are tried. Ask for 32 vCPU and providers that can't do it are skipped, with the reason.
38
- - **Your keys.** Your accounts, your bills. Nothing is proxied through a third party.
39
- - **HTTP server and Python client.** Run `sandboxrouter serve` and any language gets the same API.
40
- - **Computers.** Linux and Windows desktops, Android phones and iPhone simulators for computer-use models, from 7 providers, routed by price per OS: actions, screenshots, and (where the provider has one) a link for a person to watch or take over.
41
- - **Open benchmark.** `bench --share` produces a report; cold starts on the site come from reports submitted to [`results/`](results/).
42
-
43
- ## Fair by construction
30
+ AI agents need a disposable computer to run code a model wrote: install packages, run tests, do an RL rollout. Dozens of providers sell one, each with its own SDK and auth, and the same 2 vCPU / 4 GB sandbox costs from under a cent to over thirty cents an hour. sandboxrouter is one interface over all of them:
44
31
 
45
- No provider gets a better slot, and none pays for placement.
46
-
47
- - With no strategy, a sandbox goes to the **lowest list price for the size you asked for**, among providers you have keys for. Ties break **alphabetically**.
48
- - `fastest` uses only cold starts **you** measured with `bench`, then price.
49
- - Prices are each provider's public rate, with a source link, in [`src/catalog.ts`](src/catalog.ts). There's a test that the catalog has no privileged ordering.
50
- - Docker is never picked automatically, because it always "costs" $0 and isolates less than a cloud micro-VM. Name it to use it.
51
-
52
- If a price is wrong, open a PR with the source link.
32
+ - **Same code everywhere.** `create`, `exec` (streamed), `writeFile`, `readFile`, `pause`, `kill`. Switch providers by changing which keys are set.
33
+ - **Tested first, then cheapest, with fallback.** Or `cheapest` for price alone, `fastest` by cold starts you measured, or a list of providers you name.
34
+ - **Your keys.** Your accounts and your bills; nothing is proxied through anyone else.
35
+ - **Cleanup.** A local ledger of every sandbox started, so `sandboxrouter gc` kills what a crashed script left behind.
36
+ - **TypeScript, Python, HTTP and a CLI.** Plus desktops and phones for computer-use models.
53
37
 
54
38
  ## Prices
55
39
 
56
- Estimated list price while running, 2 vCPU / 4 GB (`npx @sandboxrouter/sdk providers --vcpu 2 --memory 4`). Providers anyone can sign up for come first, cheapest first; waitlisted or closed sign-ups follow. The router uses the same price order, but only among providers you have keys for.
57
-
58
- How to read it:
59
-
60
- - **Up to $X** means the provider bills CPU only while it's busy, so this is the price with every core busy. An agent that mostly waits on its model pays less.
61
- - **Plan needed** is the monthly plan you must be on before the API will create sandboxes. "Credited" means the fee comes back as usage. "None" means a free tier or plain pay-as-you-go works. For a small project, the plan can cost more than the usage.
62
- - **Real-account check** is the last time the 14-step [`check`](#compatibility) passed against a real account. "Not run yet" means the adapter is built from the provider's docs and tested against mocks only.
63
- - **Skipped** means the provider can't take 2 vCPU / 4 GB. One skipped for its default image's size is still used by a `create()` that names no size, at that image's size.
64
-
65
- | Provider | $/hr | Plan needed | Real-account check | Notes | Source |
66
- |---|---|---|---|---|---|
67
- | Agent37 | $0.007 | none | not run yet | Whole-minute billing: monthly shape total / 730 / 60; running estimate includes default disk (2 vCPU / 4 GB / 4 GB disk = $4.76/mo); sleeping/stopped disk $0.09/GB-mo; gVisor; $5 minimum top-up, wallet must hold one running day | [pricing](https://www.agent37.com/docs/agents-api/billing) |
68
- | Boat | $0.018 | $20/mo (credited) | not run yet | Fixed sizes billed per second ($0.018/h for 2 vCPU / 4 GB up to $0.20/h for 16 / 32); needs a plan from $20/mo, paid back as VM time | [pricing](https://docs.boat.dev/pricing.md) |
69
- | Maritime | $0.022 | $20/mo (credited) | passed (2026-11-07) | Per second, no minimum runtime; running disk included; Starter $20/mo incl. $20 usage; paused disk $0.08/GB-month (default idle action deletes sandbox) | [pricing](https://maritime.sh/pricing) |
70
- | Sailboxes (Sail Research) | up to $0.062 | none | passed (2026-11-07) | Per second on what the box uses (CPU time, RAM it holds, disk $0.0007/GiB-h), billed per minute; RAM counts the VM's file cache, up to the 16 GiB minimum limit, so file-heavy work can hold more than you asked for; paused/sleeping free; creation $0.01 at 2-4 vCPU on the free plan ($5/mo credit with a card), waived on Pro $250/mo | [pricing](https://docs.sailresearch.com/sailboxes-pricing.md) |
71
- | Northflank | $0.067 | none | not run yet | Per second on Northflank Cloud, ephemeral disk included; sandboxes run as deployment services (microVMs) | [pricing](https://northflank.com/pricing) |
72
- | Morph Cloud | $0.100 | none | not run yet | $0.05/MCU; MCU-hours = max(vCPU, RAM/4 GB, disk/16 GB); snapshots extra | [pricing](https://cloud.morph.so/web/pricing) |
73
- | exe.dev | $0.105 | $15/mo | not run yet | Standalone reserved size, per second: $0.105/h per 2 vCPU / 4 GiB unit; stopped CPU/RAM free, retained disk separate; Personal from $15/mo (up to 16 vCPU / 32 GiB), Work $75/mo (32 / 64 without approval) | [pricing](https://exe.dev/docs/standalone-vms.md) |
74
- | Novita AI Agent Sandbox | $0.117 | none | not run yet | Per second ($0.0000098/vCPU/s, $0.0000032/GiB/s); size comes from the template; paused = storage only | [pricing](https://docs.novita.ai/guides/sandbox-pricing) |
75
- | Freestyle | $0.134 | none | not run yet | Per second on allocated fixed snapshot size; estimate includes disk at $0.000086/GiB-h; free monthly 200 vCPU-h, 400 GiB-h RAM, 60,000 GiB-h disk; Hobby $50/mo incl. $50 (max 8/16), Pro $500 (max 32/64); paused storage only | [pricing](https://www.freestyle.sh/docs/vms/pricing-and-limits) |
76
- | Beam | $0.140 | $20/mo (credited) | not run yet | Per second, Performance tier (sandbox default); Developer plan $20/mo incl. $20 credits; GPUs billed separately | [pricing](https://www.beam.cloud/pricing) |
77
- | CodeSandbox SDK (Together) | $0.149 | none | not run yet | Fixed tiers: Pico 2 vCPU / 1 GB $0.0743/h, Nano 2 / 4 $0.1486/h, up to 64 / 128 $4.7552/h; credits $0.01486, billed per started minute; Build free, 10 concurrent; Scale $170/mo incl. 1,100 credits | [pricing](https://docs.together.ai/docs/together-code-sandbox-legacy) |
78
- | Fly.io Sprites | up to $0.164 | none | not run yet | Bills actual CPU and memory use; this is the full-use price; storage extra | [pricing](https://fly.io/sprites) |
79
- | Blaxel | $0.166 | none | passed (2026-11-07) | Billed on memory only ($0.0000115/GB-s), CPU scales with memory (~2 GB per core) | [pricing](https://blaxel.ai/pricing) |
80
- | HOPX | $0.166 | none | not run yet | Per second, plus storage; size comes from the template, not the request | [pricing](https://hopx.ai/pricing) |
81
- | Superserve | $0.166 | maybe $20/mo (credited) | not run yet | Per second active; superserve/base fixed at 2 vCPU / 4 GiB / 8 GiB disk; retained storage $0.000108/GiB-h (shared template plus changed blocks); Developer $20/mo incl. $20, max 4/16 with team templates; recurring Free allowance not published on pricing page | [pricing](https://superserve.ai/pricing) |
82
- | Tensorlake | up to $0.200 | none | not run yet | Bills active CPU (floor 20% of allocation); this is the full-use price; Pro plan is lower | [pricing](https://www.tensorlake.ai/pricing) |
83
- | Upstash Box | up to $0.200 | none | not run yet | Billed per active CPU core-hour only (memory and idle time free); estimate assumes every core of the box busy; fixed sizes 2/4, 4/8, 8/16 | [pricing](https://upstash.com/pricing/box) |
84
- | Cloudflare Sandbox | up to $0.216 | $5/mo | not run yet | 10 ms billing on active CPU and allocated instance memory; full-CPU estimate excludes allocated disk ($0.000252/GB-h), Worker and Durable Objects charges; needs Workers Paid ($5/mo) and bridges/cloudflare | [pricing](https://developers.cloudflare.com/containers/platform/pricing/) |
85
- | Amazon Bedrock AgentCore Code Interpreter | up to $0.217 | none | not run yet | Per second; CPU billed on actual use (I/O wait free), memory on peak; fixed 2 vCPU / 8 GB session, this is the 100%-CPU price | [pricing](https://aws.amazon.com/bedrock/agentcore/pricing/) |
86
- | Modal | up to $0.238 | none | not run yet | Sandbox rates, per second ($0.00003942 per physical core = 2 vCPUs); GPUs extra; region pinning x1.15-1.75; Starter includes $30/mo credit | [pricing](https://modal.com/pricing) |
87
- | AWS Lambda MicroVMs | $0.252 | none | not run yet | us-east-1 ARM; billed on the image's baseline size (2 GB per vCPU) while running, per-second burst up to 4x; suspended VMs pay snapshot storage; needs a MicroVM image you build once | [pricing](https://aws.amazon.com/lambda/pricing/) |
88
- | Deno Sandbox | up to $0.300 | $20/mo | not run yet | Billed on CPU time, not wall clock (estimate assumes both vCPUs busy); fixed 2 vCPU, 0.75-4 GB, max 30 min lifetime; needs a paid Deno Deploy plan | [pricing](https://deno.com/sandbox) |
89
- | Runloop | $0.317 | none | not run yet | Per second, plus disk; pause (suspend) is a Pro-plan feature | [pricing](https://www.runloop.ai/pricing) |
90
- | Vercel Sandbox | up to $0.341 | none | not run yet | iad1; active CPU, provisioned RAM in minimum 1-minute increments (2 GB/vCPU); full-CPU estimate; Hobby free within quotas, Pro $20/mo usage credit; creations $0.60/million and retained snapshots $0.08/GB-month extra | [pricing](https://vercel.com/docs/vercel-sandbox/pricing) |
91
- | InstaBox (sign-up waitlisted) | $0.017 | none | not run yet | Per second while running on fixed sizes (2/4, 4/8, 8/16); paused or stopped boxes bill only /data beyond the included disk ($0.00011/GiB-h); Pro $20/mo includes $20 credits; free plan: 1 box at 4/8 | [pricing](https://instabox.sh/docs/pricing.md) |
92
- | Koyeb Sandboxes (not taking new accounts) | $0.058 | $29/mo | not run yet | Per second; fixed Standard instance sizes (1 vCPU + 1 GB = $0.0144/h); sandboxes need a paid plan (Pro $29/mo); public preview | [pricing](https://www.koyeb.com/docs/reference/instances) |
93
- | Dedalus Machines (sign-up waitlisted) | $0.149 | none | not run yet | Per second while awake; sleeping machines bill storage only (10 GiB included on Hobby, 20 on Pro); Hobby plan max 4 vCPU / 16 GiB; private beta | [pricing](https://docs.dedaluslabs.ai/dcs/dm/pricing) |
94
- | LangSmith Sandboxes (sign-up waitlisted) | $0.189 | none | not run yet | Per second; memory must be 2 to 6 GiB per vCPU; storage $0.000123/GiB-h; 8 LSU ($8) of sandbox usage a month included; Developer plan max 10 sandboxes | [pricing](https://www.langchain.com/pricing) |
95
- | OpenScale Sandboxes | skipped (default image is 2 vCPU / 1 GB; a bigger size needs image.openscale) | none | passed (2026-11-07) | Per second on allocated size; no platform fee or minimum; paused = free; size comes from the template (E2B-compatible API); Singapore only; needs a pay-as-you-go key | [pricing](https://openscale.so/sandboxes) |
96
- | Azure Container Apps dynamic sessions | skipped (max 1 vCPU) | none | not run yet | Flat $0.03 per session-hour (built-in Shell pools), billed per allocated session in 1-hour increments, East US; needs a session pool you create once | [pricing](https://learn.microsoft.com/en-us/azure/container-apps/billing#dynamic-sessions) |
97
- | Daytona | skipped (default image is 1 vCPU / 1 GB; a bigger size needs image.daytona) | none | passed (2026-11-07) | Per second, plus disk above 5 GiB | [pricing](https://www.daytona.io/pricing) |
98
- | Alibaba Cloud Agent Sandbox | skipped (max 2 GB memory) | none | not run yet | Per second; Default QoS, Hong Kong and regions outside mainland China; disk separately $0.00025308/GiB-h; code-interpreter-v1 template is 2 vCPU / 2 GiB with 10 GiB disk (E2B-compatible API) | [pricing](https://www.alibabacloud.com/help/en/agent-sandbox/product-overview/billing-overview) |
99
- | E2B | skipped (default image is 2 vCPU / 0.5 GB; a bigger size needs image.e2b) | none | passed (2026-11-07) | Per second; free Hobby tier ($100 one-time credit, 1-hour sessions, 20 at once); Pro $150/mo for longer sessions | [pricing](https://e2b.dev/pricing) |
100
- | Docker (local) | free | none | passed (2026-11-07) | Runs on your own machine; free, but shares your kernel, so weaker isolation than a cloud micro-VM | [pricing](https://docs.docker.com/engine/) |
40
+ List price while running, 2 vCPU / 4 GB, cheapest first; waitlisted sign-ups follow. The router tries the ones that passed the real-account check first. "Up to" = CPU billed only while busy, shown with every core busy. "Not run yet" = built from the provider's docs and tested against mocks only. Click a provider for its billing details; more in [Reading the price table](https://sandboxrouter.vercel.app/docs#price-table).
41
+
42
+ | Provider | $/hr | Plan needed | Real-account check | Source |
43
+ |---|---|---|---|---|
44
+ | [Agent37](https://sandboxrouter.vercel.app/providers/agent37) | $0.007 | none | passed (2026-11-11) | [pricing](https://www.agent37.com/docs/agents-api/billing) |
45
+ | [Boat](https://sandboxrouter.vercel.app/providers/boat) | $0.018 | $20/mo (credited) | not run yet | [pricing](https://docs.boat.dev/pricing.md) |
46
+ | [Maritime](https://sandboxrouter.vercel.app/providers/maritime) | $0.022 | $20/mo (credited) | passed (2026-11-11) | [pricing](https://maritime.sh/pricing) |
47
+ | [Sailboxes (Sail Research)](https://sandboxrouter.vercel.app/providers/sail) | up to $0.062 | none | passed (2026-11-11) | [pricing](https://docs.sailresearch.com/sailboxes-pricing.md) |
48
+ | [Northflank](https://sandboxrouter.vercel.app/providers/northflank) | $0.067 | none | not run yet | [pricing](https://northflank.com/pricing) |
49
+ | [Morph Cloud](https://sandboxrouter.vercel.app/providers/morph) | $0.100 | none | not run yet | [pricing](https://cloud.morph.so/web/pricing) |
50
+ | [exe.dev](https://sandboxrouter.vercel.app/providers/exedev) | $0.105 | $15/mo | not run yet | [pricing](https://exe.dev/docs/standalone-vms.md) |
51
+ | [Novita AI Agent Sandbox](https://sandboxrouter.vercel.app/providers/novita) | $0.117 | none | passed (2026-11-11) | [pricing](https://docs.novita.ai/guides/sandbox-pricing) |
52
+ | [Freestyle](https://sandboxrouter.vercel.app/providers/freestyle) | $0.134 | none | passed (2026-11-11) | [pricing](https://www.freestyle.sh/docs/vms/pricing-and-limits) |
53
+ | [Beam](https://sandboxrouter.vercel.app/providers/beam) | $0.140 | $20/mo (credited) | not run yet | [pricing](https://www.beam.cloud/pricing) |
54
+ | [CodeSandbox SDK (Together)](https://sandboxrouter.vercel.app/providers/codesandbox) | $0.149 | none | not run yet | [pricing](https://docs.together.ai/docs/together-code-sandbox-legacy) |
55
+ | [Fly.io Sprites](https://sandboxrouter.vercel.app/providers/sprites) | up to $0.164 | none | passed (2026-11-11) | [pricing](https://fly.io/sprites) |
56
+ | [Blaxel](https://sandboxrouter.vercel.app/providers/blaxel) | $0.166 | none | passed (2026-11-11) | [pricing](https://blaxel.ai/pricing) |
57
+ | [HOPX](https://sandboxrouter.vercel.app/providers/hopx) | $0.166 | none | not run yet | [pricing](https://hopx.ai/pricing) |
58
+ | [Superserve](https://sandboxrouter.vercel.app/providers/superserve) | $0.166 | maybe $20/mo (credited) | passed (2026-11-11) | [pricing](https://superserve.ai/pricing) |
59
+ | [Tensorlake](https://sandboxrouter.vercel.app/providers/tensorlake) | up to $0.200 | none | not run yet | [pricing](https://www.tensorlake.ai/pricing) |
60
+ | [Upstash Box](https://sandboxrouter.vercel.app/providers/upstash) | up to $0.200 | none | not run yet | [pricing](https://upstash.com/pricing/box) |
61
+ | [Cloudflare Sandbox](https://sandboxrouter.vercel.app/providers/cloudflare) | up to $0.216 | $5/mo | passed (2026-11-11) | [pricing](https://developers.cloudflare.com/containers/platform/pricing/) |
62
+ | [Amazon Bedrock AgentCore Code Interpreter](https://sandboxrouter.vercel.app/providers/agentcore) | up to $0.217 | none | passed (2026-11-11) | [pricing](https://aws.amazon.com/bedrock/agentcore/pricing/) |
63
+ | [Modal](https://sandboxrouter.vercel.app/providers/modal) | up to $0.238 | none | passed (2026-11-11) | [pricing](https://modal.com/pricing) |
64
+ | [AWS Lambda MicroVMs](https://sandboxrouter.vercel.app/providers/lambda) | $0.252 | none | passed (2026-11-11) | [pricing](https://aws.amazon.com/lambda/pricing/) |
65
+ | [Deno Sandbox](https://sandboxrouter.vercel.app/providers/deno) | up to $0.300 | $20/mo | not run yet | [pricing](https://deno.com/sandbox) |
66
+ | [Runloop](https://sandboxrouter.vercel.app/providers/runloop) | $0.317 | none | not run yet | [pricing](https://www.runloop.ai/pricing) |
67
+ | [Vercel Sandbox](https://sandboxrouter.vercel.app/providers/vercel) | up to $0.341 | none | passed (2026-11-11) | [pricing](https://vercel.com/docs/vercel-sandbox/pricing) |
68
+ | [InstaBox (sign-up waitlisted)](https://sandboxrouter.vercel.app/providers/instabox) | $0.017 | none | not run yet | [pricing](https://instabox.sh/docs/pricing.md) |
69
+ | [Koyeb Sandboxes (not taking new accounts)](https://sandboxrouter.vercel.app/providers/koyeb) | $0.058 | $29/mo | not run yet | [pricing](https://www.koyeb.com/docs/reference/instances) |
70
+ | [Dedalus Machines (sign-up waitlisted)](https://sandboxrouter.vercel.app/providers/dedalus) | $0.149 | none | not run yet | [pricing](https://docs.dedaluslabs.ai/dcs/dm/pricing) |
71
+ | [LangSmith Sandboxes (sign-up waitlisted)](https://sandboxrouter.vercel.app/providers/langsmith) | $0.189 | none | not run yet | [pricing](https://www.langchain.com/pricing) |
72
+ | [OpenScale Sandboxes](https://sandboxrouter.vercel.app/providers/openscale) | skipped (default image is 2 vCPU / 1 GB; a bigger size needs image.openscale) | none | passed (2026-11-11) | [pricing](https://openscale.so/sandboxes) |
73
+ | [Azure Container Apps dynamic sessions](https://sandboxrouter.vercel.app/providers/azure) | skipped (max 1 vCPU) | none | not run yet | [pricing](https://learn.microsoft.com/en-us/azure/container-apps/billing#dynamic-sessions) |
74
+ | [Daytona](https://sandboxrouter.vercel.app/providers/daytona) | skipped (default image is 1 vCPU / 1 GB; a bigger size needs image.daytona) | none | passed (2026-11-11) | [pricing](https://www.daytona.io/pricing) |
75
+ | [Alibaba Cloud Agent Sandbox](https://sandboxrouter.vercel.app/providers/alibaba) | skipped (max 2 GB memory) | none | not run yet | [pricing](https://www.alibabacloud.com/help/en/agent-sandbox/product-overview/billing-overview) |
76
+ | [E2B](https://sandboxrouter.vercel.app/providers/e2b) | skipped (default image is 2 vCPU / 0.5 GB; a bigger size needs image.e2b) | none | passed (2026-11-11) | [pricing](https://e2b.dev/pricing) |
77
+ | [Docker (local)](https://sandboxrouter.vercel.app/providers/docker) | free | none | passed (2026-11-09) | [pricing](https://docs.docker.com/engine/) |
101
78
 
102
79
  Checked 2026-11-04 to 2026-11-06.
103
80
 
@@ -105,370 +82,13 @@ Checked 2026-11-04 to 2026-11-06.
105
82
 
106
83
  ```bash
107
84
  npm i @sandboxrouter/sdk
108
- # then the SDK of each provider you use (Agent37, Azure, AgentCore, Boat, Cloudflare, Dedalus, exe.dev, Freestyle, InstaBox, Koyeb,
109
- # Lambda, Maritime, Sail, Superserve, Upstash and Docker need none; the AWS ones need the signing packages below):
110
- npm i e2b # E2B (also Alibaba Cloud and OpenScale)
111
- npm i @daytonaio/sdk # Daytona
112
- npm i modal # Modal
113
- npm i @vercel/sandbox # Vercel Sandbox
114
- npm i morphcloud # Morph Cloud
115
- npm i @fly/sprites # Fly.io Sprites (its package asks for Node 24+)
116
- npm i @blaxel/core # Blaxel
117
- npm i @tensorlakeai/tensorlake # Tensorlake
118
- npm i @runloop/api-client # Runloop
119
- npm i @hopx-ai/sdk # HOPX
120
- npm i @northflank/js-client # Northflank
121
- npm i @beamcloud/beam-js # Beam
122
- npm i @codesandbox/sdk # CodeSandbox
123
- npm i @deno/sandbox # Deno Sandbox
124
- npm i novita-sandbox # Novita
125
- # Alibaba Cloud uses the e2b package
126
- npm i @smithy/signature-v4 @aws-crypto/sha256-js @aws-sdk/credential-provider-node # AgentCore, Lambda MicroVMs
127
- ```
128
-
129
- Cloudflare sandboxes only run inside a Cloudflare Worker, so you deploy a small bridge Worker to your own account first: see [`bridges/cloudflare`](bridges/cloudflare).
130
-
131
- Three providers need a one-time setup in your cloud account, described at the top of each adapter: Azure needs a Shell session pool ([`src/providers/azure.ts`](src/providers/azure.ts)), Lambda MicroVMs need an image built from the bundled server ([`src/providers/lambda.ts`](src/providers/lambda.ts), `writeLambdaMicrovmBundle()`), and AgentCore is opt-in: set `AGENTCORE_CODE_INTERPRETER_ID=aws.codeinterpreter.v1` so plain AWS credentials don't route work there by surprise.
132
-
133
- Set the keys for the providers you want. Providers without keys are skipped.
134
-
135
- | Provider | Env |
136
- |---|---|
137
- | Agent37 | `AGENT37_API_KEY` |
138
- | Alibaba Cloud Agent Sandbox | `ALIBABA_SANDBOX_API_KEY` |
139
- | Amazon Bedrock AgentCore Code Interpreter | `AGENTCORE_CODE_INTERPRETER_ID` + `AWS_REGION` + `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, or `AGENTCORE_CODE_INTERPRETER_ID` + `AWS_REGION` + `AWS_PROFILE` |
140
- | AWS Lambda MicroVMs | `AWS_REGION` + `LAMBDA_MICROVM_IMAGE` + `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, or `AWS_REGION` + `LAMBDA_MICROVM_IMAGE` + `AWS_PROFILE` |
141
- | Azure Container Apps dynamic sessions | `AZURE_SESSIONS_POOL_ENDPOINT` + `AZURE_SESSIONS_TOKEN`, or `AZURE_SESSIONS_POOL_ENDPOINT` + `AZURE_TENANT_ID` + `AZURE_CLIENT_ID` + `AZURE_CLIENT_SECRET` |
142
- | Beam | `BEAM_TOKEN` + `BEAM_WORKSPACE_ID` |
143
- | Blaxel | `BL_API_KEY` + `BL_WORKSPACE` |
144
- | Boat | `BOAT_API_KEY` |
145
- | Cloudflare Sandbox | `CLOUDFLARE_SANDBOX_URL` + `CLOUDFLARE_SANDBOX_TOKEN` |
146
- | CodeSandbox SDK (Together) | `CSB_API_KEY` |
147
- | Daytona | `DAYTONA_API_KEY` |
148
- | Dedalus Machines | `DEDALUS_API_KEY` |
149
- | Deno Sandbox | `DENO_DEPLOY_TOKEN` |
150
- | Docker (local) | none: Docker running locally |
151
- | E2B | `E2B_API_KEY` |
152
- | exe.dev | `EXE_TOKEN` |
153
- | Fly.io Sprites | `SPRITES_TOKEN` |
154
- | Freestyle | `FREESTYLE_API_KEY` |
155
- | HOPX | `HOPX_API_KEY` |
156
- | InstaBox | `INSTABOX_API_KEY` |
157
- | Koyeb Sandboxes | `KOYEB_API_TOKEN` |
158
- | LangSmith Sandboxes | `LANGSMITH_API_KEY` |
159
- | Maritime | `MARITIME_API_KEY` |
160
- | Modal | `MODAL_TOKEN_ID` + `MODAL_TOKEN_SECRET` |
161
- | Morph Cloud | `MORPH_API_KEY` |
162
- | Northflank | `NORTHFLANK_API_TOKEN` + `NORTHFLANK_PROJECT_ID` |
163
- | Novita AI Agent Sandbox | `NOVITA_API_KEY` |
164
- | OpenScale Sandboxes | `OPENSCALE_API_KEY` |
165
- | Runloop | `RUNLOOP_API_KEY` |
166
- | Sailboxes (Sail Research) | `SAIL_API_KEY` |
167
- | Superserve | `SUPERSERVE_API_KEY` |
168
- | Tensorlake | `TENSORLAKE_API_KEY` |
169
- | Upstash Box | `UPSTASH_BOX_API_KEY` |
170
- | Vercel Sandbox | `VERCEL_OIDC_TOKEN`, or `VERCEL_TOKEN` + `VERCEL_TEAM_ID` + `VERCEL_PROJECT_ID` |
171
-
172
- ## Library
173
-
174
- ```ts
175
- const router = new Router();
176
-
177
- // Cheapest provider that can do 8 vCPU / 16 GB, falling back on failure
178
- const a = await router.create({ vcpu: 8, memoryGb: 16 }, { strategy: "cheapest" });
179
-
180
- // GPU: only GPU-capable providers are tried (Modal today)
181
- const b = await router.create({ gpu: "A10G", image: { modal: "pytorch/pytorch:latest" } });
182
-
183
- // Pin providers in order and turn fallback off
184
- const c = await router.create({}, { provider: ["e2b", "daytona"], fallback: false });
185
-
186
- // Fallback moves on when a provider is down: a timeout, a network error, 429 or 5xx, and a create
187
- // that takes longer than createTimeoutSeconds (default 120; a sandbox that turns up later is
188
- // killed, or left in the ledger for `gc`), and when an account can't pay (402: no balance, plan
189
- // needed). A setup error (400, 401, 403, 404, 422: a bad key, a bad image or request) stops instead,
190
- // so a mistake isn't hidden by a pricier provider. Every failed attempt is on sbx.attempts.
191
- // fallback: "any" falls back on every error.
192
- const e = await router.create({}, { fallback: "any", createTimeoutSeconds: 300 });
193
-
194
- // Per-provider images: each provider names its templates differently
195
- const d = await router.create({ image: { e2b: "code-interpreter-v1", modal: "python:3.13-slim" } });
196
-
197
- // Files
198
- await a.writeFile("/tmp/data.csv", "x,y\n1,2\n");
199
- console.log(await a.readText("/tmp/data.csv"));
200
-
201
- // Stream output as it happens (the full output is still returned)
202
- await a.exec("npm test", { onStdout: (c) => process.stdout.write(c), onStderr: (c) => process.stderr.write(c) });
203
-
204
- // Pause keeps the disk (and memory, where the provider snapshots it); router.get() resumes
205
- const p = await router.create({}, { require: ["pause"] });
206
- await p.pause();
207
-
208
- // Ids are portable across processes: "provider:nativeId"
209
- const again = await router.get(a.id);
210
-
211
- // Dry run: who would be tried, in what order, and why anything is skipped
212
- console.table(router.plan({ vcpu: 32 }));
213
-
214
- await a.kill();
215
- ```
216
-
217
- `create` throws a `RouterError` whose `attempts` lists every provider it tried and why each failed.
218
-
219
- ## Computers (desktops and phones)
220
-
221
- For computer-use agents: a machine with a screen that your model drives with clicks and keys. `router.computer({ os })` starts one on the cheapest provider for that OS among those you have keys for, ties alphabetical, with fallback. Actions use the Anthropic computer-use shape on every provider.
222
-
223
- | Provider | Linux | Windows | Android | iOS | Default size | Live view |
224
- |---|---|---|---|---|---|---|
225
- | AWS WorkSpaces (agent access) | $0.138 | $0.150 | | | 2 vCPU · 4 GB | watch only |
226
- | Daytona | $0.067 | | | | 1 vCPU · 1 GB | watch/control link |
227
- | E2B Desktop | $0.533 | | | | 8 vCPU · 8 GB | watch/control link |
228
- | Limrun | | | $3.00 | $6.00 | phone emulator / iPhone simulator | interactive link |
229
- | Maritime | $0.120 | $0.180 | $0.150 | | 2 vCPU · 4 GB | view-only and takeover links |
230
- | Mobilerun | | | $1.80 | | cloud phone | embedded player |
231
- | Orgo | $0.055 | plan | | | 2 vCPU · 8 GB | VNC (full control) |
232
-
233
- Per hour while awake, from each provider's pricing page (sources in [`src/computers.ts`](src/computers.ts)). Sizes differ, so compare price and size together. Only Maritime and AWS enforce view-only on the server; on the others a "watch" link can be turned into control, so treat it like a password. Mobilerun and AWS have no shell; Limrun's iOS has no shell. AWS needs a fleet and stack you provision once (steps at the top of [`src/providers/workspaces.ts`](src/providers/workspaces.ts)).
234
-
235
- ```ts
236
- const desk = await router.computer({ os: "linux", externalUserId: "user_42" }); // same id, same desktop
237
- const shot = await desk.act({ action: "screenshot" }); // { frameId, width, height, imageB64 }
238
- await desk.act({ action: "left_click", coordinate: [412, 230] });
239
- await desk.actBatch([{ action: "type", text: "hello" }, { action: "key", text: "Return" }]);
240
- await desk.exec("ls /data");
241
-
242
- // Hit a login or CAPTCHA? Hand the desktop to a person, then carry on.
243
- const { url } = await desk.viewer("control", { reason: "Please sign in" });
244
- ```
245
-
246
- ```bash
247
- npx @sandboxrouter/sdk desktop --os linux --user user_42 --control # prints a takeover link
248
- npx @sandboxrouter/sdk screenshot <provider>:<id> --out screen.png
249
- ```
250
-
251
- ## CLI
252
-
253
- ```bash
254
- npx @sandboxrouter/sdk providers # price table + which keys are set
255
- npx @sandboxrouter/sdk route --gpu T4 # dry run
256
- npx @sandboxrouter/sdk run "uname -a && nproc" # start, run, print, kill
257
- npx @sandboxrouter/sdk run "pytest -q" --provider e2b,daytona --keep
258
- npx @sandboxrouter/sdk bench --runs 5 # cold start + exec latency table
259
- npx @sandboxrouter/sdk bench --share --label "us-east-1" # also write a report for results/
260
- npx @sandboxrouter/sdk leaderboard results --out leaderboard.html
261
- npx @sandboxrouter/sdk serve --port 8787 # HTTP API
262
- npx @sandboxrouter/sdk ls # sandboxes started here that were never killed
263
- npx @sandboxrouter/sdk gc # kill the ones past their lifetime (--all: every one)
264
- ```
265
-
266
- ### Cleaning up leaks
267
-
268
- If a script crashes before `kill()`, its sandbox keeps billing. Every router keeps a ledger of the sandboxes it starts in `~/.sandboxrouter/sandboxes.jsonl` (set `SANDBOXROUTER_HOME` to move it, `SANDBOXROUTER_LEDGER=off` or `new Router({ ledger: false })` to turn it off), and `kill()` closes the entry.
269
-
270
- ```bash
271
- sandboxrouter ls # id, age, lifetime left, cost so far
272
- sandboxrouter gc --dry-run # what would be killed
273
- sandboxrouter gc # kill sandboxes past their requested lifetime
274
- sandboxrouter gc --all # kill every open one (end of a CI job)
275
- sandboxrouter gc --older-than 60 # kill those up for an hour or more
276
- ```
277
-
278
- A sandbox the provider already stopped is just dropped from the ledger. `sandboxrouter run` kills its sandbox on Ctrl-C. The ledger only knows sandboxes started on this machine (or wherever `SANDBOXROUTER_HOME` points), so run `gc --all` at the end of CI jobs. Every adapter hands `timeoutMinutes` to the provider, which stops, deletes or pauses the sandbox when it runs out (the table under "How each adapter maps the spec" says which), except Fly.io Sprites, which has none (an idle sprite stops billing CPU but keeps its storage), and exe.dev, where the VM powers itself off when the lifetime runs out (best effort; a stopped VM bills disk until it's deleted).
279
-
280
- ### Bench
281
-
282
- `bench` starts real sandboxes on every configured provider, measures time to a usable sandbox and the round trip of `echo ok`, kills them, and prints a markdown leaderboard. Results are saved to `~/.sandboxrouter/bench.json`, which is what `strategy: "fastest"` routes on. Latency is measured from wherever you run it, so network distance counts.
283
-
284
- `--share` writes a JSON report (timings, your label, Node version and platform; never keys, env or error text), and `--by` adds your GitHub username so the website can credit you. Open a PR adding it to [`results/`](results/); CI checks every result file for keys, addresses and impossible numbers (`npm run results:check`), see [Sending results](CONTRIBUTING.md#sending-results). `sandboxrouter leaderboard` builds one static HTML page from every report there, taking the median of each submission's medians so one submitter can't dominate. Host the page anywhere static files go.
285
-
286
- ### Real cost
287
-
288
- Prices in the catalog are list prices. `cost` checks them against real bills: it starts one sandbox per provider at a known size, records the size the sandbox really has (`nproc` and `MemTotal`), keeps every core busy for a fixed time (some providers bill active CPU only), kills it, and predicts the cost from list price × wall time. `cost settle` then reads what the provider charged for that sandbox, from Daytona's usage analytics, Blaxel's metrics API, Maritime's metered usage and Sail's spend API. E2B and OpenScale have no billing API, so their bill is read from the dashboard. Bills post late on some providers (Daytona can take up to 48 h), so rerun `settle` until every row has one.
289
-
290
- ```bash
291
- sandboxrouter cost run --minutes 10 # every configured cloud provider, 2 vCPU / 4 GB
292
- sandboxrouter cost settle results/cost/cost-2026-11-06-16-58.json
293
- ```
294
-
295
- ### Compatibility
296
-
297
- `check` runs the same 14 steps against a real account: create; stdout, stderr and exit code; env and cwd; UTF-8 output; live streaming; a binary file round-trip; a 1 MB file; reading a missing file is an error; files written by `writeFile` are visible to commands and the other way round; a command timeout rejects with the contract's error; the timed-out command was really stopped; pause and resume; kill; and the killed sandbox is really gone.
298
-
299
- ```bash
300
- sandboxrouter check --provider koyeb # one provider
301
- sandboxrouter check --all --save # every configured provider; writes results/conformance/<id>.json
302
- ```
303
-
304
- It prints one line per step and exits 1 if any fails. `checkProvider(router, id)` does the same from code. Saved runs make this table (`node --import tsx scripts/readme-tables.ts --write`), and a nightly workflow re-runs it with the repo's provider keys, committing only when a result changes (so the date is when the current result was first seen). Every adapter also has mock-API tests in `npm test`; this table is only real runs.
305
-
306
- | Provider | Real-account check (14 steps) | Result since |
307
- |---|---|---|
308
- | Agent37 | not run yet | |
309
- | Boat | not run yet | |
310
- | Maritime | 14/14 passed | 2026-11-07, v0.3.2 |
311
- | Sailboxes (Sail Research) | 14/14 passed | 2026-11-07, v0.3.2 |
312
- | Northflank | not run yet | |
313
- | Morph Cloud | not run yet | |
314
- | exe.dev | not run yet | |
315
- | Novita AI Agent Sandbox | not run yet | |
316
- | Freestyle | not run yet | |
317
- | Beam | not run yet | |
318
- | CodeSandbox SDK (Together) | not run yet | |
319
- | Fly.io Sprites | not run yet | |
320
- | Blaxel | 13/13 passed; n/a: pause and resume | 2026-11-07, v0.3.2 |
321
- | HOPX | not run yet | |
322
- | Superserve | not run yet | |
323
- | Tensorlake | not run yet | |
324
- | Upstash Box | not run yet | |
325
- | Cloudflare Sandbox | not run yet | |
326
- | Amazon Bedrock AgentCore Code Interpreter | not run yet | |
327
- | Modal | not run yet | |
328
- | AWS Lambda MicroVMs | not run yet | |
329
- | Deno Sandbox | not run yet | |
330
- | Runloop | not run yet | |
331
- | Vercel Sandbox | not run yet | |
332
- | InstaBox | not run yet | |
333
- | Koyeb Sandboxes | not run yet | |
334
- | Dedalus Machines | not run yet | |
335
- | LangSmith Sandboxes | not run yet | |
336
- | OpenScale Sandboxes | 14/14 passed | 2026-11-07, v0.3.2 |
337
- | Azure Container Apps dynamic sessions | not run yet | |
338
- | Daytona | 14/14 passed | 2026-11-07, v0.3.2 |
339
- | Alibaba Cloud Agent Sandbox | not run yet | |
340
- | E2B | 14/14 passed | 2026-11-07, v0.3.2 |
341
- | Docker (local) | 14/14 passed | 2026-11-07, v0.3.2 |
342
-
343
- ## HTTP API
344
-
345
- ```bash
346
- SANDBOXROUTER_TOKEN=secret npx @sandboxrouter/sdk serve
347
- ```
348
-
349
- | Method | Path | Body |
350
- |---|---|---|
351
- | `GET` | `/v1/providers` | |
352
- | `POST` | `/v1/route` | same as create; returns the candidate order |
353
- | `POST` | `/v1/sandboxes` | `{ vcpu, memoryGb, gpu, env, timeoutMinutes, image, metadata, provider, strategy, fallback, createTimeoutSeconds, require }` |
354
- | `POST` | `/v1/sandboxes/:id/exec` | `{ cmd, cwd, env, timeoutSeconds, stream }`. With `stream: true` the answer is `text/event-stream`: `stdout` and `stderr` events, then `result` |
355
- | `POST` | `/v1/sandboxes/:id/pause` | |
356
- | `PUT` | `/v1/sandboxes/:id/files?path=` | raw bytes |
357
- | `GET` | `/v1/sandboxes/:id/files?path=` | |
358
- | `DELETE` | `/v1/sandboxes/:id` | |
359
- | `POST` | `/v1/computers` | `{ os, externalUserId, name, screen, arch, provider }` |
360
- | `POST` | `/v1/computers/:id/actions` | one action, or `{ actions: [...] }` (up to 50) |
361
- | `GET` | `/v1/computers/:id/screenshot` | image bytes (`?format=jpeg&quality=80`) |
362
- | `POST` | `/v1/computers/:id/exec` | `{ command, timeoutSeconds }` (max 30 s) |
363
- | `PUT` / `GET` | `/v1/computers/:id/files?path=` | raw bytes |
364
- | `POST` | `/v1/computers/:id/viewer` | `{ mode: "watch" \| "control", ttlSeconds, reason }` |
365
- | `POST` | `/v1/computers/:id/sleep` | |
366
- | `DELETE` | `/v1/computers/:id` | |
367
-
368
- ```bash
369
- curl -s localhost:8787/v1/sandboxes -H "Authorization: Bearer secret" \
370
- -d '{"vcpu":2,"strategy":"cheapest"}'
371
- # {"id":"e2b:iz5sb5a4bt3pmjx7c5ms2","provider":"e2b","estimatedHourlyUsd":0.1656,"attempts":[...]}
372
- ```
373
-
374
- Provider keys stay on the server. Clients only hold `SANDBOXROUTER_TOKEN`. It binds to `127.0.0.1` by default. Without a token it only starts on a loopback address with CORS off: `--cors` (any browser page could otherwise start sandboxes on your keys) and a public `--host` both need `SANDBOXROUTER_TOKEN`.
375
-
376
- ### Python
377
-
378
- A standard-library client for the HTTP API lives in [`python/`](python/):
379
-
380
- ```python
381
- from sandboxrouter import Client
382
-
383
- sr = Client("http://127.0.0.1:8787", token="secret")
384
- with sr.create(strategy="cheapest") as sbx:
385
- sbx.exec("pip install rich && python -c 'import rich'", on_stdout=lambda c: print(c, end=""))
386
- ```
387
-
388
- ## How each adapter maps the spec
389
-
390
- | | vCPU / memory | Lifetime | Image | Pause | Notes |
391
- |---|---|---|---|---|---|
392
- | Maritime | `vcpu`, `memoryMib` | `timeLimitMinutes` (5 to 1,440) | `from` | yes | Plain REST, no SDK. Streams over SSE. Any data-plane call resumes a paused sandbox. |
393
- | E2B | set by the template | `timeoutMs` | template | yes (memory + disk) | Nonzero exits are returned as results, not thrown. |
394
- | Daytona | only with `image.daytona` | `autoStopInterval` | `image` | yes (stop/start, disk only) | Non-streaming exec merges stdout and stderr; streaming uses a session and keeps them apart. |
395
- | Modal | `cpu`, `memoryMiB`, `gpu` | `timeoutMs` | registry tag | no | Uses Modal app `sandboxrouter` (override with `SANDBOXROUTER_MODAL_APP`). |
396
- | Vercel | `vcpus` (2 GB each) | `timeout` | `runtime` | no | Max 8 vCPU. |
397
- | Morph | via a cached base snapshot per shape | `ttlSeconds` | snapshot id | yes (memory + disk) | First create of a new shape builds a snapshot. Files over SSH. |
398
- | Fly.io Sprites | `cpus`, `ramMB` (may be ignored) | none: `kill()` or `gc` deletes | no | no | Sprites idle for free on their own. |
399
- | Blaxel | memory (CPU follows) | `ttl` | image | no (archiving is a per-workspace preview) | Idle sandboxes go to free standby on their own. |
400
- | Tensorlake | `cpus`, `memoryMb` | idle timeout | image | yes (memory + disk) | Output is line-based. |
401
- | Runloop | snapped to Runloop's custom sizes | `keep_alive_time_seconds` (max 48 h) | blueprint | yes (Pro plan) | Commands start in the home directory. |
402
- | HOPX | set by the template | timeout | template | yes (memory + disk) | Size requests aren't applied, so the router only sends default-size work. |
403
- | Northflank | cheapest `nf-compute` plan that fits | `expiryTime` (5 min to 7 days) | any public image | no | Runs as a deployment service; files move as base64 over exec. |
404
- | Cloudflare | smallest instance type that fits | alarm in the bridge Worker | Dockerfile in the bridge | no | Through the bridge Worker you deploy ([`bridges/cloudflare`](bridges/cloudflare)). |
405
- | Boat | smallest of 4 fixed sizes that fits | auto-stop timer | saved snapshot | yes (stop: disk kept, processes end) | Plain REST. Commands that wait are capped at 600 s; files API up to 5 MiB. |
406
- | exe.dev | `--cpu`, `--memory` (2 GiB per vCPU max) | the VM powers itself off (best effort); `kill()` or `gc` deletes | `--image` | no | Plain REST over exe.dev's `/exec`; long commands run detached and are polled. |
407
- | Agent37 | smallest of 4 fixed shapes that fits (max 4 vCPU) | auto-sleep after idle (5 min to 24 h) | template (`agent37-base` default) | yes (sleep: memory + disk) | Plain REST; no streaming; files move as base64 over exec in chunks. |
408
- | Alibaba Cloud | set by the template | `timeoutMs` (max 24 h) | template | no (allowlist only) | E2B-compatible API via the `e2b` SDK; region from `ALIBABA_SANDBOX_REGION` (default ap-southeast-1). |
409
- | AgentCore | fixed 2 vCPU / 8 GB | `sessionTimeoutSeconds` (max 8 h) | no | no | SigV4, plain fetch; files move as base64 over commands. Opt-in. |
410
- | Azure sessions | fixed by the pool | pool cooldown (5 to 60 min idle) | no | no | Shell session pool; output over 4 KB is fetched from files. |
411
- | Beam | `cpu`, `memory` | `keepWarmSeconds` | registry image | no | Uses Beam app `sandboxrouter` (override with `SANDBOXROUTER_BEAM_APP`). |
412
- | CodeSandbox | smallest of 7 fixed tiers that fits | hibernation timeout | template | yes (hibernate: memory + disk) | Exec output goes through files because the SDK's terminal merges streams. |
413
- | Dedalus Machines | `vcpu`, `memory_mib` | autosleep after idle (compute stops, disk kept) | no | yes (sleep/wake) | Plain REST; streams by polling the events feed; files move as base64 over stdin/stdout. Private beta. |
414
- | Deno | fixed 2 vCPU, 0.75 to 4 GB | up to 30 min | snapshot or volume | no | WebSocket RPC via `@deno/sandbox`. |
415
- | Freestyle | smallest Ubuntu snapshot that fits | `ttlSeconds` | snapshot | yes (memory + disk) | Plain REST; long commands run as background requests and are polled. |
416
- | InstaBox | smallest fixed size that fits (2/4, 4/8, 8/16; free plan falls back to 4/8) | `deleteAfterSeconds` (60 s to 24 h) | template or snapshot (`sn_...`) | yes (suspend: memory + disk) | Plain REST; exec via `bash -lc`, max 600 s, SSE streaming; files API raw bytes. Pauses itself after 30 idle min. |
417
- | Koyeb | smallest Standard instance that fits | auto-delete delay (max 24 h) | any Docker image | no | Plain REST; streams over SSE. Public preview. |
418
- | Lambda MicroVMs | image baseline (2 GB per vCPU) | `maximumDurationInSeconds` | your MicroVM image | yes (suspend/resume) | Runs the bundled in-VM server for exec and files. |
419
- | Novita | set by the template | `timeoutMs` | template | yes (memory + disk) | `novita-sandbox` SDK (an E2B fork). |
420
- | Sail | `vcpu_count`; memory is a limit of at least 16 GiB | `max_lifetime_seconds` (counts paused time) | `debian` (default) or `devbox` base | yes (memory + disk) | Plain REST, no SDK. Streams NDJSON. Billed on what the box uses, not the limits. A paused box resumes on the next call. |
421
- | Upstash Box | smallest of 3 fixed sizes that fits | TTL (max 3 days) | runtime name (node, python, ...) | no | Plain REST; billed on active CPU only. |
422
- | Docker (local) | `--cpus`, `--memory` | container exits at the lifetime | any image | yes (`docker pause`) | Your machine, shared kernel. Never auto-routed; use `{ provider: "docker" }`. |
423
-
424
- Capabilities in the catalog describe what each **adapter** implements, not everything a provider sells. Size limits are self-serve defaults and may be higher on your plan.
425
-
426
- ## Roadmap
427
-
428
- - [x] More providers: Morph, Fly.io Sprites, Blaxel, Tensorlake, Runloop, HOPX, Northflank, Boat, exe.dev, Cloudflare (via a bridge Worker), Docker (local)
429
- - [x] More providers: Koyeb, Freestyle, Deno, Beam, CodeSandbox, Upstash Box, Novita, Alibaba Cloud, Azure Container Apps sessions, AWS Bedrock AgentCore, AWS Lambda MicroVMs
430
- - [x] YC sandbox startups: Agent37 (F26), Dedalus Machines (S25), InstaBox (P26), OpenScale (S22), Superserve (F26)
431
- - [x] Sail Research Sailboxes
432
- - [ ] More E2B-compatible clouds (PPIO, UCloud, Baidu) and Google Agent Engine sandboxes
433
- - [x] Neutral routing: price decides, ties alphabetical, no privileged slot
434
- - [x] Desktops and phones from 7 providers (Linux, Windows, Android, iOS), routed by price per OS
435
- - [ ] Windows 365 for Agents and Corellium as opt-in computer providers
436
- - [x] Streaming exec output
437
- - [x] Pause/resume where providers support it
438
- - [x] Python client
439
- - [x] Leaderboard built from `bench --share` reports
440
- - [x] Leak cleanup: a local ledger, `ls` and `gc`
441
- - [x] One 14-step real-account check for every adapter, with a compatibility table and a nightly run
442
- - [ ] Every adapter run against a real account (see the Compatibility table)
443
- - [ ] Snapshots and forks as a routed operation
444
- - [ ] A hosted copy of the leaderboard page
445
-
446
- ## Website
447
-
448
- [`web/`](web/) is the project site: home, a browsable Sandboxes list with live price-per-size, a page per provider, Rankings, Docs, and a Playground that drives your own `sandboxrouter serve` from the browser. Its data is generated from the library (`npm run site:data`), so prices never drift from the code.
449
-
450
- ```bash
451
- cd web && npm i && npm run dev # http://localhost:3000
452
- # Playground without any provider keys (in-memory providers, nothing real starts):
453
- node --import tsx test/demo-server.ts # token: demo
454
- # Playground against real providers:
455
- SANDBOXROUTER_TOKEN=secret npx @sandboxrouter/sdk serve --cors http://localhost:3000
456
- ```
457
-
458
- ## Development
459
-
460
- ```bash
461
- npm i
462
- npm test # router, HTTP server, and every adapter against a local mock of its API
463
- npm run test:py # Python client against the real HTTP server
464
- npm run build
465
- npm run dev -- providers
466
- npm run price:check # compare every provider's pricing page with the last check
467
- node --import tsx scripts/readme-tables.ts --write # regenerate the README's Prices, Env and Compatibility tables
468
85
  ```
469
86
 
470
- Prices are list prices copied from each provider's public pricing page, with the date they were checked. A GitHub workflow runs `price:check` every Monday and opens an issue when a pricing page changes or a price is more than 45 days old; a person then updates [`src/catalog.ts`](src/catalog.ts).
87
+ Then the SDK of each provider you use (many need none) and its keys: both are listed in [the reference](docs/reference.md#install). `npx @sandboxrouter/sdk providers` shows which keys are set.
471
88
 
472
- See [CONTRIBUTING.md](CONTRIBUTING.md) to test a provider, fix a price or add one, [SECURITY.md](SECURITY.md) to report a vulnerability, and [CHANGELOG.md](CHANGELOG.md) for releases.
89
+ ## More
473
90
 
474
- [MIT](LICENSE)
91
+ - [Docs](https://sandboxrouter.vercel.app/docs): routing, fallback, streaming, files, pause, the HTTP server and Python.
92
+ - [Reference](docs/reference.md): the full library, CLI and HTTP API, desktops and phones, the real-account compatibility table, and how each adapter maps the spec.
93
+ - [CONTRIBUTING.md](CONTRIBUTING.md): run a provider for real and send the result, fix a price, or add a provider.
94
+ - [CHANGELOG.md](CHANGELOG.md) · [SECURITY.md](SECURITY.md) · [MIT](LICENSE)
package/dist/cli.js CHANGED
@@ -39,7 +39,7 @@ Usage:
39
39
  sandboxrouter serve [--port 8787] [--host 127.0.0.1] [--cors https://site.example,http://localhost:3000]
40
40
 
41
41
  Spec flags: --vcpu N --memory GB --gpu T4 --timeout MIN
42
- Route flags: --provider e2b[,modal,...] --strategy cheapest|fastest
42
+ Route flags: --provider e2b[,modal,...] --strategy verified|cheapest|fastest (default verified: tested providers first)
43
43
  --no-fallback --fallback-any (also on setup errors like a bad key)
44
44
  --create-timeout SEC (per provider, default 120) --require gpu,custom-image
45
45
 
@@ -156,7 +156,8 @@ async function main() {
156
156
  let n = 0;
157
157
  for (const c of plan) {
158
158
  const mark = c.skip ? " -" : `${++n}.`.padStart(3);
159
- console.log(`${mark} ${c.provider.padEnd(11)} $${c.estimatedHourlyUsd.toFixed(4)}/hr${c.skip ? ` (skipped: ${c.skip})` : ""}`);
159
+ const tested = c.verified ? "tested " : " ";
160
+ console.log(`${mark} ${c.provider.padEnd(11)} $${c.estimatedHourlyUsd.toFixed(4)}/hr ${tested}${c.skip ? `(skipped: ${c.skip})` : ""}`.trimEnd());
160
161
  }
161
162
  return;
162
163
  }