Sandbox Agent

Normal
GitHub TypeScript Apache-2.0

Description

Run coding agents in sandboxes. Control them over HTTP. Supports Claude Code, Codex, OpenCode, and Amp with isolated execution environments.

Key Features

  • Universal Agent API — single interface to control Claude Code, Codex, OpenCode, Cursor, Amp, and Pi
  • Universal Session Schema normalizing all agent event formats for storage and replay
  • Lightweight static Rust binary — runs inside E2B, Daytona, Modal, Cloudflare Containers, or Docker
  • Server or SDK mode — HTTP server or embeddable TypeScript SDK with full type safety
  • OpenAPI spec for easy integration from any programming language
  • Built-in Inspector UI for debugging sessions and events at /ui/ endpoint

Use Cases

💡 Run coding agents in isolated sandboxes for safe code execution on production infrastructure
💡 Build platforms that orchestrate multiple coding agents through a unified HTTP interface
💡 Persist agent session transcripts to Postgres or ClickHouse for audit and replay
💡 Swap between coding agents (Claude Code, Codex, etc.) with just a config change

Quick Start

1. Install: `npm install sandbox-agent@0.4.x` for SDK or use the install script for server.
2. Local embedded: `const client = await SandboxAgent.start()`.
3. Remote server: `sandbox-agent server --token $SANDBOX_TOKEN --host 127.0.0.1 --port 2468`.
4. Create session: `client.createSession('demo', { agent: 'codex' })`.
5. Send message and stream: `for await (const event of client.streamEvents('demo')) ...`.

Related Projects