Integrations
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
A tool set for generateText and streamText, with live output in useChat.
Mastra
A tool map for new Agent.
OpenAI Agents
A tool array for the OpenAI Agents SDK.
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.
Web frameworks
Next.js
Route handlers and server actions that keep one sandbox per project.
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.