Skip to main content
Checkpoints capture a sandbox’s full state (filesystem + memory). Fork new sandboxes from any checkpoint, or restore a sandbox to a previous point in time.

Create a Checkpoint

checkpoint = await sandbox.create_checkpoint("my-checkpoint")
# {"id": "uuid", "name": "my-checkpoint", "status": "processing"}

await sandbox.create_checkpoint(name)

name
str
required
A name for this checkpoint.
Returns: dict — status transitions from "processing" to "ready" once the snapshot is uploaded.

List Checkpoints

checkpoints = await sandbox.list_checkpoints()
Returns: list[dict]

Fork from a Checkpoint

Create a new sandbox from a checkpoint. The new sandbox boots with the checkpointed filesystem state.
fork = await Sandbox.create_from_checkpoint(
    checkpoint["id"],
    timeout=600,
)

result = await fork.commands.run("cat /root/data.txt")

Sandbox.create_from_checkpoint(checkpoint_id, **kwargs)

checkpoint_id
str
required
UUID of the checkpoint to fork from.
timeout
int
default:"300"
Sandbox TTL in seconds.
api_key
str | None
default:"None"
API key override.
api_url
str | None
default:"None"
API URL override.
Returns: Sandbox

Restore a Checkpoint

Revert a running sandbox to a previous checkpoint. The VM reboots with the checkpointed drives.
await sandbox.restore_checkpoint(checkpoint["id"])
Returns: None

Delete a Checkpoint

await sandbox.delete_checkpoint(checkpoint["id"])
Returns: None