Skip to content

Commit a777176

Browse files
committed
docs: use detailed state diagram on overview and clarify auto-resume requires opt-in
1 parent cabc5f5 commit a777176

1 file changed

Lines changed: 13 additions & 7 deletions

File tree

docs/sandbox.mdx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,26 @@ description: "E2B sandboxes are persistent, secure cloud environments for AI age
88
An E2B sandbox is a persistent, secure cloud environment where your AI agents execute code, run commands, manage files, and access the internet. Every sandbox supports **pause and resume** — when a sandbox times out, it can automatically pause and preserve its full state (filesystem and memory), then resume exactly where it left off when activity arrives.
99

1010
```mermaid actions={false}
11-
flowchart LR
12-
start(( )) -->|create| Running
13-
Running -->|timeout or pause| Paused
14-
Paused -->|connect or auto‑resume| Running
15-
Running -->|snapshot| Snapshotting
16-
Snapshotting -->|complete| Running
11+
flowchart TD
12+
start(( )) -->|Sandbox.create| Running
13+
14+
Running["<b>Running</b><br/>• Active execution<br/>• Consumes resources"]
15+
Paused["<b>Paused</b><br/>• Preserves memory and files<br/>• Cannot execute code"]
16+
Snapshotting["<b>Snapshotting</b><br/>• Creates persistent snapshot<br/>• Briefly pauses execution"]
17+
Killed["<b>Killed</b><br/>• Resources released<br/>• Cannot be resumed"]
18+
19+
Running -->|pause| Paused
20+
Running -->|createSnapshot| Snapshotting
21+
Paused -->|connect| Running
22+
Snapshotting -->|snapshot complete| Running
1723
Running -->|kill| Killed
1824
Paused -->|kill| Killed
1925
```
2026

2127
## Key characteristics
2228

2329
- **Persistent by default** — configure `onTimeout: 'pause'` and sandboxes preserve their full state (filesystem + memory) indefinitely. Resume at any time.
24-
- **Auto-resume** — paused sandboxes wake automatically when SDK calls or HTTP traffic arrive. No manual state management needed.
30+
- **Auto-resume**when [enabled](/docs/sandbox/persistence#auto-pause-and-auto-resume), paused sandboxes wake automatically when SDK calls or HTTP traffic arrive. No manual state management needed.
2531
- **Snapshots** — capture a running sandbox's state and spawn multiple new sandboxes from it. Useful for checkpointing, forking, and rollback.
2632
- **Configurable timeouts** — sandboxes run for up to 24 hours (Pro) or 1 hour (Base) continuously. Pausing resets the runtime window.
2733
- **Isolated and secure** — each sandbox runs in its own microVM with network controls, access tokens, and rate limits.

0 commit comments

Comments
 (0)