Thanks to visit codestin.com
Credit goes to sandboxagent.dev

Run Coding Agents in Sandboxes.
Control Them Over HTTP.

The Sandbox Agent SDK is a server that runs inside your sandbox. Your app connects remotely to control Claude Code, Codex, OpenCode, or Amp — streaming events, handling permissions, managing sessions.

Read the Docs
Your AppHTTP / SSESANDBOXSandbox Agent Server
Claude Code
Claude Code
Codex
Amp
Amp
OpenCode
CONNECTED TO CLAUDE CODE

Running coding agents remotely is hard.

Coding agents need sandboxes, but existing SDKs assume local execution. SSH breaks, CLI wrappers are fragile, and building from scratch means reimplementing everything for each coding agent.

Coding Agents Need Sandboxes

Problem

You can't let AI execute arbitrary code on your production servers. Coding agents need isolated environments, but existing SDKs assume local execution.

Solution

A server that runs inside the sandbox and exposes HTTP/SSE.

Every Coding Agent is Different

Problem

Claude Code, Codex, OpenCode, and Amp each have proprietary APIs, event formats, and behaviors. Swapping coding agents means rewriting your entire integration.

Solution

One HTTP API. Write your code once, swap coding agents with a config change.

Sessions Are Ephemeral

Problem

Coding agent transcripts live in the sandbox. When the process ends, you lose everything. Debugging and replay become impossible.

Solution

Universal event schema streams to your storage. Persist to Postgres or Rivet, replay later, audit everything.

How it works.

A server runs inside your sandbox. Your app connects over HTTP to control any coding agent.

Universal Agent API

Claude Code, Codex, OpenCode, and Amp each have different APIs. We provide a single, unified interface to control them all.

Streaming Events

Real-time SSE stream of everything the agent does. Persist to your storage, replay sessions, audit everything.

Universal Schema

Standardized session schema that covers all features of all agents. Includes tool calls, permission requests, file edits, etc. Approve or deny tool executions remotely over HTTP.

Automatic Agent Installation

Create sessions, send messages, persist transcripts. Full session lifecycle management over HTTP.

Runs Inside Any Sandbox

Lightweight static binary. One curl command to install inside E2B, Daytona, Vercel Sandboxes, or Docker.

Get Started

Choose the installation method that works best for your use case.

TypeScript SDK

Embed in your application

Import the TypeScript SDK directly into your Node or browser application. Full type safety and streaming support.

example.ts
import { SandboxAgent } from "sandbox-agent";

const client = await SandboxAgent.start();

await client.createSession("my-session", {
  agent: "claude-code",
});

await client.postMessage("my-session", {
  message: "Hello, world!",
});

for await (const event of client.streamEvents("my-session")) {
  console.log(event.type, event.data);
}

HTTP API

Run as a server

Run as an HTTP server and connect from any language. Deploy to E2B, Daytona, Vercel, or your own infrastructure.

terminal
$ curl -fsSL \
    https://releases.rivet.dev/sandbox-agent/latest/install.sh | sh

Open Source

Full control

Clone the repo and build with Cargo. Customize, contribute, or embed directly in your Rust project.

terminal
$ git clone https://github.com/rivet-dev/sandbox-agent
$ cd sandbox-agent
$ cargo run -p sandbox-agent --release

Built-in Debugger

Inspect sessions, view event payloads, and troubleshoot without writing code.

Sandbox Agent Inspector
Open Inspector

Frequently Asked Questions

Common questions about running agents in sandboxes.