Architecture
Every box is a self-contained environment with four capabilities:| Capability | Description | Learn more |
|---|---|---|
| Shell | Execute OS-level commands directly via box.exec.command() | Shell |
| Filesystem | Upload, write, read, list, and download files inside the box | Filesystem |
| Git | Clone repos, inspect diffs, and open pull requests | Git |
| Agent | Run a coding agent (Claude Code) with run() or stream() | Agent |
Lifecycle

1. Created
When you create a box, a new isolated container is provisioned with its own filesystem, shell, and network stack. You can optionally restore from a snapshot at this point. The box is ready to receive commands immediately.2. Running
The box automatically enters Running state after creation. Your agent can run bash commands, read and write files, interact with git, and make outbound network requests.stdout and stderr stream back in real-time.
From Running, you can:
3. Paused
The box releases its compute resources but the filesystem and environment are preserved. You can resume the box by runningresume() or sending any command.
From Paused, you can also call delete() to destroy the box. Because we bill Upstash Box only on active CPU time, billing drops to an idle rate while paused.
4. Snapshot
Snapshots capture the full workspace state of a box (e.g. filesystem, installed packages, and environment) at a point in time. You can restore any snapshot into a new box to create checkpoints or a reusable environment. Learn more in Snapshots.5. Deleted
Callingdelete() permanently destroys the box and all its state. This is irreversible. If you need to preserve state, take a snapshot before deleting.
Any existing snapshots taken from the box are not affected by deletion.
Security & Isolation
Every box runs as its own Docker container with an independent filesystem, process tree, and network stack. Boxes cannot communicate with or observe each other. There is no shared state between them.
| Boundary | Guarantee |
|---|---|
| Filesystem | Each box has its own filesystem. No shared volumes between boxes. |
| Processes | Process trees are fully isolated. One box cannot signal or inspect another’s processes. |
| Network | Boxes can make outbound requests (HTTP, DNS) but cannot reach other boxes. |
Networking
Every box has full outbound network access. HTTP, HTTPS, DNS, WebSockets, and raw TCP are all available. Agents can call external APIs, download packages, pull container images, and interact with any public endpoint. Boxes run on AWS infrastructure with 22.5 Gbps network bandwidth per host. This means large file transfers, dataset downloads, and parallel API calls are fast by default.| Property | Detail |
|---|---|
| Bandwidth | 22.5 Gbps per host |
| Outbound | Full access, HTTP, HTTPS, DNS, WebSockets, TCP |
| Inbound | Not exposed. Boxes are not publicly addressable. |
| Inter-box | Isolated. Boxes cannot reach each other. |
| Latency | Single-digit ms to major cloud services (S3, GitHub, etc.) |
Agent
Every Upstash Box comes with built-in coding agent harnesses. You don’t need to bring your own agent framework or wire up tool calls. The box already knows how to give an agent access to its shell, filesystem, and git, and how to stream output back to you. We currently support Claude Code and Codex as native agents inside of a box. You choose a model when creating a box. For more details, see the Agent page.