Field noteOct 30, 20265 min read1 source

Sandbox SDK: open-source TypeScript API to run agent code on E2B, Daytona, Vercel, Upstash, Railway, Tenki and more

In one minute

Sandbox SDK is an open-source TypeScript abstraction for creating and operating code-execution sandboxes across cloud vendors and local Docker. Its 1.0 API matters to AI builders because an agent harness can target one set of operations—commands, files, previews, Git, and lifecycle controls—rather than directly embedding one provider’s SDK.

What changed: Sandbox SDK offers one open-source TypeScript API across multiple providers, including Vercel Sandbox, rather than a provider-specific tool or integration.

What happened

OpenCoreDev has published Sandbox SDK, a TypeScript package described as “one API for running code in sandboxes.” The repository is public under the MIT license and presents the package as a server-side interface for creating sandboxes, running commands, editing files, and serving previews. The README says the same application code can run across 11 cloud providers, including E2B, Daytona, Vercel Sandbox, and Upstash Box, or in Docker on a developer’s own machine.

The core design is provider adapters. A developer creates a sandbox through createSandbox() and passes a provider factory such as the in-process memory() provider or the E2B adapter. The quickstart uses the memory implementation to write a file and run cat without an account or Docker, positioning it for API trials and tests. Moving that example to a real Linux machine requires swapping the provider import and installing the relevant provider SDK; the README says each provider dependency is an optional peer dependency, so users install only the integrations they use. Sandbox SDK requires Node.js 22 or newer, or Bun 1.3 or newer.

The common surface includes command execution, streamed output and timeouts; file write, read, edit, search, and upload operations; starting a development server and waiting for a port; and producing a URL for a port preview. It also exposes Git clone, commit, and push operations. The README describes a lifecycle distinction: await using cleans up a sandbox created without a key when scope ends, including when code throws; with a key, it calls close() and leaves the sandbox running, while destroy() is the explicit final removal operation. Commands that exit non-zero resolve with ok: false rather than throwing, and failures use SandboxError codes.

The package does not claim that all underlying sandboxes are identical. Pause, resume, and snapshot are available only for providers that support them, and the README says TypeScript types represent those differences. A caller can assign a key such as user:123 to find the same sandbox on a later request. The provider table lists adapters for E2B, Daytona, Vercel Sandbox, Upstash Box, Railway, Tenki, boxd, Freestyle, and others; the repository description also names Docker and additional services.

Sandbox SDK also packages these primitives for agents. Its sandboxTools exposes tools for commands, file reads and writes, edits, and background-process control. The documented example combines E2B with Vercel AI SDK, clones the Sandbox SDK repository, and asks a model to run tests and fix the first failure. The README says registered secrets never reach the model, and lists integrations for Mastra, the OpenAI Agents SDK, and a framework-agnostic tools interface. The project notes that version 1.0 changes the API for users coming from 0.2 and provides an upgrade guide.

What the archive adds

We have not covered this before; it opens a new thread.

Trend signal

This supports the idea that the harness can be a more durable boundary than the model or a single infrastructure vendor. A common sandbox contract lets an agent workflow preserve its execution logic while a team evaluates or changes the runtime underneath it, though vendor-specific capabilities remain visible. See Harness architecture outlives model choice.

Why it matters

Agentic coding needs somewhere to execute commands, manipulate repositories, start services, and inspect results. Direct use of a sandbox vendor’s SDK can make those operations part of the application’s permanent architecture. Sandbox SDK offers a narrower alternative: define the workflow against its common interface and select a provider adapter separately.

That can reduce migration work and make provider evaluation more realistic, since a team can run comparable workflows through different adapters. It also makes sandbox behavior a first-class product decision instead of an incidental implementation detail. The important caveat is that portability applies to the shared API, not necessarily to every operational property: pausing, snapshots, network behavior, isolation properties, pricing, and reliability still depend on the selected provider.

What happens next

  • More agent frameworks will expose Sandbox SDK-style execution adapters rather than requiring a single sandbox implementation. (6 months, 55%). Watch for: additional documented framework integrations or provider adapters.
  • Teams evaluating code agents will compare sandbox capability matrices alongside model and framework choices. (12 months, 60%). Watch for: published requirements around persistence, previews, lifecycle control, and secret handling.

Limits and uncertainty

The repository documents an API and its intended behavior; it does not establish comparative performance, uptime, isolation strength, pricing, geographic availability, or security properties across its providers. The source says secrets registered with its agent tools never reach the model, but it does not provide an independent audit or a full account of how every provider handles credentials and network access. Nor does the README show that an application using the shared interface will behave identically after switching providers. Capability-dependent operations are explicitly an exception.

Skill to build now

Write a small sandbox contract test for one real agent task this week: create a workspace, write and edit a file, run a command, start a service, retrieve a preview, and clean up the environment. Run it first with the in-memory provider to validate the harness, then with the intended production adapter. Record which operations are essential and which need provider-specific fallbacks, especially persistence, snapshots, and cleanup behavior.

Reader takeaway

Sandbox SDK turns code execution for agents into a selectable dependency rather than a provider-specific design commitment. Its value is not that every sandbox becomes the same; it is that teams can standardize their common execution workflow while making provider gaps explicit and testable.

Open question

Can its common interface remain useful as providers diverge on isolation, persistence, networking, and approval controls—the properties that often matter more than command execution itself?

Evidence / sources

  1. 1github.com/opencoredev/sandbox-sdk
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicHarness EngineeringExplore the harness-engineering topic hub.
  2. 02topicAgent RuntimeExplore the agent-runtime topic hub.
  3. 03archiveField NotesOpen the latest editorial analysis.
  4. 04source ledgerSource LedgerInspect the public source evidence graph.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract