Skip to Content

Run agent-generated code in isolation

Run untrusted or agent-generated code in isolated Linux microVMs. Use Vercel Sandbox for agent workflows, debugging, and one-off commands.


Run your first sandbox Read the CLI reference

Use sandboxes to:

  • Execute untrusted code safely: Run AI agent output, user uploads, or third-party scripts without exposing your production systems.
  • Build interactive tools: Create code playgrounds, AI-powered UI builders, or developer sandboxes.
  • Test in isolation: Preview how user-submitted or agent-generated code behaves in a self-contained environment with access to logs, file edits, and live previews.
  • Run development servers: Spin up and test applications with live previews.

Using Vercel Sandbox

The Sandbox SDKs are the recommended way to integrate Vercel Sandbox into your applications. They provide a programmatic interface to create sandboxes, run commands, and manage files.

  • JS SDK Reference: Use @vercel/sandbox for JavaScript and TypeScript
  • Python SDK Reference: Use vercel.sandbox from the vercel Python package
  • CLI: Use the sandbox CLI for manual testing, agentic workflows, debugging, and one-off operations

For end-to-end examples using these interfaces, browse the Vercel Sandbox guides.

Authentication

Vercel Sandbox supports two authentication methods:

  • Vercel OIDC tokens (recommended): Vercel generates the OIDC token that it associates with your Vercel project. For local development, run vercel link and vercel env pull to get a development token. In production on Vercel, authentication is automatic.
  • Access tokens: Use access tokens when VERCEL_OIDC_TOKEN is unavailable, such as in external CI/CD systems or non-Vercel environments.

To learn more on each method, see Authentication for complete setup instructions.

System specifications

Sandboxes run Linux images, with Ubuntu, Arch Linux, or any other Linux distribution you need. The default image is vercel/sandbox/universal, which includes the current Node.js LTS, Python 3.14, coding agents, and common utilities. You can use Vercel's managed images or your own custom images stored in Vercel Container Registry.

For detailed information about the sandbox environment, see Concepts.

Features

  • Isolation: Each sandbox runs in a secure Firecracker microVM with its own filesystem and network. Run untrusted code without affecting production.
  • Managed and custom images: Start sandboxes from Vercel's Managed Images, a shared or public image, or your own OCI images stored in Vercel Container Registry. Build your system packages and tooling into an image, and share it across projects and teams.
  • System-privileged processes: Run workloads that need system-level privileges, such as container runtimes like Docker, VPN clients, and FUSE filesystem drivers.
  • Fast startup: Sandboxes start in milliseconds, making them ideal for real-time user interactions and latency-sensitive workloads.
  • Multi-agent isolation: Give each AI agent its own Linux user with a private home directory, and share files between agents with groups.
  • Persistent sandboxes: Sandboxes that auto-save state on stop and resume where you left off. Persistence is the default. No manual snapshot management needed.
  • Snapshotting: Save the state of a running sandbox to resume later. Skip dependency installation on subsequent runs.
  • Tags: Categorize sandboxes by environment, team, or any other criteria using key-value tags.
  • Drives (beta): Attach persistent filesystem storage to sandboxes and reuse data across sandbox runs.
  • Mount remote storage: Mount an external object store such as Amazon S3 with a FUSE driver, and read and write remote files through the sandbox filesystem.
  • CLI and SDKs: Manage sandboxes through the CLI, JS SDK, or Python SDK. Automate sandbox workflows in your application.
  • Ubuntu with Node.js, Python, coding agents and utilities: By default, use Ubuntu with a large set of languages and tools available with full root access.

Cross-link map: Vercel Sandbox (/docs/sandbox)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesUnderstanding Sandboxes — Learn how Vercel Sandboxes provide on-demand, isolated compute environments for running untrusted code, testing applicatWorking with Sandbox — Task-oriented examples for common Vercel Sandbox operations in TypeScript and Python.Quickstart — Learn how to run your first code in a Vercel Sandbox.Run untrusted code with Vercel Sandbox, now generally availableRunning commands in a Vercel Sandbox — Create isolated sandbox environments to run builds, tests, and commands safely.This page links to (17)Vercel Container Registry — Store and manage Docker container images on Vercel. Build and push images with the Vercel CLI, then run them on Vercel FSandbox CLI Reference — Based on the Docker CLI, you can use the Sandbox CLI to manage your Vercel Sandbox from the command line.Understanding Sandboxes — Learn how Vercel Sandboxes provide on-demand, isolated compute environments for running untrusted code, testing applicatSandbox Authentication — Learn how to authenticate with Vercel Sandbox using OIDC tokens or access tokens.Drives — Persistent storage that can be mounted into sandboxes and shared across runs.Images — Start sandboxes from Vercel's Managed Images, or custom OCI images stored in Vercel Container Registry to ship your ownRun isolated AI agents in one sandbox — Give each AI agent an isolated Linux user in a Vercel Sandbox with the @vercel/sandbox createUser, createGroup, and asUsPersistence — Sandboxes automatically save their filesystem state when stopped and restore it when resumed. No manual snapshot managemSnapshots — Save and restore sandbox state with snapshots for faster startups and environment sharing.Tags — Categorize sandboxes by environment, team, or any other criteria using key-value tags.Ecosystem — Use Vercel Sandbox with the agent frameworks, model SDKs, and coding agents you already work with.Mount remote storage — Mount an external object store such as Amazon S3 into a Vercel Sandbox with a FUSE driver, so code reads and writes remoVercel Sandbox pricing and quotas — Understand how Vercel Sandbox billing works, what's included in each plan, and the quotas that apply.Python SDK Reference — Reference for the Vercel Sandbox Python SDK, including sandbox lifecycle, processes, files, snapshots, persistence, andQuickstart — Learn how to run your first code in a Vercel Sandbox.JS SDK Reference — A comprehensive reference for the Vercel Sandbox JavaScript SDK, which lets you run code in a secure, isolated environmeWorking with Sandbox — Task-oriented examples for common Vercel Sandbox operations in TypeScript and Python.Pages that link here (86)By site: eve (2) · vercel-changelog (16) · vercel-kb (25) · vercel-web (5) · vercel-docs (38)From eveSecurity Model — eve's trust boundaries, where secrets live, how credentials reach hosts, and what fails closed by default.Sandbox — The agent's isolated bash environment, including built-in file tools, a seeded /workspace, backends, lifecycle, and netwFrom vercel-changelogBuild with OpenAI Agents API on VercelConnect to and manage Sandboxes from the dashboardCustom tags available in beta on Vercel SandboxData downloaded by Vercel Sandbox is now freeDrives for Vercel Sandbox in Private BetaFull Sandbox egress firewall now available on Hobby planMore granular observability for Vercel SandboxPort 8080 is now available in Vercel SandboxesCursor Cloud Agents can now run in Vercel SandboxRun Docker containers inside Vercel SandboxVercel AI Gateway and Vercel Sandbox now available on Hermes AgentVercel Sandbox is now available in all regionsVercel Sandbox is now globally availableVercel Sandbox now supports 10,000 concurrent sandboxes and 5,000 vCPUs per minuteVercel Sandbox routing is now 18x faster globallyVercel Sandbox supports forkingFrom vercel-kbBuild AI agents with AI Gateway and AI SDK — Build AI agents on Vercel with AI Gateway and AI SDK, then make them reliable, capable, and durable with Sandbox, Chat SRun Cursor Cloud Agents on Vercel Sandbox — Learn how to run Cursor Cloud Agents on Vercel Sandbox with BYOM worker pools, durable workflows, isolated microVMs, andRun recurring security reviews with deepsec on Vercel — Learn how to run periodic security scans on your code with deepsec. Set up deepsec to review GitHub repositories and delHow to run Devin Outposts sessions on Vercel — Run Devin Outposts sessions in isolated Vercel Sandbox microVMs. One browser authorization to set up, then sessions starRunning Docker on Vercel — Learn how to run Docker on Vercel by deploying OCI container images as Vercel Functions, storing them in Vercel ContaineManage your Sanity project from Slack with eve — A Slack-based Sanity copilot built on eve. It queries and edits content with GROQ, shapes schemas, manages releases, andShip social posts from Slack with eve and Typefully — A Slack-based social media agent built on eve. It drafts posts and threads for X, LinkedIn, Threads, Bluesky, and MastodBuild an agentic app in FastAPI with OpenAI Agents API and Vercel Sandbox — Learn how to build a repository Q&A app using FastAPI, OpenAI Agents API, and Vercel Sandbox, with isolated code inspectHow to build an on-demand voice agent with Vercel Sandbox — Build a voice AI application that creates isolated LiveKit agent environments using Vercel Sandbox, enabling real-time cHow to run a multi-step research agent on Vercel — An end-to-end architecture for production research agents on Vercel using Sandbox, Workflows, and AI Gateway with isolatRun a marketing team from Slack with eve — Team of five marketing agents built on eve. The lead routes work to specialists that write long-form into Notion, queueBuild an agent with OpenAI Agents API on Vercel — Build and deploy an agent with OpenAI Agents API, Vercel Functions, Queues, and Sandbox for isolated code execution.Run Python code securely with AI SDK and Vercel Sandbox — Add an \executeCode\\ tool to your AI SDK agent with the \ai-sdk-tool-code-execution\\ package to run Python 3.13 insiHow to run Herdr coding agents in isolated Vercel Sandboxes — Install the vercel.sandbox plugin for Herdr, approve an upload manifest, run each AI coding agent in its own isolated VeInvestigate GitHub issues with \HarnessAgent\\ and Vercel Sandbox — Use HarnessAgent to run coding agent harnesses like Claude Code or Codex against untrusted code inside Vercel Sandbox. RUsing TanStack AI with Vercel Sandbox — Run coding agents in isolated Vercel Sandbox microVMs with the @tanstack/ai-sandbox-vercel provider, with durable resumeHow to test a container image in Vercel Sandbox before deploying — Validate a container image before deploying by booting it as a custom Sandbox image from Vercel Container Registry \(VCRBuild a v0-style app builder with OpenAI Agents API and Vercel Sandbox — Build a chat-to-app workspace with live Next.js previews, follow-up edits, and saved projects using the OpenAI Agents APThe Complete Guide to Vercel Agent — Learn what Vercel Agent does, how to set up Code Review, Investigation, Chat, and Installation, and what each feature coUsing Vercel Agent to review pull requests — Set up Vercel Agent Code Review to automatically review pull requests, apply validated fixes, request reviews with @vercVercel Sandbox vs CodeSandbox — A detailed guide to Vercel Sandbox vs CodeSandbox: compute isolation, credential brokering, Active CPU billing, Docker sVercel Sandbox vs E2B — A detailed guide to Vercel Sandbox vs E2B: compute lifecycle, security controls, code execution, pricing, and when to chVercel vs Fastly — A detailed guide to Vercel vs Fastly: full-stack application platform vs edge infrastructure layer, covering framework sVercel vs Northflank — A detailed guide to Vercel vs Northflank: Fluid compute, CDN and caching, container image functions, security defaults,Vercel vs Railway — A detailed guide to Vercel vs Railway: serverless vs always-on containers, container images via Dockerfile.vercel, frameFrom vercel-webAgentic InfrastructureIntroducing eve$1 million hacker challenge for Vercel SandboxIntroducing the new Vercel AgentVercel Services: Run full stack on VercelFrom vercel-docsCode Review — Get automatic AI-powered code reviews on your pull requestsVercel CLI Overview — Learn how to use the Vercel command-line interface \(CLI\) to manage and configure your Vercel Projects from the commandvercel sandbox — Interact with Vercel Sandbox from the Vercel CLI: list, create, connect, exec, copy, stop, and snapshot sandboxes from yeve — Build and deploy durable backend AI agents with eve, an open-source, filesystem-first framework.Concepts — Learn how eve agents, sessions, channels, tools, skills, connections, and sandboxes fit together.Observability Insights — List of available data sources that you can view and monitor with Observability on Vercel.Regional Pricing — Vercel pricing for Managed Infrastructure resources in different regions.Stockholm, Sweden \(arn1\) pricing — Vercel pricing for the Stockholm, Sweden \(arn1\) region.Mumbai, India \(bom1\) pricing — Vercel pricing for the Mumbai, India \(bom1\) region.Paris, France \(cdg1\) pricing — Vercel pricing for the Paris, France \(cdg1\) region.Cleveland, USA \(cle1\) pricing — Vercel pricing for the Cleveland, USA \(cle1\) region.Cape Town, South Africa \(cpt1\) pricing — Vercel pricing for the Cape Town, South Africa \(cpt1\) region.Dublin, Ireland \(dub1\) pricing — Vercel pricing for the Dublin, Ireland \(dub1\) region.Frankfurt, Germany \(fra1\) pricing — Vercel pricing for the Frankfurt, Germany \(fra1\) region.São Paulo, Brazil \(gru1\) pricing — Vercel pricing for the São Paulo, Brazil \(gru1\) region.Hong Kong \(hkg1\) pricing — Vercel pricing for the Hong Kong \(hkg1\) region.Tokyo, Japan \(hnd1\) pricing — Vercel pricing for the Tokyo, Japan \(hnd1\) region.Washington D.C., USA \(iad1\) pricing — Vercel pricing for the Washington D.C., USA \(iad1\) region.Seoul, South Korea \(icn1\) pricing — Vercel pricing for the Seoul, South Korea \(icn1\) region.Osaka, Japan \(kix1\) pricing — Vercel pricing for the Osaka, Japan \(kix1\) region.London, UK \(lhr1\) pricing — Vercel pricing for the London, UK \(lhr1\) region.Portland, USA \(pdx1\) pricing — Vercel pricing for the Portland, USA \(pdx1\) region.San Francisco, USA \(sfo1\) pricing — Vercel pricing for the San Francisco, USA \(sfo1\) region.Singapore \(sin1\) pricing — Vercel pricing for the Singapore \(sin1\) region.Sydney, Australia \(syd1\) pricing — Vercel pricing for the Sydney, Australia \(syd1\) region.Montréal, Canada \(yul1\) pricing — Vercel pricing for the Montréal, Canada \(yul1\) region.Products — Browse Vercel products for building, deploying, securing, observing, and scaling web applications.Projects overview — A project is where you deploy and operate frontend apps, APIs, backends, containers, and agent workloads on Vercel.Transferring a project — Learn how to transfer a project between Vercel teams.Anthropic SDK — Use Anthropic tool use with AI Gateway to execute model-generated code in an isolated Vercel Sandbox.Harbor and Terminal-Bench — Run Terminal-Bench and any other Harbor Hub dataset on Vercel Sandbox, with each trial in its own isolated Firecracker mHerdr — Run terminal-based coding agents in persistent Vercel Sandbox microVMs from Herdr. Review and apply their changes locallHermes — Run Hermes Agent terminal commands in isolated Vercel Sandbox microVMs, with models served through Vercel AI Gateway.LangChain — Give a LangChain agent a tool that executes model-generated code in an isolated Vercel Sandbox, with models served by AIOpenAI Agents API — Connect OpenAI Agents API sessions to Vercel Sandbox for isolated code execution and persistent workspace files.OpenAI SDK — Use OpenAI function calling with AI Gateway to execute model-generated code in an isolated Vercel Sandbox.TanStack AI with Vercel Sandbox — Run TanStack AI coding agents in isolated Vercel Sandbox microVMs with the dedicated provider, workspace configuration,Running commands in a Vercel Sandbox — Create isolated sandbox environments to run builds, tests, and commands safely.

You can reach our customer support team by emailing info@yourcompany.example.com, calling +1 555-555-5556, or using the live chat on our website. Our dedicated team is available 24/7 to assist with any inquiries or issues.

We’re committed to providing prompt and effective solutions to ensure your satisfaction.

We offer a 30-day return policy for all products. Items must be in their original condition, unused, and include the receipt or proof of purchase. Refunds are processed within 5-7 business days of receiving the returned item.