@sandboxrouter/sdk 0.2.0 → 0.3.1

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.
Files changed (91) hide show
  1. package/README.md +229 -50
  2. package/dist/bench.js +4 -4
  3. package/dist/catalog.d.ts +159 -0
  4. package/dist/catalog.js +450 -15
  5. package/dist/check.d.ts +28 -0
  6. package/dist/check.js +185 -0
  7. package/dist/cli.js +171 -12
  8. package/dist/computers.d.ts +55 -13
  9. package/dist/computers.js +132 -6
  10. package/dist/conformance.d.ts +46 -0
  11. package/dist/conformance.js +65 -0
  12. package/dist/cost.d.ts +67 -0
  13. package/dist/cost.js +153 -0
  14. package/dist/gc.d.ts +29 -0
  15. package/dist/gc.js +54 -0
  16. package/dist/index.d.ts +28 -2
  17. package/dist/index.js +28 -2
  18. package/dist/leaderboard.d.ts +6 -0
  19. package/dist/leaderboard.js +5 -4
  20. package/dist/ledger.d.ts +38 -0
  21. package/dist/ledger.js +89 -0
  22. package/dist/providers/agent37.d.ts +40 -0
  23. package/dist/providers/agent37.js +224 -0
  24. package/dist/providers/agentcore.d.ts +71 -0
  25. package/dist/providers/agentcore.js +446 -0
  26. package/dist/providers/alibaba.d.ts +18 -0
  27. package/dist/providers/alibaba.js +106 -0
  28. package/dist/providers/azure.d.ts +43 -0
  29. package/dist/providers/azure.js +330 -0
  30. package/dist/providers/beam.d.ts +11 -0
  31. package/dist/providers/beam.js +179 -0
  32. package/dist/providers/blaxel.d.ts +3 -1
  33. package/dist/providers/blaxel.js +32 -22
  34. package/dist/providers/boat.js +8 -3
  35. package/dist/providers/cloudflare.js +8 -3
  36. package/dist/providers/codesandbox.d.ts +59 -0
  37. package/dist/providers/codesandbox.js +287 -0
  38. package/dist/providers/daytona.d.ts +25 -4
  39. package/dist/providers/daytona.js +449 -28
  40. package/dist/providers/dedalus.d.ts +12 -0
  41. package/dist/providers/dedalus.js +244 -0
  42. package/dist/providers/deno.d.ts +50 -0
  43. package/dist/providers/deno.js +170 -0
  44. package/dist/providers/docker.js +11 -5
  45. package/dist/providers/e2b.d.ts +70 -3
  46. package/dist/providers/e2b.js +376 -8
  47. package/dist/providers/exedev.js +17 -5
  48. package/dist/providers/freestyle.d.ts +49 -0
  49. package/dist/providers/freestyle.js +261 -0
  50. package/dist/providers/hopx.js +27 -18
  51. package/dist/providers/instabox.d.ts +76 -0
  52. package/dist/providers/instabox.js +360 -0
  53. package/dist/providers/koyeb.d.ts +71 -0
  54. package/dist/providers/koyeb.js +379 -0
  55. package/dist/providers/lambda.d.ts +51 -0
  56. package/dist/providers/lambda.js +467 -0
  57. package/dist/providers/langsmith.d.ts +16 -0
  58. package/dist/providers/langsmith.js +149 -0
  59. package/dist/providers/limrun.d.ts +77 -0
  60. package/dist/providers/limrun.js +626 -0
  61. package/dist/providers/maritime.d.ts +5 -1
  62. package/dist/providers/maritime.js +39 -8
  63. package/dist/providers/mobilerun.d.ts +44 -0
  64. package/dist/providers/mobilerun.js +417 -0
  65. package/dist/providers/modal.js +12 -4
  66. package/dist/providers/morph.js +12 -4
  67. package/dist/providers/northflank.js +11 -13
  68. package/dist/providers/novita.d.ts +12 -0
  69. package/dist/providers/novita.js +81 -0
  70. package/dist/providers/openscale.d.ts +17 -0
  71. package/dist/providers/openscale.js +87 -0
  72. package/dist/providers/orgo.d.ts +45 -0
  73. package/dist/providers/orgo.js +414 -0
  74. package/dist/providers/sail.d.ts +32 -0
  75. package/dist/providers/sail.js +372 -0
  76. package/dist/providers/superserve.d.ts +25 -0
  77. package/dist/providers/superserve.js +337 -0
  78. package/dist/providers/tensorlake.js +17 -14
  79. package/dist/providers/upstash.d.ts +30 -0
  80. package/dist/providers/upstash.js +258 -0
  81. package/dist/providers/vercel.js +14 -3
  82. package/dist/providers/workspaces.d.ts +60 -0
  83. package/dist/providers/workspaces.js +662 -0
  84. package/dist/router.d.ts +41 -5
  85. package/dist/router.js +179 -23
  86. package/dist/server.d.ts +1 -1
  87. package/dist/server.js +22 -3
  88. package/dist/types.d.ts +13 -5
  89. package/dist/util.d.ts +28 -1
  90. package/dist/util.js +56 -7
  91. package/package.json +81 -5
package/README.md CHANGED
@@ -1,18 +1,27 @@
1
1
  # sandboxrouter
2
2
 
3
- **One API for every sandbox.** A free, open-source router for the places an AI agent can run code: Blaxel, Boat, Cloudflare, Daytona, E2B, exe.dev, Fly.io Sprites, HOPX, Maritime, Modal, Morph, Northflank, Runloop, Tensorlake 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.
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
+
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.
4
6
 
5
7
  ```ts
6
8
  import { Router } from "@sandboxrouter/sdk";
7
9
 
8
10
  const router = new Router(); // uses whichever provider keys you've set
9
- await using sbx = await router.create({ vcpu: 2, memoryGb: 4 });
10
-
11
- const r = await sbx.exec("python3 -c 'print(6*7)'");
12
- console.log(r.stdout, "ran on", sbx.provider);
11
+ const sbx = await router.create(); // or create({ vcpu: 2, memoryGb: 4 }) for a size
12
+ try {
13
+ const r = await sbx.exec("python3 -c 'print(6*7)'");
14
+ console.log(r.stdout, "ran on", sbx.provider);
15
+ } finally {
16
+ await sbx.kill();
17
+ }
13
18
  ```
14
19
 
15
- Change providers without changing code. If one returns a 429, the next one takes the sandbox.
20
+ Runs as plain JavaScript on Node 20+. (In TypeScript 5.2+, or Node 24+, `await using sbx = ...` kills the sandbox for you.)
21
+
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.
16
25
 
17
26
  Site: [sandboxrouter.vercel.app](https://sandboxrouter.vercel.app) · npm: [`@sandboxrouter/sdk`](https://www.npmjs.com/package/@sandboxrouter/sdk)
18
27
 
@@ -28,7 +37,7 @@ So every agent team either locks into one provider or writes its own adapter lay
28
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.
29
38
  - **Your keys.** Your accounts, your bills. Nothing is proxied through a third party.
30
39
  - **HTTP server and Python client.** Run `sandboxrouter serve` and any language gets the same API.
31
- - **Computers.** Desktops and phones for computer-use models (Maritime today): actions, screenshots, and a takeover link for a person when the model hits a login.
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.
32
41
  - **Open benchmark.** `bench --share` produces a report; cold starts on the site come from reports submitted to [`results/`](results/).
33
42
 
34
43
  ## Fair by construction
@@ -44,35 +53,61 @@ If a price is wrong, open a PR with the source link.
44
53
 
45
54
  ## Prices
46
55
 
47
- Estimated list price while running, 2 vCPU / 4 GB (`npx @sandboxrouter/sdk providers --vcpu 2 --memory 4`), in the order the router would try them:
48
-
49
- | Provider | $/hr | Notes | Source |
50
- |---|---|---|---|
51
- | Boat | $0.018 | 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) |
52
- | Maritime | $0.022 | Per second, disk included | [pricing](https://maritime.sh/pricing) |
53
- | Northflank | $0.067 | Per second on Northflank Cloud, ephemeral disk included; sandboxes run as deployment services (microVMs) | [pricing](https://northflank.com/pricing) |
54
- | Morph Cloud | $0.100 | $0.05/MCU; MCU-hours = max(vCPU, RAM/4 GB, disk/16 GB); snapshots extra | [pricing](https://cloud.morph.so/web/pricing) |
55
- | exe.dev | $0.105 | $0.105/h per 2 vCPU + 4 GiB, per second, up to 2 GiB per vCPU; needs an exe.dev subscription | [pricing](https://exe.dev/docs/standalone-vms.md) |
56
- | Fly.io Sprites | $0.164 | Bills actual CPU and memory use; this is the full-use price; storage extra | [pricing](https://fly.io/sprites) |
57
- | Blaxel | $0.166 | Billed on memory only ($0.0000115/GB-s), CPU scales with memory (~2 GB per core) | [pricing](https://blaxel.ai/pricing) |
58
- | Daytona | $0.166 | Per second, plus disk above 5 GiB | [pricing](https://www.daytona.io/pricing) |
59
- | E2B | $0.166 | Per second; Pro plan $150/mo | [pricing](https://e2b.dev/pricing) |
60
- | HOPX | $0.166 | Per second, plus storage; size comes from the template, not the request | [pricing](https://hopx.ai/pricing) |
61
- | Tensorlake | $0.200 | Bills active CPU (floor 20% of allocation); this is the full-use price; Pro plan is lower | [pricing](https://www.tensorlake.ai/pricing) |
62
- | Cloudflare Sandbox | $0.216 | Bills active CPU and provisioned memory of the instance type; this is the full-CPU price; needs Workers Paid ($5/mo) and the bridge Worker in bridges/cloudflare | [pricing](https://developers.cloudflare.com/containers/platform/pricing/) |
63
- | Modal | $0.239 | Sandbox rates, GPUs extra; region pinning x1.15-1.75 | [pricing](https://modal.com/pricing) |
64
- | Runloop | $0.317 | Per second, plus disk; pause (suspend) is a Pro-plan feature | [pricing](https://www.runloop.ai/pricing) |
65
- | Vercel Sandbox | $0.341 | Bills active CPU only; this is the 100%-CPU price, idle work costs less | [pricing](https://vercel.com/docs/vercel-sandbox/pricing) |
66
- | Docker (local) | free | Runs on your own machine; free, but shares your kernel, so weaker isolation than a cloud micro-VM | [pricing](https://docs.docker.com/engine/) |
67
-
68
- Checked 2026-11-04.
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-06) | 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-06) | 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-06) | 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
+ | LangSmith Sandboxes | $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) |
83
+ | 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) |
84
+ | 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) |
85
+ | 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/) |
86
+ | 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/) |
87
+ | 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) |
88
+ | 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/) |
89
+ | 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) |
90
+ | Runloop | $0.317 | none | not run yet | Per second, plus disk; pause (suspend) is a Pro-plan feature | [pricing](https://www.runloop.ai/pricing) |
91
+ | 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) |
92
+ | 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) |
93
+ | 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) |
94
+ | 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) |
95
+ | OpenScale Sandboxes | skipped (default image is 2 vCPU / 1 GB; a bigger size needs image.openscale) | none | passed (2026-11-06) | 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 | failed 1 step (2026-11-06) | 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-06) | 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-06) | Runs on your own machine; free, but shares your kernel, so weaker isolation than a cloud micro-VM | [pricing](https://docs.docker.com/engine/) |
101
+
102
+ Checked 2026-11-04 to 2026-11-06.
69
103
 
70
104
  ## Install
71
105
 
72
106
  ```bash
73
107
  npm i @sandboxrouter/sdk
74
- # then the SDK of each provider you use (Boat, Cloudflare, exe.dev, Maritime and Docker need none):
75
- npm i e2b # E2B
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)
76
111
  npm i @daytonaio/sdk # Daytona
77
112
  npm i modal # Modal
78
113
  npm i @vercel/sandbox # Vercel Sandbox
@@ -83,29 +118,55 @@ npm i @tensorlakeai/tensorlake # Tensorlake
83
118
  npm i @runloop/api-client # Runloop
84
119
  npm i @hopx-ai/sdk # HOPX
85
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
86
127
  ```
87
128
 
88
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).
89
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
+
90
133
  Set the keys for the providers you want. Providers without keys are skipped.
91
134
 
92
135
  | Provider | Env |
93
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` |
94
143
  | Blaxel | `BL_API_KEY` + `BL_WORKSPACE` |
95
144
  | Boat | `BOAT_API_KEY` |
96
145
  | Cloudflare Sandbox | `CLOUDFLARE_SANDBOX_URL` + `CLOUDFLARE_SANDBOX_TOKEN` |
146
+ | CodeSandbox SDK (Together) | `CSB_API_KEY` |
97
147
  | Daytona | `DAYTONA_API_KEY` |
148
+ | Dedalus Machines | `DEDALUS_API_KEY` |
149
+ | Deno Sandbox | `DENO_DEPLOY_TOKEN` |
98
150
  | Docker (local) | none: Docker running locally |
99
151
  | E2B | `E2B_API_KEY` |
100
152
  | exe.dev | `EXE_TOKEN` |
101
153
  | Fly.io Sprites | `SPRITES_TOKEN` |
154
+ | Freestyle | `FREESTYLE_API_KEY` |
102
155
  | HOPX | `HOPX_API_KEY` |
156
+ | InstaBox | `INSTABOX_API_KEY` |
157
+ | Koyeb Sandboxes | `KOYEB_API_TOKEN` |
158
+ | LangSmith Sandboxes | `LANGSMITH_API_KEY` |
103
159
  | Maritime | `MARITIME_API_KEY` |
104
160
  | Modal | `MODAL_TOKEN_ID` + `MODAL_TOKEN_SECRET` |
105
161
  | Morph Cloud | `MORPH_API_KEY` |
106
162
  | Northflank | `NORTHFLANK_API_TOKEN` + `NORTHFLANK_PROJECT_ID` |
163
+ | Novita AI Agent Sandbox | `NOVITA_API_KEY` |
164
+ | OpenScale Sandboxes | `OPENSCALE_API_KEY` |
107
165
  | Runloop | `RUNLOOP_API_KEY` |
166
+ | Sailboxes (Sail Research) | `SAIL_API_KEY` |
167
+ | Superserve | `SUPERSERVE_API_KEY` |
108
168
  | Tensorlake | `TENSORLAKE_API_KEY` |
169
+ | Upstash Box | `UPSTASH_BOX_API_KEY` |
109
170
  | Vercel Sandbox | `VERCEL_OIDC_TOKEN`, or `VERCEL_TOKEN` + `VERCEL_TEAM_ID` + `VERCEL_PROJECT_ID` |
110
171
 
111
172
  ## Library
@@ -120,10 +181,17 @@ const a = await router.create({ vcpu: 8, memoryGb: 16 }, { strategy: "cheapest"
120
181
  const b = await router.create({ gpu: "A10G", image: { modal: "pytorch/pytorch:latest" } });
121
182
 
122
183
  // Pin providers in order and turn fallback off
123
- const c = await router.create({}, { provider: ["maritime", "e2b"], fallback: false });
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`). A setup error (400, 401, 402, 403, 404, 422: a bad key,
189
+ // no billing, a bad image) stops instead, so a mistake isn't hidden by a pricier provider.
190
+ // fallback: "any" falls back on every error.
191
+ const e = await router.create({}, { fallback: "any", createTimeoutSeconds: 300 });
124
192
 
125
193
  // Per-provider images: each provider names its templates differently
126
- const d = await router.create({ image: { maritime: "python", e2b: "code-interpreter-v1", modal: "python:3.13-slim" } });
194
+ const d = await router.create({ image: { e2b: "code-interpreter-v1", modal: "python:3.13-slim" } });
127
195
 
128
196
  // Files
129
197
  await a.writeFile("/tmp/data.csv", "x,y\n1,2\n");
@@ -149,7 +217,19 @@ await a.kill();
149
217
 
150
218
  ## Computers (desktops and phones)
151
219
 
152
- For computer-use agents: a machine with a screen that your model drives with clicks and keys. Maritime provides Linux desktops, Windows desktops and Android phones on the same key. Actions use the Anthropic computer-use shape.
220
+ 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.
221
+
222
+ | Provider | Linux | Windows | Android | iOS | Default size | Live view |
223
+ |---|---|---|---|---|---|---|
224
+ | AWS WorkSpaces (agent access) | $0.138 | $0.150 | | | 2 vCPU · 4 GB | watch only |
225
+ | Daytona | $0.067 | | | | 1 vCPU · 1 GB | watch/control link |
226
+ | E2B Desktop | $0.533 | | | | 8 vCPU · 8 GB | watch/control link |
227
+ | Limrun | | | $3.00 | $6.00 | phone emulator / iPhone simulator | interactive link |
228
+ | Maritime | $0.120 | $0.180 | $0.150 | | 2 vCPU · 4 GB | view-only and takeover links |
229
+ | Mobilerun | | | $1.80 | | cloud phone | embedded player |
230
+ | Orgo | $0.055 | plan | | | 2 vCPU · 8 GB | VNC (full control) |
231
+
232
+ 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)).
153
233
 
154
234
  ```ts
155
235
  const desk = await router.computer({ os: "linux", externalUserId: "user_42" }); // same id, same desktop
@@ -164,7 +244,7 @@ const { url } = await desk.viewer("control", { reason: "Please sign in" });
164
244
 
165
245
  ```bash
166
246
  npx @sandboxrouter/sdk desktop --os linux --user user_42 --control # prints a takeover link
167
- npx @sandboxrouter/sdk screenshot maritime:<id> --out screen.png
247
+ npx @sandboxrouter/sdk screenshot <provider>:<id> --out screen.png
168
248
  ```
169
249
 
170
250
  ## CLI
@@ -173,18 +253,91 @@ npx @sandboxrouter/sdk screenshot maritime:<id> --out screen.png
173
253
  npx @sandboxrouter/sdk providers # price table + which keys are set
174
254
  npx @sandboxrouter/sdk route --gpu T4 # dry run
175
255
  npx @sandboxrouter/sdk run "uname -a && nproc" # start, run, print, kill
176
- npx @sandboxrouter/sdk run "pytest -q" --provider e2b,maritime --keep
256
+ npx @sandboxrouter/sdk run "pytest -q" --provider e2b,daytona --keep
177
257
  npx @sandboxrouter/sdk bench --runs 5 # cold start + exec latency table
178
258
  npx @sandboxrouter/sdk bench --share --label "us-east-1" # also write a report for results/
179
259
  npx @sandboxrouter/sdk leaderboard results --out leaderboard.html
180
260
  npx @sandboxrouter/sdk serve --port 8787 # HTTP API
261
+ npx @sandboxrouter/sdk ls # sandboxes started here that were never killed
262
+ npx @sandboxrouter/sdk gc # kill the ones past their lifetime (--all: every one)
263
+ ```
264
+
265
+ ### Cleaning up leaks
266
+
267
+ 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.
268
+
269
+ ```bash
270
+ sandboxrouter ls # id, age, lifetime left, cost so far
271
+ sandboxrouter gc --dry-run # what would be killed
272
+ sandboxrouter gc # kill sandboxes past their requested lifetime
273
+ sandboxrouter gc --all # kill every open one (end of a CI job)
274
+ sandboxrouter gc --older-than 60 # kill those up for an hour or more
181
275
  ```
182
276
 
277
+ 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).
278
+
183
279
  ### Bench
184
280
 
185
281
  `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.
186
282
 
187
- `--share` writes a JSON report (timings, your label, Node version and platform; never keys, env or error text). Open a PR adding it to [`results/`](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.
283
+ `--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.
284
+
285
+ ### Real cost
286
+
287
+ 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.
288
+
289
+ ```bash
290
+ sandboxrouter cost run --minutes 10 # every configured cloud provider, 2 vCPU / 4 GB
291
+ sandboxrouter cost settle results/cost/cost-2026-11-06-16-58.json
292
+ ```
293
+
294
+ ### Compatibility
295
+
296
+ `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.
297
+
298
+ ```bash
299
+ sandboxrouter check --provider koyeb # one provider
300
+ sandboxrouter check --all --save # every configured provider; writes results/conformance/<id>.json
301
+ ```
302
+
303
+ 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.
304
+
305
+ | Provider | Real-account check (14 steps) | Result since |
306
+ |---|---|---|
307
+ | Agent37 | not run yet | |
308
+ | Boat | not run yet | |
309
+ | Maritime | 14/14 passed | 2026-11-06, v0.2.0 |
310
+ | Sailboxes (Sail Research) | 14/14 passed | 2026-11-06, v0.3.0 |
311
+ | Northflank | not run yet | |
312
+ | Morph Cloud | not run yet | |
313
+ | exe.dev | not run yet | |
314
+ | Novita AI Agent Sandbox | not run yet | |
315
+ | Freestyle | not run yet | |
316
+ | Beam | not run yet | |
317
+ | CodeSandbox SDK (Together) | not run yet | |
318
+ | Fly.io Sprites | not run yet | |
319
+ | Blaxel | 13/13 passed; n/a: pause and resume | 2026-11-06, v0.2.0 |
320
+ | HOPX | not run yet | |
321
+ | Superserve | not run yet | |
322
+ | LangSmith Sandboxes | 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
+ | OpenScale Sandboxes | 14/14 passed | 2026-11-06, v0.2.0 |
336
+ | Azure Container Apps dynamic sessions | not run yet | |
337
+ | Daytona | 0/14 passed; failed: create | 2026-11-06, v0.2.0 |
338
+ | Alibaba Cloud Agent Sandbox | not run yet | |
339
+ | E2B | 14/14 passed | 2026-11-06, v0.2.0 |
340
+ | Docker (local) | 14/14 passed | 2026-11-06, v0.2.0 |
188
341
 
189
342
  ## HTTP API
190
343
 
@@ -196,7 +349,7 @@ SANDBOXROUTER_TOKEN=secret npx @sandboxrouter/sdk serve
196
349
  |---|---|---|
197
350
  | `GET` | `/v1/providers` | |
198
351
  | `POST` | `/v1/route` | same as create; returns the candidate order |
199
- | `POST` | `/v1/sandboxes` | `{ vcpu, memoryGb, gpu, env, timeoutMinutes, image, metadata, provider, strategy, fallback, require }` |
352
+ | `POST` | `/v1/sandboxes` | `{ vcpu, memoryGb, gpu, env, timeoutMinutes, image, metadata, provider, strategy, fallback, createTimeoutSeconds, require }` |
200
353
  | `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` |
201
354
  | `POST` | `/v1/sandboxes/:id/pause` | |
202
355
  | `PUT` | `/v1/sandboxes/:id/files?path=` | raw bytes |
@@ -214,10 +367,10 @@ SANDBOXROUTER_TOKEN=secret npx @sandboxrouter/sdk serve
214
367
  ```bash
215
368
  curl -s localhost:8787/v1/sandboxes -H "Authorization: Bearer secret" \
216
369
  -d '{"vcpu":2,"strategy":"cheapest"}'
217
- # {"id":"maritime:sbx-k3m7q2ab","provider":"maritime","estimatedHourlyUsd":0.022,"attempts":[...]}
370
+ # {"id":"e2b:iz5sb5a4bt3pmjx7c5ms2","provider":"e2b","estimatedHourlyUsd":0.1656,"attempts":[...]}
218
371
  ```
219
372
 
220
- Provider keys stay on the server. Clients only hold `SANDBOXROUTER_TOKEN`. It binds to `127.0.0.1` by default.
373
+ 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`.
221
374
 
222
375
  ### Python
223
376
 
@@ -227,7 +380,7 @@ A standard-library client for the HTTP API lives in [`python/`](python/):
227
380
  from sandboxrouter import Client
228
381
 
229
382
  sr = Client("http://127.0.0.1:8787", token="secret")
230
- with sr.create(vcpu=2, memory_gb=4, strategy="cheapest") as sbx:
383
+ with sr.create(strategy="cheapest") as sbx:
231
384
  sbx.exec("pip install rich && python -c 'import rich'", on_stdout=lambda c: print(c, end=""))
232
385
  ```
233
386
 
@@ -241,15 +394,30 @@ with sr.create(vcpu=2, memory_gb=4, strategy="cheapest") as sbx:
241
394
  | Modal | `cpu`, `memoryMiB`, `gpu` | `timeoutMs` | registry tag | no | Uses Modal app `sandboxrouter` (override with `SANDBOXROUTER_MODAL_APP`). |
242
395
  | Vercel | `vcpus` (2 GB each) | `timeout` | `runtime` | no | Max 8 vCPU. |
243
396
  | 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. |
244
- | Fly.io Sprites | `cpus`, `ramMB` (may be ignored) | none: `kill()` deletes | no | no | Sprites idle for free on their own. |
245
- | Blaxel | memory (CPU follows) | `ttl` | image | yes (archive, disk only) | Idle sandboxes go to free standby on their own. |
397
+ | Fly.io Sprites | `cpus`, `ramMB` (may be ignored) | none: `kill()` or `gc` deletes | no | no | Sprites idle for free on their own. |
398
+ | Blaxel | memory (CPU follows) | `ttl` | image | no (archiving is a per-workspace preview) | Idle sandboxes go to free standby on their own. |
246
399
  | Tensorlake | `cpus`, `memoryMb` | idle timeout | image | yes (memory + disk) | Output is line-based. |
247
400
  | Runloop | snapped to Runloop's custom sizes | `keep_alive_time_seconds` (max 48 h) | blueprint | yes (Pro plan) | Commands start in the home directory. |
248
401
  | HOPX | set by the template | timeout | template | yes (memory + disk) | Size requests aren't applied, so the router only sends default-size work. |
249
402
  | 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. |
250
403
  | 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)). |
251
404
  | 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. |
252
- | exe.dev | `--cpu`, `--memory` (2 GiB per vCPU max) | none: `kill()` deletes | `--image` | no | Plain REST over exe.dev's `/exec`; long commands run detached and are polled. |
405
+ | 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. |
406
+ | 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. |
407
+ | 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). |
408
+ | AgentCore | fixed 2 vCPU / 8 GB | `sessionTimeoutSeconds` (max 8 h) | no | no | SigV4, plain fetch; files move as base64 over commands. Opt-in. |
409
+ | 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. |
410
+ | Beam | `cpu`, `memory` | `keepWarmSeconds` | registry image | no | Uses Beam app `sandboxrouter` (override with `SANDBOXROUTER_BEAM_APP`). |
411
+ | 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. |
412
+ | 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. |
413
+ | Deno | fixed 2 vCPU, 0.75 to 4 GB | up to 30 min | snapshot or volume | no | WebSocket RPC via `@deno/sandbox`. |
414
+ | Freestyle | smallest Ubuntu snapshot that fits | `ttlSeconds` | snapshot | yes (memory + disk) | Plain REST; long commands run as background requests and are polled. |
415
+ | 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. |
416
+ | Koyeb | smallest Standard instance that fits | auto-delete delay (max 24 h) | any Docker image | no | Plain REST; streams over SSE. Public preview. |
417
+ | 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. |
418
+ | Novita | set by the template | `timeoutMs` | template | yes (memory + disk) | `novita-sandbox` SDK (an E2B fork). |
419
+ | 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. |
420
+ | 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. |
253
421
  | Docker (local) | `--cpus`, `--memory` | container exits at the lifetime | any image | yes (`docker pause`) | Your machine, shared kernel. Never auto-routed; use `{ provider: "docker" }`. |
254
422
 
255
423
  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.
@@ -257,13 +425,20 @@ Capabilities in the catalog describe what each **adapter** implements, not every
257
425
  ## Roadmap
258
426
 
259
427
  - [x] More providers: Morph, Fly.io Sprites, Blaxel, Tensorlake, Runloop, HOPX, Northflank, Boat, exe.dev, Cloudflare (via a bridge Worker), Docker (local)
428
+ - [x] More providers: Koyeb, Freestyle, Deno, Beam, CodeSandbox, Upstash Box, Novita, Alibaba Cloud, Azure Container Apps sessions, AWS Bedrock AgentCore, AWS Lambda MicroVMs
429
+ - [x] YC sandbox startups: Agent37 (F26), Dedalus Machines (S25), InstaBox (P26), OpenScale (S22), Superserve (F26)
430
+ - [x] Sail Research Sailboxes
431
+ - [ ] More E2B-compatible clouds (PPIO, UCloud, Baidu) and Google Agent Engine sandboxes
260
432
  - [x] Neutral routing: price decides, ties alphabetical, no privileged slot
261
- - [x] Desktops and phones (Maritime: Linux, Windows, Android)
433
+ - [x] Desktops and phones from 7 providers (Linux, Windows, Android, iOS), routed by price per OS
434
+ - [ ] Windows 365 for Agents and Corellium as opt-in computer providers
262
435
  - [x] Streaming exec output
263
436
  - [x] Pause/resume where providers support it
264
437
  - [x] Python client
265
438
  - [x] Leaderboard built from `bench --share` reports
266
- - [ ] Computers on more providers (E2B Desktop, Daytona computer use)
439
+ - [x] Leak cleanup: a local ledger, `ls` and `gc`
440
+ - [x] One 14-step real-account check for every adapter, with a compatibility table and a nightly run
441
+ - [ ] Every adapter run against a real account (see the Compatibility table)
267
442
  - [ ] Snapshots and forks as a routed operation
268
443
  - [ ] A hosted copy of the leaderboard page
269
444
 
@@ -283,12 +458,16 @@ SANDBOXROUTER_TOKEN=secret npx @sandboxrouter/sdk serve --cors http://localhost:
283
458
 
284
459
  ```bash
285
460
  npm i
286
- npm test # router, HTTP server, leaderboard, Maritime sandboxes + computers against contract mocks
287
- npm run test:py # Python client against the real HTTP server
461
+ npm test # router, HTTP server, and every adapter against a local mock of its API
462
+ npm run test:py # Python client against the real HTTP server
288
463
  npm run build
289
464
  npm run dev -- providers
465
+ npm run price:check # compare every provider's pricing page with the last check
466
+ node --import tsx scripts/readme-tables.ts --write # regenerate the README's Prices, Env and Compatibility tables
290
467
  ```
291
468
 
292
- Adding a provider means implementing `Provider` from [`src/types.ts`](src/types.ts) and adding a catalog entry with a pricing source link.
469
+ 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).
470
+
471
+ 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.
293
472
 
294
- MIT
473
+ [MIT](LICENSE)
package/dist/bench.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CATALOG, hourlyCost } from "./catalog.js";
1
+ import { CATALOG, fixedSize, hourlyCost } from "./catalog.js";
2
2
  import { loadBench, median, saveBench } from "./bench-store.js";
3
3
  import { Router } from "./router.js";
4
4
  /**
@@ -23,7 +23,7 @@ export async function bench(opts) {
23
23
  let box;
24
24
  try {
25
25
  const t0 = performance.now();
26
- box = await router.create(spec, { provider: id, fallback: false });
26
+ box = await router.create({ ...fixedSize(id), ...spec }, { provider: id, fallback: false });
27
27
  createMs.push(Math.round(performance.now() - t0));
28
28
  const t1 = performance.now();
29
29
  const r = await box.exec("echo ok");
@@ -46,7 +46,7 @@ export async function bench(opts) {
46
46
  failures,
47
47
  medianCreateMs: median(createMs),
48
48
  medianExecMs: median(execMs),
49
- hourlyUsd: hourlyCost(id, spec),
49
+ hourlyUsd: hourlyCost(id, { ...fixedSize(id), ...spec }),
50
50
  lastError,
51
51
  });
52
52
  }
@@ -57,7 +57,7 @@ export function benchMarkdown(rows) {
57
57
  const name = (id) => CATALOG.find((c) => c.id === id).name;
58
58
  const ms = (n) => (n === undefined ? "n/a" : `${n} ms`);
59
59
  const lines = [
60
- "| # | Provider | Cold start (median) | Exec round trip | $/hr (2 vCPU, 4 GB) | Success |",
60
+ "| # | Provider | Cold start (median) | Exec round trip | $/hr (list, size run) | Success |",
61
61
  "|---|---|---|---|---|---|",
62
62
  ...rows.map((r, i) => `| ${i + 1} | ${name(r.provider)} | ${ms(r.medianCreateMs)} | ${ms(r.medianExecMs)} | $${r.hourlyUsd.toFixed(3)} | ${r.runs - r.failures}/${r.runs} |`),
63
63
  ];