Sandbox SDK
Providers

Overview

Compare Sandbox SDK providers by runtime, persistence, previews, and snapshots.

Every provider supports files, foreground commands, and cleanup. Background processes, streaming, previews, and snapshots vary; check capabilities before depending on them.

ProviderVendor documentationBest forRuntimePersistencePreviewSnapshot
LocalOfficial docsDevelopment, CI, self-hostingAgentOS VMProcess-scopedPrivate bridgeFilesystem + restore
E2BOfficial docsHosted coding agentsLinux sandboxEphemeralAuthenticatedTemplate
DaytonaOfficial docsPersistent workspaces, GPUsLinux workspacePersistentPublic or authenticatedNative API
Vercel SandboxOfficial docsCoding agents, persistent workspacesLinux sandboxDefault onPublicFilesystem
Upstash BoxOfficial docsDurable serverless boxesLinux containerPersistentPublic or bearer tokenFilesystem
Ascii BoxOfficial docsFull cloud VMs and app previewsLinux VMPersistentPublic by defaultNative lifecycle
RailwayOfficial docsDurable jobs and private networkingLinux VMUntil cleanupCLI tunnel onlyCheckpoint

Optional semantics differ. Check the generated compatibility matrix before depending on stdin, restore, resume, networking, GPUs, or a custom image.

Switch with one import

provider.ts
import { createSandbox } from "@opencoredev/sandbox-sdk";
import { e2b } from "@opencoredev/sandbox-sdk/e2b";

await using sandbox = await createSandbox({ provider: e2b() });
console.log((await sandbox.run("node --version")).stdout);

Only provider creation changes. The sandbox calls stay the same, and the provider object can also be passed to AI SDK, Eve, or Mastra.

On this page