Vercel Sandbox
A disposable isolated compute environment provided by Vercel, implemented on microVMs and used to run untrusted or short-lived code safely. It is designed to be temporary and does not retain runtime state.
Core Facts
sandbox-vercel provides code sandbox capabilities specifically for the Vercel platform, allowing code generated by AI models to be executed in an isolated container environment.
A Drive in Vercel Drives is a persistent volume independent of the Sandbox; the Sandbox associates it with a file system path via mounting, with reads and writes below the mount point landing on the Drive and those outside being temporary storage.
Vercel Sandbox is a one-off isolated compute environment; each creation allocates a new clean microVM instance, which is destroyed after the run ends, saving no runtime state.
Timeline (last 90 days)
Vercel Labs has open-sourced the screen-relay tool, which allows the desktop environment of a Vercel Sandbox to be streamed in real time to a browser.
screen-relay supports viewing and controlling the sandbox desktop directly in the browser without installing an additional client.
In Vercel Sandbox, stopping due to timeout usually means the task was not completed and requires a retry or extension strategy; stopping due to error may require an alert.
The sandbox.session.expiring event is emitted by default 1 minute before the session times out, and the lead time can be customized via expiryNotificationLeadTime.
Vercel Sandbox provides three subscribable session lifecycle webhook events: sandbox.session.started, sandbox.session.expiring, and sandbox.session.stopped.
After each session extension, Vercel triggers the sandbox.session.expiring event again 1 minute before the new timeout, forming a rolling warning.
Vercel explicitly notes that webhook events may be delivered more than once, so handlers must perform idempotent processing keyed by session ID.
The sandbox.session.stopped event includes the stop reason, whose value is requested, snapshot, timeout, exited, or error, along with session duration, active CPU time, and network transfer volume.
For expiring events, the handler should check against sandbox.expiresAt and run the renewal logic only when the new expiresAt is later than the last value recorded locally, so that stale warnings do not trigger duplicate renewals.
In the past, backends could only guess sandbox session state by polling; now they can passively receive webhook event signals.
40 more timeline events
All Facts (20)
sandbox-vercel provides code sandbox capabilities specifically for the Vercel platform, allowing code generated by AI models to be executed in an isolated container environment.
90%VerifiedA Drive in Vercel Drives is a persistent volume independent of the Sandbox; the Sandbox associates it with a file system path via mounting, with reads and writes below the mount point landing on the Drive and those outside being temporary storage.
65%VerifiedVercel Sandbox is a one-off isolated compute environment; each creation allocates a new clean microVM instance, which is destroyed after the run ends, saving no runtime state.
65%Partially VerifiedThe Vercel provider runs the agent and its task environment in two separate Sandboxes.
65%Partially VerifiedVercel provides a Python SDK that can call Vercel products such as Vercel Blob, Queues, Workflows, Sandbox, and the AI SDK for Python.
65%UnverifiedWhen the sandbox is stopped, the system saves files and conversation history, and after restarting you can continue from the last progress; active running processes will be stopped along with the sandbox.
60%UnverifiedVercel Sandbox is an isolated, ephemeral compute environment that provides each session with its own filesystem and shell, isolated from the host function and other tenants; it is suited to agent tasks that need a real filesystem, arbitrary command execution, or network access, but it has some startup latency and a limited default lifetime.
60%UnverifiedVercel Sandbox is suitable for scenarios such as code execution, CI tasks, or AI Agent tool calls
60%Unverifiedscreen-relay supports viewing and controlling the sandbox desktop directly in the browser without installing an additional client.
50%UnverifiedVercel explicitly notes that webhook events may be delivered more than once, so handlers must perform idempotent processing keyed by session ID.
50%UnverifiedFor expiring events, the handler should check against sandbox.expiresAt and run the renewal logic only when the new expiresAt is later than the last value recorded locally, so that stale warnings do not trigger duplicate renewals.
50%UnverifiedThe sandbox.session.expiring event is emitted by default 1 minute before the session times out, and the lead time can be customized via expiryNotificationLeadTime.
50%UnverifiedAfter each session extension, Vercel triggers the sandbox.session.expiring event again 1 minute before the new timeout, forming a rolling warning.
50%UnverifiedIn the past, backends could only guess sandbox session state by polling; now they can passively receive webhook event signals.
50%UnverifiedIn Vercel Sandbox, stopping due to timeout usually means the task was not completed and requires a retry or extension strategy; stopping due to error may require an alert.
50%UnverifiedVercel Sandbox provides three subscribable session lifecycle webhook events: sandbox.session.started, sandbox.session.expiring, and sandbox.session.stopped.
50%UnverifiedThe sandbox.session.stopped event includes the stop reason, whose value is requested, snapshot, timeout, exited, or error, along with session duration, active CPU time, and network transfer volume.
50%UnverifiedSecure Compute is a network isolation capability Vercel offers to Enterprise teams; once enabled, the team gets a dedicated VPC, and compute resources such as Vercel Functions, build containers and Sandbox all run inside that VPC.
50%UnverifiedThrough this integration, Vercel Functions, Vercel Sandbox, and network-connected build processes can access back-end services hosted on AWS via the AWS private network without exposing public internet traffic.
50%UnverifiedSandboxes created with the unified image runtime now come with 64 GB of storage.
50%