Skip to main content
Snapshots let you capture and duplicate box state. Use snapshots to save a point-in-time checkpoint you can restore later.

What’s included

A snapshot captures:
  • Filesystem: the full disk state of the box at the time of the snapshot.
  • Agent configuration: the agent harness, model, and API key settings.
A snapshot does not carry active schedules over to the new box.
Snapshots are the best way to preserve cloned repositories, installed dependencies, and prepared workspaces. If your box already has a repo checked out, restoring from a snapshot is usually faster than cloning it again.

API

Create a snapshot

Call snapshot() on a running or paused box. The returned Snapshot object contains the ID you need to restore later.
Snapshots are independent of the source box. Deleting the original box does not delete its snapshots. They remain available for restore at any time.

List snapshots

Retrieve all snapshots belonging to a box.

Delete a snapshot

Remove a snapshot by ID.

Restore from a snapshot

Box.fromSnapshot() provisions a new box with the exact state from the snapshot. The original box is unaffected. You can branch into multiple boxes from the same checkpoint.
The restored box starts with the same workspace state from the snapshot. You can also configure lifecycle settings such as keep-alive and init commands on the restored box.

Examples

Checkpoint before risky operations

Snapshot your working state, then let the agent attempt a large refactor. If the result is bad, we restore the original state and try a different prompt.

Reusable base environments

Install dependencies once, snapshot, then spawn boxes from the snapshot to skip setup time.

Fan-out from a single state

Clone a repo once, snapshot, then run different agents or prompts in parallel from the same starting point.