Sandbar SDK
Sandbar is a server-side TypeScript SDK for creating sandboxes, running commands, and moving files across providers. Daytona, E2B, boxd and Vercel are separately installed adapters. Other providers can integrate through the public adapter API.
Start with Getting started to install the SDK, run your first command and clean up the sandbox.
Run OpenCode inside a sandbox with the runnable agent examples: capture a response or upload a file, ask the agent to edit it, and read it back. The guide includes checkout setup for Daytona and E2B.
Build with an agent
Section titled “Build with an agent”Copy a prompt to give your coding agent the right imports, examples, and constraints:
Use the command line
Section titled “Use the command line”The sandbar CLI creates, uses and cleans up sandboxes from your shell, with JSON output and exit codes designed for coding agents.
Use the SDK
Section titled “Use the SDK”| Task | Guide |
|---|---|
| Create a sandbox and run commands | Sandboxes and execution |
| Read and write files, capture output | Files and output |
| Stream process text or use a terminal | Processes and streaming |
| Access a sandbox HTTP service | HTTP previews |
| Choose an image or build one | Images and networking |
| Save snapshots or reuse volumes | Snapshots and volumes |
| Handle a timeout or lost response | Errors and recovery |
| Fix common setup issues | Troubleshooting |
Choose a provider
Section titled “Choose a provider”The Tested provider support matrix shows which operations have been exercised against real providers, along with the tested configuration and limits. Choose setup and limits for your adapter:
| Adapter | What you get |
|---|---|
| Daytona | Commands, files, processes, snapshots, volumes and suspend/resume. |
| E2B | Commands, files, processes, snapshots and suspend/resume. |
| boxd | Experimental. MicroVM sandboxes with commands, files and reconnecting to running sandboxes. |
| Boat | Experimental. Full Ubuntu VMs with commands, files, archive/resume, snapshots and renewal. |
| Runloop | Experimental; Runloop sign-ups are invite-only. Devboxes with blocked egress, snapshots and previews. |
| Vercel Sandbox | Short-lived Node 24 sandboxes with commands and files. |
| Modal | Experimental. Commands, files and processes in Modal sandboxes. |
For API details, use the TypeScript reference. To add a provider, start with Write an adapter.