---
title: Integrations
description: Use Sandbox SDK with agent frameworks (AI SDK, Mastra, OpenAI Agents SDK) and web frameworks (Next.js, Hono). Each page shows the wiring and where keys stay.
---

Sandbox SDK is a server-side TypeScript library with no framework dependency. These pages show how it fits into the tools you already use: which subpath to import, where the sandbox is created, and where keys stay.

Every integration follows the same rules. Provider keys stay on the server. A sandbox that should outlive one request gets a `key`. A sandbox you're done with is destroyed, or reaped later.

## Agent frameworks

Each framework gets `sandboxTools(box)` from its own subpath. The tools, their output, and their options are identical across frameworks, so switching frameworks doesn't change what the model sees.

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

A tool set for `generateText` and `streamText`, with live output in `useChat`.

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

A tool map for `new Agent`.

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

A tool array for the OpenAI Agents SDK.

The OpenAI Agents SDK also has its own `SandboxAgent` with sandbox clients. [OpenAI Agents SDK sandbox in TypeScript](https://sandbox-sdk.app/blog/openai-agents-sdk-sandbox-typescript) compares it with `sandboxTools`.

Using another framework? `@opencoredev/sandbox-sdk/tools` exports `createSandboxTools` and `toolSchemas`, the Zod schemas behind every tool. Convert them with `z.toJSONSchema`. See [Agent tools](/docs/reference/agent-tools#other-integrations).

## Web frameworks

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

Route handlers and server actions that keep one sandbox per project.

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

The same pattern on Node or Bun, with streamed command output.

## Providers

The provider is a separate choice from the framework. Every integration works with every provider.

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

Docker on your machine.

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

Hosted microVMs.

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

MicroVMs on Vercel.

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

Sized, long-lived workspaces.

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

For unit tests.
