Vercel Sandbox now supports filesystem snapshots to capture your state. You can capture a Sandbox's complete filesystem state as a snapshot and launch new Sandboxes from that snapshot using the Sandbox API.
This eliminates repeated setup when working with expensive operations like dependency installation, builds, or fixture creation. Create the environment once, snapshot it, then reuse that exact filesystem state across multiple isolated runs.
Copy link to headingHow snapshots work
Snapshots capture the entire filesystem of a running Sandbox. New Sandboxes can launch from that snapshot, providing immediate access to pre-installed dependencies and configured environments.
Copy link to headingKey capabilities
Create a snapshot from any running Sandbox with
sandbox.snapshot()Launch new Sandboxes from snapshots via
source: { type: 'snapshot', snapshotId }Reuse the same snapshot with multiple Sandboxes for parallel testing and experimentation
import { Sandbox } from '@vercel/sandbox';
const sandbox = await Sandbox.create();await sandbox.writeFiles([{ path: '/vercel/sandbox/hello', content: Buffer.from('Hello Vercel Sandbox and Snapshots'),}]);const snapshot = await sandbox.snapshot();
const newSandbox = await Sandbox.create({ source: { type: 'snapshot', snapshotId: snapshot.snapshotId },});for await (const chunk of await newSandbox.readFile({ path: '/vercel/sandbox/hello' })) { process.stdout.write(chunk);};See the documentation to get started with snapshots.
Reference Architecture
Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.
- Agent stack: Build and operate agents with models, tools, and durable workflows.
- Web applications: Choose rendering, data, authentication, and caching approaches.
- Backends: Choose a runtime, connect services, and run background work.
Build with prompts
Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.