# I need to run code in a sandbox

> Run code an agent writes in an isolated container or microVM, away from your machine.

The best fits to run code in a sandbox on Agent Switchboard, as of 20 Nov 2026: Vercel Sandbox, Baseten Sandboxes and CubeSandbox, of 58 tools that do it.

## Quick answers

- **Which official tools run code in a sandbox?** Vercel Sandbox, Baseten Sandboxes and CubeSandbox, among 26 that are official.
- **Which have a hosted MCP server?** Base44 MCP, Rivet and Orgo.
- **Which need no API key or sign-in?** CubeSandbox, Agent Substrate and BoxLite, among 17 that need none.

## Best fits

1. [Vercel Sandbox](https://agentswitchboard.dev/agents/vercel-sandbox) (api, cli · Official): Isolated MicroVMs: Runs each sandbox in a Firecracker microVM with its own filesystem and network.
2. [Baseten Sandboxes](https://agentswitchboard.dev/agents/baseten-sandboxes) (api, cli, mcp · Official): Manage Sandboxes: Creates, lists, updates, and deletes sandboxes through the Management API, the SDKs, the Baseten CLI, or the dashboard.
3. [CubeSandbox](https://agentswitchboard.dev/agents/cube-sandbox) (api · Official): Snapshot Clone Rollback: Checkpoints running sandboxes with the CubeCoW copy-on-write engine, then rolls back to or forks from any saved state.
4. [Perplexity SPACE](https://agentswitchboard.dev/agents/perplexity-space) (api, cli · Official): Sandbox Lifecycle: Creates sandboxes from templates and pauses, suspends, wakes or deletes them through asynchronous operations you poll.
5. [Render Sandboxes](https://agentswitchboard.dev/agents/render-sandboxes) (api, cli · Official): Create Sandbox: Creates a sandbox with a chosen compute plan, runtime and idle timeouts, environment variables, and outbound network rules.
6. [Tensorlake](https://agentswitchboard.dev/agents/tensorlake) (api, cli): Run Code Sandboxes: Create isolated MicroVM sandboxes, run commands and processes, stream output and copy files in and out for agent code.
7. [Sandbox0](https://agentswitchboard.dev/agents/sandbox0) (api, cli): Create Sandbox: Provisions an isolated cloud sandbox for running untrusted or agent-generated code via the REST API or CLI.
8. [OpenSandbox](https://agentswitchboard.dev/agents/opensandbox) (api, mcp, cli): Sandbox Lifecycle Management: Creates, times out, and kills container sandboxes from a chosen image through one lifecycle API on Docker or Kubernetes.
9. [Docker Sandboxes](https://agentswitchboard.dev/agents/docker-sandboxes) (api, cli · Official): Disposable, isolated container sandboxes for running untrusted agent-generated code, with filesystem and network isolation managed by Docker.
10. [Agent Substrate](https://agentswitchboard.dev/agents/agent-substrate) (api, cli): Sandbox Execution: Runs untrusted agent-generated code inside an isolated microVM with a strict syscall boundary.
11. [BoxLite](https://agentswitchboard.dev/agents/boxlite) (api, cli): Isolated Code Execution: Runs commands in a per-box hardware-virtualized VM with streamed stdout and stderr, PTY support, and timeouts.
12. [smolvm](https://agentswitchboard.dev/agents/smolvm) (cli, api): Sandboxes AI agents in branchable local microVMs, with Node, Python, Rust and Go SDKs and a hosted cloud.

All 58, with filters: https://agentswitchboard.dev/browse?task=run-code-in-a-sandbox

## For agents

- This task as JSON: https://agentswitchboard.dev/api/tasks/run-code-in-a-sandbox
- One pick for your user's need, with the next step: https://agentswitchboard.dev/api/recommend?need=run%20code%20in%20a%20sandbox (or the `recommend` MCP tool at https://agentswitchboard.dev/api/mcp)
- Every task: https://agentswitchboard.dev/tasks · the whole site: https://agentswitchboard.dev/llms.txt

Updated 20 Nov 2026 with the weekly drop. Ranked by how well each listing matches the task, never by payment. Page: https://agentswitchboard.dev/tasks/run-code-in-a-sandbox
