---
title: Overview
description: Sandboxes for your agents and your users. Any provider, one line. Sandbox SDK is one TypeScript API over Docker, E2B, Vercel Sandbox, Daytona, and ten more providers.
---

:::note[Coming from 0.2?]
1.0 changes the API. [Upgrade from 0.2](/docs/upgrade-from-0-2) walks through each change.
:::

Sandbox SDK gives your code an isolated Linux machine to run commands in, write files to, and start dev servers on. You use the same TypeScript API whether that machine is a Docker container on your laptop or a microVM at E2B, Vercel, Daytona, or any of the other [supported providers](/docs/providers). Changing providers is one import.

It is for two kinds of app. One gives an AI agent a computer: the model runs tests, edits code, and starts a server. The other runs code your users write, such as an app builder with a live preview. Both need a machine that can't touch your servers, and both need it to come back when the user does.

```ts
import { createSandbox } from "@opencoredev/sandbox-sdk";
import { local } from "@opencoredev/sandbox-sdk/local";

await using box = await createSandbox(local());

const result = await box.run("node --version");
console.log(result.output);
```

That starts a sandbox, runs one command, prints its output, and deletes the sandbox when the block ends. Swap `local()` for `e2b()`, `vercel()`, or `daytona()` and nothing else changes.

## Start here

**[Install](/docs/getting-started/installation)**

Add the package, and a provider's SDK for the few providers that need one.

**[Quickstart](/docs/getting-started/quickstart)**

Run your first sandbox in memory with no account, then in Docker.

**[Choose a provider](/docs/getting-started/choose-a-provider)**

Pick where sandboxes run, based on what your app needs.

**[Compare providers](/docs/providers)**

See which features each provider supports, side by side.

## What you can build

**[Give your agent a sandbox](/docs/guides/give-your-agent-a-sandbox)**

Hand a model ready-made tools to run commands, edit files, and start servers.

**[Build an AI app builder](/docs/guides/build-an-ai-app-builder)**

A chat that writes an app in a sandbox and shows it running in an iframe.

**[One sandbox per user](/docs/guides/per-user-sandboxes)**

Give each user a sandbox that is still there on their next request.

**[Dev servers and previews](/docs/guides/dev-servers-and-previews)**

Start a server, wait until it answers, and show its URL.

## Providers

**[Local](/docs/providers/local)**

Docker on your machine or CI runner. No account.

**[E2B](/docs/providers/e2b)**

Hosted microVMs that pause with memory intact.

**[Vercel Sandbox](/docs/providers/vercel)**

MicroVMs on Vercel, with exact keys and OIDC auth.

**[Daytona](/docs/providers/daytona)**

Custom machine sizes and idle auto-stop.

**[Memory](/docs/providers/memory)**

An in-process fake for unit tests.

**[Write a provider](/docs/providers/custom)**

Adapt any other sandbox service to the same API.

## Works with your stack

**[AI SDK](/docs/integrations/ai-sdk)**

Tools for `generateText` and `streamText`.

**[Mastra](/docs/integrations/mastra)**

A tool map for a Mastra agent.

**[OpenAI Agents](/docs/integrations/openai-agents)**

A tool array for the OpenAI Agents SDK.

**[Next.js](/docs/integrations/nextjs)**

Route handlers that keep a sandbox per project.

**[Hono](/docs/integrations/hono)**

The same pattern on Node or Bun.

**[All integrations](/docs/integrations)**

Everything in one place.

## How it differs

- **Your keys, no middleman.** The SDK calls each provider's API or SDK with your credentials. Nothing runs between you and the provider, and nothing is installed inside the sandbox.
- **It never quietly ignores an option.** If you ask a provider for a network allow list or a machine size it can't enforce, `createSandbox` fails with `unsupported` instead of handing you an open sandbox.
- **Failed commands are results.** A non-zero exit code comes back as `ok: false`. The SDK throws only when the sandbox or the provider fails.
- **Sandboxes come back.** Give a sandbox a `key` and the next request, on any server, gets the same one. Background processes and their logs live inside the sandbox, so they survive a redeploy.

The SDK is not an isolation layer of its own. The provider you choose supplies the security boundary. See [Security](/docs/reference/security).

Coming from 0.2? Read [Upgrade from 0.2](/docs/upgrade-from-0-2).
