Vercel Sandbox is an ephemeral compute primitive designed to safely run untrusted or user-generated code on Vercel. It supports dynamic, real-time workloads for AI agents, code generation, and developer experimentation.
Key Use Cases:
- Execute Untrusted Code: Safely run code from unverified sources, such as AI agent outputs or user uploads, without risking production systems.
- Build Dynamic Experiences: Create interactive tools that generate or modify code on the fly, like AI-powered UI builders or developer playgrounds.
- Isolated Backend Testing: Preview and test user-submitted or agent-generated code in a self-contained environment with access to logs and live previews.
- Run Development Servers: Test applications in an isolated environment.
Features:
- Supported Runtimes: Includes
node22
andpython3.13
images based on Amazon Linux 2023. - Package Management: Supports
npm
,pnpm
for Node.js andpip
,uv
for Python. Users can also install additional system packages usingdnf
. - Authentication: Integrates with Vercel OIDC tokens for seamless authentication or supports Vercel access tokens for other environments.
- Observability: Track sandbox usage, inspect command history, and view logs through the project's Observability tab in the Vercel dashboard.