Sandbox SDK
Providers

Overview

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

Every provider supports files, foreground commands, background processes, streaming, and cleanup. Choose based on the optional behavior your workload needs.

ProviderBest forRuntimePersistencePreviewSnapshot
LocalDevelopment, CI, self-hostingAgentOS VMProcess-scopedPrivate bridgeFilesystem + restore
E2BHosted coding agentsLinux sandboxEphemeralAuthenticatedTemplate
DaytonaPersistent workspaces, GPUsLinux workspacePersistentPublic or authenticatedNative API
Vercel SandboxVercel workloads and previewsLinux sandboxOptionalPublicFilesystem
Upstash BoxDurable serverless boxesLinux containerPersistentPublic or bearer tokenFilesystem

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 { withSandbox } from "@opencoredev/sandbox-sdk";
import { e2b } from "@opencoredev/sandbox-sdk/e2b";

await withSandbox({ provider: e2b() }, async (sandbox) => {
  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