CodeSandbox SDK vs Upstash Box

CodeSandbox SDK gives each sandbox a Firecracker microVM that runs Docker and hibernates with its memory, so it wakes with its processes still running. Upstash Box gives each agent a light container with a coding agent built in, billed only for the CPU it uses, but with no Docker inside.

The companies and products

CodeSandbox SDK

CodeSandbox SDK is an API from CodeSandbox, now a Together AI company, that starts sandboxed development VMs on the same infrastructure as the CodeSandbox editor.

Each sandbox is a Firecracker microVM built from a template or any Dockerfile. When it goes idle it hibernates with a memory snapshot, and it resumes or forks from that snapshot in seconds. You drive it from a TypeScript SDK through terminals, commands, files and HTTPS hosts. Together's docs now call it the legacy offering and point new users to its successor, the together-sandbox SDK.

Self-hosting
Not offered

Upstash Box

Upstash Box is a cloud computer for AI agents from Upstash, the company known for serverless Redis, Vector and QStash.

Each box is a Docker container with its own filesystem, shell, git and an optional coding agent such as Claude Code, Codex or OpenCode, which you drive from TypeScript or Python SDKs. A box pauses when it sits idle, keeps its files, and you pay for the CPU it actually uses. Upstash built it to run its own Context7 service and opened it to everyone in March 2026.

Which use cases each one fits

For each use case, Battleships prices every sandbox provider on the same workload and sorts them from the cheapest monthly bill up. “46th cheapest of 345” means 45 of the other 344 providers run that workload, with every feature it needs, for less. “With limits” means the provider runs it but misses something, so it is listed after every full match. Open a use case for its whole ranking and what each provider misses.

Use case and its workloadCodeSandbox SDK: price rankUpstash Box: price rankbochka: price rank
Software factory
100 at once · 4 vCPU / 8 GB · 2,200 sessions of 8 h a month
A software factory needs Docker for databases and test services, which CodeSandbox SDK runs and an Upstash box, itself a container, does not; bochka adds SSH, /dev/kvm and built-in agents.
178th of 367, with limits
$1,939 a month
61st of 367, with limits
$464 a month
3rd cheapest of 367
$634 a month
Always-on AI employees
50 machines 24/7 · 2 vCPU / 4 GB
215th of 366, with limits
$2,478 a month
103rd of 366, with limits
$475 a month
5th cheapest of 366
$657 a month
Code interpreter bursts
100 at once · 1 vCPU / 2 GB · 200,000 sessions of 1 min a month
Both suit short code runs: Upstash bills only the CPU a box uses, and CodeSandbox SDK hibernates with its memory and wakes on the next request.
46th cheapest of 345
$642 a month
10th cheapest of 345
$119 a month
186th of 345, with limits
$2,000 a month
Sandboxes for your users
300 at once · 2 vCPU / 4 GB · 30,000 sessions of 23 min a month
Upstash fits up to 300 users at once, while CodeSandbox SDK's Scale plan stops at 250 VMs; bochka fits too and adds raw TCP, SSH and a desktop.
140th of 361, with limits
$1,707 a month
2nd cheapest of 361
$222 a month
Cheapest of 361
$209 a month
RL rollouts
1,000 at once · 2 vCPU / 4 GB · 1,000,000 sessions of 3 min a month
CodeSandbox SDK's memory forks let many rollouts branch from the same running state, which Upstash's file snapshots do not.
348th of 360, with limits
$3,861 a month
352nd of 360, with limits
$8,068 a month
34th of 360, with limits
$2,000 a month
Agent evals
250 at once · 4 vCPU / 8 GB · 15,000 sessions of 20 min a month
Both fit eval runs; CodeSandbox SDK can fork many runs from one warm memory state, and Upstash can start many boxes from one snapshot.
64th cheapest of 364
$1,335 a month
52nd cheapest of 364
$1,011 a month
10th cheapest of 364
$200 a month
CI runners
40 at once · 8 vCPU / 16 GB · 6,000 sessions of 12 min a month
CodeSandbox SDK runs Docker builds inside its VMs, which an Upstash container cannot; bochka also has /dev/kvm for Android builds.
92nd cheapest of 377
$860 a month
120th cheapest of 377
$1,520 a month
4th cheapest of 377
$86 a month
24/7 dev boxes
1 machine 24/7 · 4 vCPU / 8 GB
A flat-price keep-alive Upstash box makes a light dev box that stays on, while CodeSandbox SDK bills every running minute; bochka's is a full VM with a bigger disk.
310th of 368, with limits
$240 a month
10th cheapest of 368
$20 a month
18th cheapest of 368
$26 a month
Computer-use agents
50 at once · 4 vCPU / 8 GB · 20,000 sessions of 15 min a month
Neither has a desktop: both offer only a headless Chromium, while bochka streams a full Linux desktop at 60fps with computer-use tools.
206th of 369, with limits
$691 a month
73rd of 369, with limits
$76 a month
6th cheapest of 369
$200 a month
Browser-use agents
50 at once · 2 vCPU / 4 GB · 30,000 sessions of 10 min a month
251st of 367, with limits
$443 a month
49th of 367, with limits
$38 a month
7th cheapest of 367
$200 a month
Scraping & bots (startup scale)
50 at once · 1 vCPU / 2 GB · 100,000 sessions of 3 min a month
281st of 346, with limits
$508 a month
37th cheapest of 346
$400 a month
6th cheapest of 346
$90 a month
Mass scraping & bots (undetectable)
1,000 at once · 1 vCPU / 2 GB · 3,000,000 sessions of 2 min a month
193rd of 338, with limits
$7,390 a month
200th of 338, with limits
$8,000 a month
71st of 338, with limits
$1,800 a month
Parallel red teaming
200 at once · 2 vCPU / 4 GB · 5,000 sessions of 30 min a month
240th of 360, with limits
$326 a month
225th of 360, with limits
$259 a month
2nd cheapest of 360
$200 a month
GPU eval jobs
10 at once · 8 vCPU / 32 GB · 500 sessions of 30 min a month
Can't run itCan't run itCan't run it
macOS agents
5 at once · 4 vCPU / 8 GB · 1,000 sessions of 20 min a month
Can't run itCan't run itCan't run it

Key features

FeatureCodeSandbox SDKUpstash Boxbochka
IsolationFirecracker microVM with its own kernelDocker container per box on AWSFull VM with its own kernel on dedicated AMD Ryzen 9 9950X hosts
Docker insideYes, with root; built from any DockerfileNot documented; the box is itself a container, and custom images are listed as coming soonYes, Docker and systemd run as on any Linux server
Nested virtualizationNot documentedNo; boxes are containersYes, /dev/kvm for Android emulators and VMs
Biggest machine16 cores / 32 GB on Scale, up to 64 cores / 128 GB on EnterpriseLarge: 8 vCPU / 16 GBUp to 16 vCPU / 32 GB on the $100 plan and above
Disk20 GB per VM; price for more is not published5, 10 or 20 GB by size, billed per GB-month50 GB at the default 4 vCPU / 8 GB size, 12 to 251 GB by size
Pause and resumeHibernates with a memory snapshot; resumes with processes still runningPauses when idle and keeps its files; storage keeps billing while pausedDisk saved every minute and on stop; a stopped sandbox costs nothing, and resume boots again
Wake on requestYes; an HTTP request to a host wakes itYes; a request to a public URL resumes a paused boxNo; a stopped sandbox is started by API
ForkFork a hibernated sandbox from its snapshot, or a running one sharing its memorySnapshot a running box and start many new boxes from itFork a running sandbox with its disk
Shell accessTerminals, commands and files through the SDK; no SSHSDK commands, plus SSH through a gatewaySSH, plus exec and files over the API
Inbound accessHTTPS host per port, public by default, signed tokens for private hosts; no raw TCPHTTPS URL per port, public unless you add a token or basic auth; no raw TCPHTTPS URLs for up to 50 ports, token-protected by default; raw TCP; a dedicated IPv6 or IPv4
Desktop and browserNo desktop; a headless Chromium templateManaged headless Chromium with AI page actions and CDP; no desktopLinux desktop streamed at 60fps, Chromium and computer-use tools
Coding agentsRun your own agent through the command APIClaude Code, Codex and OpenCode built in, with run and stream APIs, webhooks and scheduled promptsClaude Code, Codex and other agents preinstalled, with a prompt, steer and events API
Keeping API keys out of the sandboxSecrets passed in as environment variablesHost proxy injects headers into outbound HTTPS on port 443; set when the box is createdCredentials proxy for model providers and any HTTPS API; switch a credential to another account when credits run out
Outbound rulesNo outbound allowlist documentedAllow all, deny all, or allow and deny by domain and CIDR, changeable on a running boxOpen internet, no provider-side allowlist
Every feature Battleships tracks (43)
FeatureCodeSandbox SDKUpstash Boxbochka
Full VM (own kernel)YesNoYes
Docker insideYesNoYes
Nested virtualizationNoNoYes
RootYesNot publishedYes
SystemdNot publishedNot publishedYes
Desktop GUINoNoYes
BrowserNoYesYes
Computer-use APINoNoYes
SSHNoYesYes
Persistent diskYesYesYes
Pause/resumeYesYesYes
Automatic snapshotsYesNoYes
Fork/cloneYesYesYes
Live fork (no pause)YesYesYes
Memory forkYesNoNo
Custom image (Docker or snapshot)YesYesYes
≥24 h sessionsYesYesYes
Idle auto-stopYesYesNo
Wake on requestYesYesNo
HTTPS preview URLsYesYesYes
Raw TCP inboundNoNoYes
Public IPv4NoNoNo
Egress allowlistNoYesNo
Secret proxyNoYesYes
Secret proxy for any APINoYesYes
Preinstalled agentsNoYesYes
Agent harness APINoYesYes
MCP serverNoYesNo
GPUNoNoNo
WindowsNoNoNo
Arm64NoYesNo
Self-hostingNoNoNo
BYOCNoNoNo
Open sourceNoNoNo
Scoped API keysNot publishedNot publishedYes
Spend limitsNot publishedNot publishedYes
Usage per sandbox (API)NoYesYes
Audit logsNot publishedNot publishedNo
SSOYesNoNo
SOC 2YesYesNo
HIPAANoNoNo
EU data residencyNoNoYes
Zero data retentionNot publishedNot publishedYes

Performance

CodeSandbox SDKNot measured
Upstash BoxNot measured
bochka26.69 runs/s

Neither CodeSandbox SDK nor Upstash Box has a result in the hpc-sandbox-benchmarks CPU test, so there is no comparable measurement between them. bochka did 26.69 runs per second on that Node.js build-and-test loop at 4 vCPU / 8 GB, on dedicated AMD Ryzen 9 9950X hosts.

Node.js build-and-test loop at 4 vCPU / 8 GB, higher is better. Measured with the open hpc-sandbox-benchmarks suite. CodeSandbox SDK and Upstash Box have no published run in this suite yet, so there is no like-for-like number to compare.

Pricing in five scenarios

Each bill is priced from the providers' public price lists by the open Battleships engine, with the cheapest plan that runs the scenario.

ScenarioCodeSandbox SDK, a monthUpstash Box, a monthbochka, a month
One coding agent, workdays
4 vCPU / 8 GB, 50 GB disk, 8 hours a day, 22 days a month, files kept between days
$193 · Scale$21 · Pay as You Go$20 · $20/mo
One agent that never stops
4 vCPU / 8 GB, 50 GB disk, running 24/7 all month
$341 · Scale$21 · Pay as You Go$26 · $20/mo
50 agents in parallel
50 machines of 4 vCPU / 8 GB at once, 8-hour sessions, 1,100 sessions a month, Docker inside
$2,500 · Scale$900 · Pay as You Go · with limits$317 · $20/mo × 3 seats
Sandboxes for your users
2 vCPU / 4 GB, 30,000 sessions of 10 minutes a month, up to 300 at once
$815 · Scale · with limits$306 · Pay as You Go$200 · $100/mo × 2 seats
1,000 short jobs at once
2 vCPU / 4 GB, 1,000 at once, 3 minutes each, 200,000 jobs a month
$1,632 · Scale · with limits$1,822 · Pay as You Go$2,000 · $2000/mo · with limits

CodeSandbox SDK: You buy VM credits and each size burns a fixed number per hour, billed per started minute while the VM runs, including idle time before it hibernates. The Scale plan adds a $170 monthly platform fee that is not usage credit, and a hibernated VM costs nothing.

Upstash Box: A standard box is billed for the CPU it actually uses, at $0.10, $0.20 or $0.40 per active CPU hour by size, plus $0.10 per GB-month of storage, and RAM is free. A keep-alive box costs a flat $8, $16 or $32 a month whether busy or not.

Upstash Box: Plans start at $20 a month, and the whole fee is usage credit. You pay per second while a sandbox runs, and a stopped sandbox costs nothing and keeps its disk.

Limits in those scenarios

CodeSandbox SDK's Scale plan allows 250 VMs at once, so the user-sandboxes and 1,000-job scenarios do not fit it without Enterprise, and each VM has a 20 GB disk. Upstash Box allows 1,000 boxes at once, but it cannot run Docker inside, so the 50-agent scenario does not fit there. Neither publishes an egress price. bochka's limit is start rate: for 1,000 short jobs at once, even the $2,000 plan queues starts.

ScenarioCodeSandbox SDKUpstash Boxbochka
One coding agent, workdays
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • flat pool: the tier is billed whether used or not
  • egress price not published
None that bite
One agent that never stops
  • disk beyond 20 GiB: price unknown
  • egress price not published
  • flat pool: the tier is billed whether used or not
  • egress price not published
None that bite
50 agents in parallel
  • egress price not published
  • missing Docker inside
  • flat pool: the tier is billed whether used or not
  • egress price not published
None that bite
Sandboxes for your users
  • Scale: max 250 concurrent
  • egress price not published
  • egress price not published
None that bite
1,000 short jobs at once
  • Scale: max 250 concurrent
  • egress price not published
  • egress price not published
  • max 2,400 starts/day (needs ~6,667)
  • max 600 starts/hour (needs ~1,000)
  • bursts above 90 starts/min are queued (a burst of 333 takes ~4 min to start)

Which one should you use?

Use CodeSandbox SDK when

you need Docker inside each sandbox and want it to hibernate with its memory and wake on the next request, and you are fine building on what Together now calls its legacy SDK.

  • Docker inside a real VM. For agents that run databases or build images: each Firecracker VM has its own kernel, root and Docker.
  • Memory hibernation and forks. For work used in bursts: a sandbox sleeps with its memory and wakes or forks with processes still running.
  • Bigger machines on Enterprise. For very large single jobs: Enterprise offers sizes up to 64 cores and 128 GB.

Use Upstash Box when

your agents mostly wait, you want a coding agent ready in each box, you need strict outbound rules, or you run big bursts in the US.

  • A coding agent built in. For teams that want Claude Code, Codex or OpenCode ready in each box, with streaming, webhooks and scheduled prompts.
  • Idle costs no CPU. For agents that mostly wait: only used CPU is billed, RAM is free, and a request wakes a paused box.
  • Outbound rules and big bursts. For locked-down or bursty work: allow lists by domain or CIDR, and 1,000 boxes at once by default.

Where bochka fits

If your agents do long, real work, look at bochka. Each sandbox is a full VM with SSH, Docker, systemd and /dev/kvm, a 60fps desktop, coding agents built in and a credentials proxy, so you get the parts CodeSandbox SDK and Upstash Box each leave out in one machine.

A whole machine with Docker and KVM

An Upstash box cannot run Docker, so agents that start a database or build an image get stuck. CodeSandbox SDK runs Docker but has no SSH and no documented /dev/kvm, so Android emulators and nested VMs cannot start.

A desktop the agent can see

Both give only a headless Chromium, so a computer-use agent cannot click desktop apps or native dialogs, and no human can watch along. bochka streams a full Linux desktop at 60fps with computer-use tools.

Agents and keys set up for you

On CodeSandbox SDK you build the agent harness yourself and pass keys in as environment variables the agent can read. Upstash has agents and a header proxy, but its proxy is fixed when the box is created.

Use bochka when your agents need a real machine for hours: Docker, emulators, a desktop, SSH, a big disk and servers others can reach, with the agent and its keys already set up. Compare it one to one: bochka vs CodeSandbox SDK and bochka vs Upstash Box.

Questions people ask

Is CodeSandbox SDK cheaper than Upstash Box?

Usually not. For one coding agent on workdays, CodeSandbox SDK comes to $193 a month against $21 on Upstash, and for one agent that never stops, $341 against $21. For 1,000 short jobs at once, Upstash comes to $1,822 a month and fits, while CodeSandbox SDK's Scale plan caps at 250 VMs.

Which is faster, CodeSandbox SDK or Upstash Box?

There is no comparable CPU measurement for either one. bochka did 26.69 runs per second on the hpc-sandbox-benchmarks Node.js loop at 4 vCPU / 8 GB, but neither CodeSandbox SDK nor Upstash Box was part of that run.

Can CodeSandbox SDK and Upstash Box run Docker?

CodeSandbox SDK runs Docker with root inside each Firecracker VM. Upstash Box does not document it: each box is itself a Docker container, and custom images are listed as coming soon. bochka runs Docker and systemd in every sandbox.

Which has coding agents built in?

Upstash Box ships Claude Code, Codex and OpenCode with run and stream APIs. On CodeSandbox SDK you run your own agent through the command API. bochka preinstalls Claude Code, Codex and others, driven from outside with a prompt, steer and events API.

Is CodeSandbox SDK still maintained?

CodeSandbox is now part of Together AI. Together's docs call the CodeSandbox-based SDK deprecated and name together-sandbox as its successor, while self-serve sign-up still runs through CodeSandbox.

Can either one run a desktop for computer use?

No. CodeSandbox SDK has a headless Chromium template, and Upstash gives a managed headless Chromium with a CDP endpoint, with no desktop. bochka streams a full Linux desktop at 60fps with computer-use tools.

Try bochka

Install the CLI, then run bochka new.

Product preview

More comparisons

Bochka product preview · Pricing, benchmarks and commands are illustrative. Sandbox provisioning is not connected.