Spawnbox gives each AI agent its own small, safe computer to run code in. It is open source and runs on your own servers. A new one is ready in less than 100 ms. Your API keys never go inside.
Every agent gets its own box. Scroll to see how it works.
HOW ONE SANDBOX WORKSYOUR AI AGENTasks for a sandboxstart oneITS OWN SMALL COMPUTERSTART/STOPINTERNETFILESLOGREADY IN ABOUT 8 msagent's code runs hereAPI key:fake-key (not real)OpenAIopenai.comreal key added ✓GitHubgithub.com allowed ✓the rest blocked ✕YOUR OWN SERVERNOT OUR CLOUD
STEP 1 — YOUR AGENT
Your agent asks for a sandbox.
One API call or one command. A fresh, empty computer is ready in about 8 ms.
From code
POST /v1/sandboxes
From a terminal
spawnbox create
STEP 2 — THE SANDBOX
Each agent gets its own small computer.
It is a tiny virtual machine. If the agent breaks something, only its own sandbox breaks.
Pause it
spawnbox pause $S
Show a web app
spawnbox ports publish $S 3000
Copy files in
spawnbox cp ./src $S:/workspace/src
Watch what it does
spawnbox events --follow
STEP 3 — KEYS AND INTERNET
Your API keys never go inside.
The agent sees a fake key. When it calls OpenAI, Spawnbox puts the real key in on the way out. Other sites get only the fake one.
The agent sees
sbx_ph_... (a fake key)
Allowed sites
github.com, *.pypi.org
Every other site
blocked
STEP 4 — YOUR SERVER
It all runs on your own server.
Install it with one script on a Linux machine. Nothing goes to our cloud.
Works best on
Linux with KVM
Also works on
machines without KVM
Need more room?
add more servers
0206
What you can run
A sandbox is a full Linux computer. If it runs on Linux, it runs in Spawnbox.
TERMINALClaude CodeclaudeCodexcodexCopilotcopilot
› fix the failing test
- return total
+ return round(total, 2)
✓ 14 tests passed
Coding agents
Run Claude Code, Codex or Copilot CLI on a real repo. Let them install packages and run tests. If they break something, only the sandbox breaks. Your API keys stay outside.
DESKTOP · CHROMIUMChrome
Book
Browser and computer use
Give an agent its own browser, or a whole desktop you add to its template. It clicks, types, fills forms and uses apps. It can only reach the sites you allow, and every visit is logged.
●https://my-app.preview.example.comNext.jsVite
Real web apps
Run the Next.js or Vite app you ship to Vercel, or one you made in Lovable. Start it with npm run dev, publish port 3000, and open the link.
0306
Everything it can do today
23 features in six groups. Coming later: TypeScript and Python SDKs, an MCP server and disk speed limits.
Run code
SB-01
Sandboxes
Start, list, look at and delete sandboxes. Give each one a time limit, settings and labels.
SB-02
Commands
Run any command. Get the result at the end, or watch it live. Type input into it.
SB-03
Files
Read, write, list and delete files and folders.
SB-04
Terminals
Open a live terminal into the sandbox.
SB-05
Browser sessions
Share a short-lived link to one sandbox's terminal and web apps. No API key needed.
SB-06
Git
Download code from Git. Private repos work with a saved secret.
Get ready
SB-07
Templates
Save a starting setup with your tools already installed. Start from Debian, a Docker image or devcontainer.json.
SB-08
Spare sandboxes
Keep spares ready and waiting. A new sandbox starts in about 8 ms. The number of spares grows and shrinks with use.
SB-09
Build store
Store templates in S3-compatible storage. Build each one only once. A sandbox can start before the whole template has downloaded.
SB-10
Volumes
Keep files after a sandbox ends. Share one read-only folder with many sandboxes.
Save and copy
SB-11
Pause and resume
Pause a sandbox and save everything to disk. Wake it up in about 65 ms. Idle sandboxes pause by themselves.
SB-12
Copy and save
Make up to 16 copies of a running sandbox in under 1 s. Save it as a template without stopping it.
Internet
SB-13
Preview links
Open a web app that runs in a sandbox from a link. The link can be public, need a token, or be private.
SB-14
Site rules
Choose which websites a sandbox can reach: all, some or none. Limit its speed. Log every connection.
SB-15
Secrets
Your API keys stay locked outside the sandbox. They are added to requests only for sites you allow.
Grow
SB-16
More servers
Add servers when you need room. Each new sandbox goes to the server with the most space. Empty a server before you remove it.
SB-17
Two backends
Uses Firecracker on servers with KVM, and gVisor on servers without it. You can require Firecracker for a customer.
SB-18
Many customers
Serve many customers from one install. Each gets its own keys, limits, templates, secrets and site rules.
Watch and manage
SB-19
Activity log
A log of everything an agent does: commands, file changes, connections and key use. Watch it live or send it to OpenTelemetry.
SB-20
Metrics
Numbers for each server, ready for Prometheus: start times, errors, connections and free space.
SB-21
Usage
See how much CPU, memory, disk and network each customer and sandbox used, hour by hour.
SB-22
CLI
One spawnbox command does it all: sandboxes, files, templates, secrets, customers and logs.
SB-23
Easy to run
Install with one script. Runs as a normal system service with HTTPS. Comes back by itself after a crash.
0406
Everything your agent needs
Inside its sandbox, an agent can run code, use the internet, keep files and use your keys safely. You can watch it, pause it or copy it.
TERMINAL
›
Run code
Run any command and watch the output live. Or open a full terminal.
:3000● https://{label}.preview.example.com
:8080you choose who can open it
SITES IT CAN REACH
allowgithub.com
allow*.pypi.org
blockevery other site
Internet
Share a web app with a link. Pick which sites the agent can reach. Every connection is logged.
/workspace
src/
main.py
out.txt ● written · now
/data ⟶ kept after the end
Files
Put files in and take files out. Keep a folder after the sandbox is gone.
sandbox.createdsbx_c7mty9fysaf0t3d5
exec.startedpython3 main.py
net.dnspypi.org
net.connectiongithub.com:443
secret.injectedapi.openai.com
file.written/workspace/out.txt
net.blockedexample.org
exec.finishedexit 0
sandbox.pausedidle
sandbox.createdsbx_c7mty9fysaf0t3d5
exec.startedpython3 main.py
net.dnspypi.org
net.connectiongithub.com:443
secret.injectedapi.openai.com
file.written/workspace/out.txt
net.blockedexample.org
exec.finishedexit 0
sandbox.pausedidle
Activity log
See every step the agent takes, live. Send it to your own tools with OpenTelemetry.
IN THE SANDBOXAPI key = fake-key
SENT TO OpenAI openai.comAPI key = real key ••••
Safe API keys
The agent only sees a fake key. Spawnbox swaps in the real one on the way to sites you allow.
RUNNINGPAUSEDSAVED TO DISKAWAKE AGAIN≈ 65 msSAVED COPYCOPIES · UP TO 16
Pause, wake, copy
Idle sandboxes pause by themselves to save room. Wake one up, save it, or make copies.
Claude CodeClaude CodeClaude CodeClaude Codespawnbox fork $S --count 3
Copy a sandbox
Make up to 16 copies of a running sandbox, with everything in it, in under 1 s.
Add servers when you need more room. You talk to one main server, and it starts each sandbox on the server with the most space.
0506
How it compares
We checked each project's own website on 8 Nov 2026. Spawnbox is not the cheapest cloud or the fastest start. It is made to be easy to run yourself, to serve many customers, and to log everything agents do.