[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74980":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":36,"readmeContent":37,"aiSummary":38,"trendingCount":16,"starSnapshotCount":16,"syncStatus":39,"lastSyncTime":40,"discoverSource":41},74980,"sandbox-agent","rivet-dev\u002Fsandbox-agent","rivet-dev","Run Coding Agents in Sandboxes. Control Them Over HTTP. Supports Claude Code, Codex, OpenCode, and Amp.","https:\u002F\u002Fsandboxagent.dev",null,"TypeScript",1425,106,9,39,0,4,11,62,12,19.09,"Apache License 2.0",false,"main",[26,27,28,29,30,31,32,33,34,35],"agent","ai","amp","claude","claude-code","codex","daytona","e2b","opencode","sandbox","2026-06-12 02:03:30","\u003Cp align=\"center\">\n  \u003Cimg src=\".github\u002Fmedia\u002Fbanner.png\" alt=\"Sandbox Agent SDK\" \u002F>\n\u003C\u002Fp>\n\n\u003Ch3 align=\"center\">Run Coding Agents in Sandboxes. Control Them Over HTTP.\u003C\u002Fh3>\n\n\u003Cp align=\"center\">\n  A server that runs inside your sandbox. Your app connects remotely to control Claude Code, Codex, OpenCode, Cursor, Amp, or Pi — streaming events, handling permissions, managing sessions.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fsandboxagent.dev\u002Fdocs\">Documentation\u003C\u002Fa> — \u003Ca href=\"https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fapi-reference\">API Reference\u003C\u002Fa> — \u003Ca href=\"https:\u002F\u002Frivet.dev\u002Fdiscord\">Discord\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cem>\u003Cstrong>Experimental:\u003C\u002Fstrong> \u003Ca href=\".\u002Fgigacode\u002F\">Gigacode\u003C\u002Fa> — use OpenCode's TUI with any coding agent.\u003C\u002Fem>\n\u003C\u002Fp>\n\n## Why Sandbox Agent?\n\nRunning coding agents remotely is hard. Existing SDKs assume local execution, SSH breaks TTY handling and streaming, and every agent has a different API. Building from scratch means reimplementing everything for each coding agent.\n\nSandbox Agent solves three problems:\n\n1. **Coding agents need sandboxes** — You can't let AI execute arbitrary code on your production servers. Coding agents need isolated environments, but existing SDKs assume local execution. Sandbox Agent is a server that runs inside the sandbox and exposes HTTP\u002FSSE.\n\n2. **Every coding agent is different** — Claude Code, Codex, OpenCode, Cursor, Amp, and Pi each have proprietary APIs, event formats, and behaviors. Swapping agents means rewriting your integration. Sandbox Agent provides one HTTP API — write your code once, swap agents with a config change.\n\n3. **Sessions are ephemeral** — Agent transcripts live in the sandbox. When the process ends, you lose everything. Sandbox Agent streams events in a universal schema to your storage. Persist to Postgres, ClickHouse, or [Rivet](https:\u002F\u002Frivet.dev). Replay later, audit everything.\n\n## Features\n\n- **Universal Agent API**: Single interface to control Claude Code, Codex, OpenCode, Cursor, Amp, and Pi with full feature coverage\n- **Universal Session Schema**: Standardized schema that normalizes all agent event formats for storage and replay\n- **Runs Inside Any Sandbox**: Lightweight static Rust binary. One curl command to install inside E2B, Daytona, Modal, Cloudflare Containers, Agent Computer, or Docker\n- **Server or SDK Mode**: Run as an HTTP server or embed with the TypeScript SDK\n- **OpenAPI Spec**: [Well documented](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fapi-reference) and easy to integrate from any language\n- **OpenCode SDK & UI Support** *(Experimental)*: [Connect OpenCode CLI, SDK, or web UI](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fopencode-compatibility) to control agents through familiar OpenCode tooling\n\n## Architecture\n\n![Agent Architecture Diagram](.\u002F.github\u002Fmedia\u002Fagent-diagram.gif)\n\nThe Sandbox Agent acts as a universal adapter between your client application and various coding agents. Each agent has its own adapter that handles the translation between the universal API and the agent-specific interface.\n\n- **Embedded Mode**: Runs agents locally as subprocesses\n- **Server Mode**: Runs as HTTP server from any sandbox provider\n\n[Architecture documentation](https:\u002F\u002Fsandboxagent.dev\u002Fdocs)\n\n## Components\n\n| Component | Description |\n|-----------|-------------|\n| **Server** | Rust daemon (`sandbox-agent server`) exposing the HTTP + SSE API |\n| **SDK** | TypeScript client with embedded and server modes |\n| **Inspector** | Built-in UI at inspecting sessions and events |\n| **CLI** | `sandbox-agent` (same binary, plus npm wrapper) mirrors the HTTP endpoints |\n\n## Get Started\n\nChoose the installation method that works best for your use case.\n\n### Skill\n\nInstall skill with:\n\n```bash\nnpx skills add rivet-dev\u002Fskills -s sandbox-agent\n```\n\n```bash\nbunx skills add rivet-dev\u002Fskills -s sandbox-agent\n```\n\n### TypeScript SDK\n\nImport the SDK directly into your Node or browser application. Full type safety and streaming support.\n\n**Install**\n\n```bash\nnpm install sandbox-agent@0.4.x\n```\n\n```bash\nbun add sandbox-agent@0.4.x\n# Optional: allow Bun to run postinstall scripts for native binaries (required for SandboxAgent.start()).\nbun pm trust @sandbox-agent\u002Fcli-linux-x64 @sandbox-agent\u002Fcli-linux-arm64 @sandbox-agent\u002Fcli-darwin-arm64 @sandbox-agent\u002Fcli-darwin-x64 @sandbox-agent\u002Fcli-win32-x64\n```\n\n**Setup**\n\nLocal (embedded mode):\n\n```ts\nimport { SandboxAgent } from \"sandbox-agent\";\n\nconst client = await SandboxAgent.start();\n```\n\nRemote (server mode):\n\n```ts\nimport { SandboxAgent } from \"sandbox-agent\";\n\nconst client = await SandboxAgent.connect({\n  baseUrl: \"http:\u002F\u002F127.0.0.1:2468\",\n  token: process.env.SANDBOX_TOKEN,\n});\n```\n\n**API Overview**\n\n```ts\nconst agents = await client.listAgents();\n\nawait client.createSession(\"demo\", {\n  agent: \"codex\",\n  agentMode: \"default\",\n});\n\nawait client.postMessage(\"demo\", { message: \"Hello from the SDK.\" });\n\nfor await (const event of client.streamEvents(\"demo\", { offset: 0 })) {\n  console.log(event.type, event.data);\n}\n```\n\n[SDK documentation](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fsdks\u002Ftypescript) — [Managing Sessions](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fmanage-sessions)\n\n### HTTP Server\n\nRun as an HTTP server and connect from any language. Deploy to E2B, Daytona, Vercel, or your own infrastructure.\n\n```bash\n# Install it\ncurl -fsSL https:\u002F\u002Freleases.rivet.dev\u002Fsandbox-agent\u002F0.4.x\u002Finstall.sh | sh\n# Run it\nsandbox-agent server --token \"$SANDBOX_TOKEN\" --host 127.0.0.1 --port 2468\n```\n\nOptional: preinstall agent binaries (no server required; they will be installed lazily on first use if you skip this):\n\n```bash\nsandbox-agent install-agent --all\n```\n\nTo disable auth locally:\n\n```bash\nsandbox-agent server --no-token --host 127.0.0.1 --port 2468\n```\n\n[Quickstart](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fquickstart) — [Deployment guides](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fdeploy)\n\n### CLI\n\nInstall the CLI wrapper (optional but convenient):\n\n```bash\nnpm install -g @sandbox-agent\u002Fcli@0.4.x\n```\n\n```bash\n# Allow Bun to run postinstall scripts for native binaries.\nbun add -g @sandbox-agent\u002Fcli@0.4.x\nbun pm -g trust @sandbox-agent\u002Fcli-linux-x64 @sandbox-agent\u002Fcli-linux-arm64 @sandbox-agent\u002Fcli-darwin-arm64 @sandbox-agent\u002Fcli-darwin-x64 @sandbox-agent\u002Fcli-win32-x64\n```\n\nCreate a session and send a message:\n\n```bash\nsandbox-agent api sessions create my-session --agent codex --endpoint http:\u002F\u002F127.0.0.1:2468 --token \"$SANDBOX_TOKEN\"\nsandbox-agent api sessions send-message my-session --message \"Hello\" --endpoint http:\u002F\u002F127.0.0.1:2468 --token \"$SANDBOX_TOKEN\"\nsandbox-agent api sessions send-message-stream my-session --message \"Hello\" --endpoint http:\u002F\u002F127.0.0.1:2468 --token \"$SANDBOX_TOKEN\"\n```\n\nYou can also use npx like:\n\n```bash\nnpx @sandbox-agent\u002Fcli@0.4.x --help\n```\n\n```bash\nbunx @sandbox-agent\u002Fcli@0.4.x --help\n```\n\n[CLI documentation](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fcli)\n\n### Inspector\n\nDebug sessions and events with the built-in Inspector UI (e.g., `http:\u002F\u002Flocalhost:2468\u002Fui\u002F`).\n\n![Sandbox Agent Inspector](.\u002F.github\u002Fmedia\u002Finspector.png)\n\n[Inspector documentation](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Finspector)\n\n### OpenAPI Specification\n\n[Explore API](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fapi-reference) — [View Specification](https:\u002F\u002Fgithub.com\u002Frivet-dev\u002Fsandbox-agent\u002Fblob\u002Fmain\u002Fdocs\u002Fopenapi.json)\n\n### Tip: Extract credentials\n\nOften you need to use your personal API tokens to test agents on sandboxes:\n\n```bash\nsandbox-agent credentials extract-env --export\n```\n\nThis prints environment variables for your OpenAI\u002FAnthropic\u002Fetc API keys to test with Sandbox Agent SDK.\n\n## FAQ\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Does this replace the Vercel AI SDK?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nNo, they're complementary. AI SDK is for building chat interfaces and calling LLMs. This SDK is for controlling autonomous coding agents that write code and run commands. Use AI SDK for your UI, use this when you need an agent to actually code.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Which coding agents are supported?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nClaude Code, Codex, OpenCode, Cursor, Amp, and Pi. The SDK normalizes their APIs so you can swap between them without changing your code.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>How is session data persisted?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThis SDK does not handle persisting session data. Events stream in a universal JSON schema that you can persist anywhere. See [Managing Sessions](https:\u002F\u002Fsandboxagent.dev\u002Fdocs\u002Fmanage-sessions) for patterns using Postgres or [Rivet Actors](https:\u002F\u002Frivet.dev).\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Can I run this locally or does it require a sandbox provider?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nBoth. Run locally for development, deploy to E2B, Daytona, or Vercel Sandboxes for production.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Does it support [platform]?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nThe server is a single Rust binary that runs anywhere with a curl install. If your platform can run Linux binaries (Docker, VMs, etc.), it works. See the deployment guides for E2B, Daytona, and Vercel Sandboxes.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Can I use this with my personal API keys?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nYes. Use `sandbox-agent credentials extract-env` to extract API keys from your local agent configs (Claude Code, Codex, OpenCode, Amp, Pi) and pass them to the sandbox environment.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Why Rust and not [language]?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nRust gives us a single static binary, fast startup, and predictable memory usage. That makes it easy to run inside sandboxes or in CI without shipping a large runtime, such as Node.js.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Why can't I just run coding agents locally?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nYou can for development. But in production, you need isolation. Coding agents execute arbitrary code — that can't happen on your servers. Sandboxes provide the isolation; this SDK provides the HTTP API to control coding agents remotely.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>How is this different from the agent's official SDK?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nOfficial SDKs assume local execution. They spawn processes and expect interactive terminals. This SDK runs a server inside a sandbox that you connect to over HTTP — designed for remote control from the start.\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cstrong>Why not just SSH into the sandbox?\u003C\u002Fstrong>\u003C\u002Fsummary>\n\nCoding agents expect interactive terminals with proper TTY handling. SSH with piped commands breaks tool confirmations, streaming output, and human-in-the-loop flows. The SDK handles all of this over a clean HTTP API.\n\u003C\u002Fdetails>\n\n## Out of Scope\n\n- **Storage of sessions on disk**: Sessions are already stored by the respective coding agents on disk. It's assumed that the consumer is streaming data from this machine to an external storage, such as Postgres, ClickHouse, or Rivet.\n- **Direct LLM wrappers**: Use the [Vercel AI SDK](https:\u002F\u002Fai-sdk.dev\u002Fdocs\u002Fintroduction) if you want to implement your own agent from scratch.\n- **Git Repo Management**: Just use git commands or the features provided by your sandbox provider of choice.\n- **Sandbox Provider API**: Sandbox providers have many nuanced differences in their API, it does not make sense for us to try to provide a custom layer. Instead, we opt to provide guides that let you integrate this repository with sandbox providers.\n\n## Roadmap\n\n- [ ] Python SDK\n- [ ] Automatic MCP & skill & hook configuration\n- [ ] Todo lists\n","Sandbox Agent 是一个用于在沙箱环境中运行编码代理并通过HTTP控制它们的工具。它支持Claude Code、Codex、OpenCode和Amp等多种编码代理。项目的核心功能包括提供统一的API接口来控制不同的编码代理，标准化会话模式以实现事件格式的一致性存储与回放，并且能够在任何沙箱内运行，如E2B、Daytona或Docker等。此外，Sandbox Agent还提供了服务器模式和SDK模式供开发者选择，以及详细的OpenAPI文档便于集成。此工具非常适合需要在一个隔离安全的环境中测试或使用AI编码助手的企业和个人开发者，特别是当面临不同编码代理之间切换时无需重写大量代码的情况。",2,"2026-06-11 03:51:49","high_star"]