Run Sandbox Agent inside E2B, then control it with the Sandbox Agent SDK (npm: sandbox-agent).
Running coding agents remotely is hard: local-first SDK assumptions, SSH streaming/TTY issues, and agent-specific APIs.
Sandbox Agent gives you a simple way to launch coding agents inside sandboxes and manage them over HTTP directly from your backend.
- Single API, Multiple Agents — Drive Claude Code, Codex, OpenCode, Cursor, Amp, and Pi from one unified interface with complete feature support — no need to build separate integrations for each.
- Standardized Event Schema — Every agent outputs events in its own format. The universal session schema brings them all into a single, normalized structure that's easy to persist and replay.
- Two Ways to Deploy — Use it as a self-contained HTTP server, or drop in the TypeScript SDK to embed it right inside your application.
- Install dependencies:
npm install- Create
.env:
E2B_API_KEY=your_e2b_api_key
# At least one provider key
OPENAI_API_KEY=your_openai_api_key
# ANTHROPIC_API_KEY=your_anthropic_api_keyProvider credential options for other agents: Sandbox Agent credentials docs.
- Run:
npm run startThis starts up your Sandbox Agent and connects it to your E2B Sandbox. To run one prompt and stream events, uncomment the block in src/index.ts.