What is a sandbox snapshot?
A sandbox snapshot is a saved copy of a sandbox's machine that you can start new sandboxes from later, as many times as you like.
On Runtime a snapshot keeps the whole machine, is copied off its server as soon as it is taken, and costs $0.08 per decimal GB per 30-day month on the bytes it alone stores (rate in force since 23 September 2026). Blocks two of your snapshots share count once (pricing).
Why AI agents use snapshots
Setting a machine up is often the slowest part of an agent's task: cloning a repository, installing its dependencies, building it, starting a database. A snapshot lets you do that once. Every later task starts from the prepared machine instead of repeating the setup, which suits evaluation runs, reinforcement learning environments and per-user workspaces that should all begin from the same known state.
Snapshot, pause, fork and image
| Mechanism | What it keeps | What you do with it |
|---|---|---|
| Pause | Files, memory and processes of one sandbox | Wake the same sandbox later, on the same host |
| Snapshot | A saved copy of a sandbox | Start new sandboxes from it, any time later |
| Fork | Files, memory and running processes | Running copies now, 1 to 10 at a time |
| Custom image | A filesystem built from a recipe or Dockerfile | Start every sandbox with dependencies installed |
Runtime's snapshots in facts
| Fact | Value |
|---|---|
| Price | $0.08 per decimal GB per 30-day month, 119 microdollars per GiB-hour |
| Charged on | The bytes the snapshot alone stores |
| Retention | 7 days by default; 1 to 365 days with retentionDays |
| Durability | Copied off its server, encrypted, as soon as it is ready, at no extra charge |
| Taking one | Pauses a running sandbox for about a second when fresh, then wakes it |
| Where it lives | On its source's server, where sandboxes started from it run |
| Volumes | A sandbox with volumes cannot be snapshotted |
A snapshot's rate is fixed when you make it and never changes. If its server is lost, the snapshot is restored from its copy onto another (storage and backups).
Take one and start from it
TypeScriptimport { Runtime, Sandbox } from "withruntime";const runtime = new Runtime();await using base = await Sandbox.create();await base.exec("pip install --quiet requests");const snapshot = await base.snapshot({ name: "with-requests", retentionDays: 7 });await using later = await runtime.sandboxes.create({ snapshot: snapshot.id });await runtime.snapshots.delete(snapshot.id);Pythonfrom withruntime import Runtimeruntime = Runtime()with runtime.sandboxes.create() as base: base.exec("pip install --quiet requests") snapshot = base.snapshot(name="with-requests", retention_days=7) with runtime.sandboxes.create(snapshot=snapshot["id"]): pass runtime.snapshots.delete(snapshot["id"])From the CLI, runtime sandbox snapshot <id> --name ready takes one and
runtime sandbox create --snapshot <snapshot> starts from it
(CLI). The full reference is in
snapshots and forks.
Related
- What is a sandbox fork?
- What is a cold start?
- How to pause and resume a sandbox
- Agent evals and SWE-bench
- RL environments
Facts on this page were checked on 25 September 2026.