Copy a working environment with Chalk sandbox snapshots
This demo shows how to fork a sandbox: write a file, select Split, and inspect the copy in the second terminal. Change one copy to see that the sandboxes evolve independently. The demo restores a new sandbox from a snapshot of the original.
Copy a file, then change only one sandbox
The snapshot includes files and in-memory state. Follow the file experiment below to check that the copies change independently after the split; commands are not mirrored between panes.
Try this experiment · expected results
1Create a file
Launch a sandbox, then write a value before making a copy.
echo original > /tmp/demo.txtExpected: The original sandbox has the file.
2Split and compare
Select Split. Run this in both terminal panes.
cat /tmp/demo.txtExpected: Both panes print original.
3Change only the fork
Run this in the new pane. Read the file in both panes again.
echo changed > /tmp/demo.txt cat /tmp/demo.txtExpected: The fork prints changed. The original still prints original.
Write a file or set a Python variable, then Split. Chalk copies the running sandbox; changes in either terminal should stay independent afterward.
Built on Chalk
Chalk snapshots and restores the sandbox, including its running process state. The example server connects a browser terminal to each copy so you can compare them.
Capture the prepared environment
A snapshot checkpoints a running host-backed sandbox, including its filesystem and memory. The original remains available while the snapshot is created.
Restore a separate sandbox
Create a new sandbox from the snapshot. Each restore has its own writable state, so later changes in one copy do not update another.
Keep the configured isolation
The fork uses the source’s sandbox specification, including its kernel, network policy, and resource limits. Copying state does not grant extra network access.
Reuse a starting point
Prepare dependencies or data once, then restore copies for experiments and evaluations. The example uses snapshot and restore API calls to create its additional terminal panes.
Fork a sandbox in two calls
Snapshot a running sandbox, then create a new sandbox from the snapshot. Restore the same snapshot as many times as you like; each restore is its own sandbox. Snapshots need a host-backed sandbox (ComputeClass.HOST).
The example calls the sandbox API directly with the SDK's credentials. Dedicated sandbox.snapshot() and snapshot.restore() methods are on their way to chalkcompute. To pause a sandbox rather than copy it, see the suspend demo.
git clone https://github.com/chalk-ai/sandbox-fork
cd sandbox-fork
# Or export CHALK_CLIENT_ID and CHALK_CLIENT_SECRET.
chalk login
# Builds the server image, starts a warm pool of sandboxes, prints your split terminal's URL.
./deploy.pyLet your agents explore in parallel
Talk to an engineer about snapshotting and forking sandboxes in your cloud, next to your data.