Skip to main content
Sandbox Agent

Run coding agents in sandboxes.
Control them over HTTP.

A server runs inside your sandbox. Your app connects remotely to control agents, stream events, handle permissions, and manage sessions.

  • Claude Code
  • Codex
  • OpenCode
  • Cursor
  • Amp
  • Pi

Get started

Install the TypeScript SDK, start a server, and send your first prompt.

npm install sandbox-agent@0.4.x

Inspect every session

Use the built-in Inspector to view conversations, examine event payloads, and troubleshoot your integration.

Sandbox Agent Inspector showing agent sessions and events

Questions and answers

Does this replace the Vercel AI SDK?

They work together. AI SDK helps you build chat interfaces and call language models. Sandbox Agent controls coding agents that write code and run commands.

Which coding agents are supported?

Claude Code, Codex, OpenCode, Cursor, Amp, and Pi. The SDK normalizes their APIs so you can swap agents without changing your integration.

How is session data persisted?

Session events use a shared schema that you can store in your own database. The persistence guides cover IndexedDB, SQLite, Postgres, and Rivet.

Can I run this locally?

Yes. Run locally for development or deploy the server inside a sandbox. The same SDK supports both.

Does it support my platform?

The server is a Rust binary that runs in Docker, virtual machines, and sandbox providers. The docs include deployment guides for E2B, Daytona, Vercel, Cloudflare, Modal, and more.

Can I use my own API keys?

Yes. Supply your own provider credentials, or use sandbox-agent credentials extract-env to extract credentials from your local agent configuration.

Why Rust?

Rust provides a single binary, fast startup, and predictable memory usage, so the server can run inside sandboxes and CI without a separate application runtime.

Why use a sandbox?

Coding agents run commands and change files. A sandbox isolates those operations from your application servers. Sandbox Agent supplies the API for controlling the agent remotely.

How is this different from an agent’s official SDK?

Official SDKs typically run local processes. Sandbox Agent runs a server inside the sandbox so your application can control those processes over HTTP.

Why not SSH?

Coding agents need streaming output, interactive terminals, and permission handling. Sandbox Agent exposes these capabilities through an application API.