Introduction
ComputeSDK is a TypeScript sandbox SDK for secure code execution across multiple cloud providers with one unified API.
ComputeSDK for secure code execution
ComputeSDK is a TypeScript sandbox SDK for secure code execution across multiple cloud providers. Use one provider-agnostic sandbox API to create isolated environments, run shell commands, and manage files without learning vendor-specific APIs.
It works well for AI agents, code execution platforms, developer tools, testing systems, and any product that needs safe cloud sandboxes. Your application code stays the same even when you switch providers.
How the sandbox API works
ComputeSDK is built around provider packages. Each provider ships as its own package under the @computesdk/ scope. Install only the providers you need.
Sandboxes — Isolated compute environments for running code safely Providers — Cloud platforms that host those sandboxes
When you install a package like @computesdk/e2b, you get a factory function for that provider. Every provider returns the same sandbox interface, so you can swap infrastructure without rewriting core logic.
Supported cloud sandbox providers
@computesdk/archil
Archil
@computesdk/beam
Beam
@computesdk/blaxel
Blaxel
@computesdk/cloud-run
Cloud Run
@computesdk/cloudflare
Cloudflare
@computesdk/codesandbox
CodeSandbox
@computesdk/createos-sandbox
CreateOS
@computesdk/daytona
Daytona
@computesdk/declaw
Declaw
@computesdk/e2b
E2B
@computesdk/hopx
HopX
@computesdk/isorun
Isorun
@computesdk/lightning
Lightning
@computesdk/modal
Modal
@computesdk/northflank
Northflank
@computesdk/runloop
Runloop
@computesdk/superserve
Superserve
@computesdk/tensorlake
Tensorlake
@computesdk/upstash
Upstash
@computesdk/vercel
Vercel
Why teams use ComputeSDK
Provider-agnostic sandbox API — Switch providers with minimal code changes Secure code execution — Run untrusted code in isolated sandboxes Lean installs — Add only the cloud sandbox providers you need TypeScript-native SDK — Get a clean developer experience with strong typing Production-ready — Build reliable AI and developer workflows on one interface
Common use cases
AI agent infrastructure — Let agents run code, commands, and file operations safely
Code execution platforms — Execute user-submitted code in isolated sandboxes
Browser IDEs and education tools — Provide interactive coding environments
Data workflows — Run scripts with filesystem access in disposable environments
Testing and CI systems — Create clean sandboxes for repeatable execution
Core features
Multi-provider support — Use E2B, Modal, Vercel, and other providers through one SDK Sandbox lifecycle management — Create, reconnect, list, and destroy sandboxes Filesystem operations — Read, write, remove, and organize files Shell command execution — Run commands directly inside each sandbox Type-safe APIs — Use full TypeScript support with clear errors
Quick example
Install a provider package:
Set your provider credentials:
Create a sandbox and run a command:
This pattern gives you a secure code execution sandbox with a single provider package. The same API shape works across supported providers.
Use multiple providers
You can use multiple providers in the same project. Install the packages you need and create separate compute instances:
The sandbox API stays consistent across providers. That makes it easier to route workloads by cost, region, latency, or hardware needs.
Configure multi-provider routing in one SDK
If you'd rather configure several providers together — for resilience, routing, or load balancing — install the computesdk core package alongside the providers you want:
Register multiple providers with compute.setConfig and choose a strategy:
Strategies
priority— always try providers in order; combine withfallbackOnError: trueto cascade on failureround-robin— distribute new sandboxes evenly across providers
Operations like destroy and snapshots automatically route to the provider that owns each sandbox, so you don't need to track affinity yourself.
Next steps
Start with Installation to set up a provider. Then follow Quick Start to launch your first sandbox.
Last updated
Was this helpful?