Snapshots let you create a persistent point-in-time capture of a running sandbox, including both its filesystem and memory state. You can then use a snapshot to spawn new sandboxes that start from the exact same state. The original sandbox continues running after the snapshot is created, and a single snapshot can be used to create many new sandboxes.Documentation Index
Fetch the complete documentation index at: https://e2b.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Snapshots require templates with envd versionv0.5.0 or above. If you are using a custom template created before envd v0.5.0, you need to rebuild it.
You can check the template envd version using the e2b template list command or by viewing the templates list on the dashboard.
Snapshots vs. Pause/Resume
| Pause/Resume | Snapshots | |
|---|---|---|
| Effect on original sandbox | Pauses (stops) the sandbox | Sandbox briefly pauses, then continues running |
| Relationship | One-to-one — resume restores the same sandbox | One-to-many — snapshot can spawn many new sandboxes |
| Use case | Suspend and resume a single sandbox | Create a reusable checkpoint |
Snapshot flow
The sandbox is briefly paused during the snapshot process but automatically returns to running state. The sandbox ID stays the same after the snapshot completes.Create a snapshot
You can create a snapshot from a running sandbox instance.Create a sandbox from a snapshot
The snapshot ID can be used directly withSandbox.create() to spawn a new sandbox from the snapshot. The new sandbox starts with the exact filesystem and memory state captured in the snapshot.
List snapshots
You can list all snapshots. The method returns a paginator for iterating through results.Filter by sandbox
You can filter snapshots created from a specific sandbox.Delete a snapshot
Snapshots vs. Templates
Both snapshots and templates create reusable starting points for sandboxes, but they solve different problems.| Templates | Snapshots | |
|---|---|---|
| Defined by | Declarative code (Template builder) | Capturing a running sandbox |
| Reproducibility | Same definition produces the same sandbox every time | Captures whatever state exists at that moment |
| Best for | Repeatable base environments | Checkpointing, rollback, forking runtime state |
Use cases
- Checkpointing agent work — an AI agent has loaded data and produced partial results in memory. Snapshot it so you can resume or fork from that point later.
- Rollback points — snapshot before a risky or expensive operation (running untrusted code, applying a migration, refactoring a web app). If it fails, rollback - spawn a fresh sandbox from the snapshot before the operation happened.
- Forking workflows — spawn multiple sandboxes from the same snapshot to explore different approaches in parallel.
- Cached sandboxes — avoid repeating expensive setup by snapshotting a sandbox that has already loaded a large dataset or started a long-running process.
- Sharing state — one user or agent configures an environment interactively, snapshots it, and others start from that exact state.