---
title: Vercel Sandbox
description: Vercel Sandbox runs coding agents and AI workloads in isolated Firecracker microVMs. Snapshots and Drives carry work across sessions, and Active CPU pricing doesn't bill time spent waiting on models or I/O.
url: "https://vercel.com/kb/vercel-sandbox"
published: 2026-06-15
last_updated: 2026-11-23
install_vercel_plugin: npx plugins add vercel/vercel-plugin
search_with_vercel_cli: npx vercel@latest kb search "<query>"
---

# Vercel Sandbox

Vercel Sandbox runs coding agents and AI workloads in isolated Firecracker microVMs. Snapshots and Drives carry work across sessions, and Active CPU pricing doesn't bill time spent waiting on models or I/O.

## Getting Started with Vercel Drives

- [How Vercel Drives work and how to use them](/kb/guide/vercel-drives): Learn how Vercel Drives give Vercel Sandbox persistent, shareable storage, and how to create, mount, snapshot, fork, list, and delete a drive.
- [How to give agents persistent storage with Vercel Drives](/kb/guide/persistent-storage-with-vercel-drives): Give AI SDK and TanStack AI agents persistent storage with Vercel Drives so they can save and reuse research notes across runs.
- [How to use Vercel Drives with an eve agent](/kb/guide/vercel-drives-eve-agent): Mount Vercel Drives in an eve agent's sandbox to give each user a persistent workspace and share read-only reference data across sessions.

## Using Vercel Sandbox

- [Build a Claude Managed Agent with Vercel Sandbox](/kb/guide/run-claude-managed-agent-tools-with-vercel-sandbox): Build a Claude Managed Agent with Vercel Sandbox: each session runs in a fresh microVM with credential brokering and a webhook-driven control plane on Vercel.
- [How Vercel Sandbox duration and persistence work](/kb/guide/vercel-sandbox-duration-and-persistence): Session duration and persistence are two separate controls in Vercel Sandbox. The timeout option keeps a single run alive for up to 24 hours, while snapshots and persistent sandboxes carry state across runs for long-running agents and pipelines.
- [Add Python code execution to a TypeScript AI agent with Vercel Sandbox](/kb/guide/python-ai-sdk-vercel-sandbox): Add an \`executeCode\` tool to your TypeScript AI SDK agent with the \`ai-sdk-tool-code-execution\` package to run Python 3.13 inside an isolated Vercel Sandbox.
- [Investigate GitHub issues with \`HarnessAgent\` and Vercel Sandbox](/kb/guide/sandboxed-coding-agent-with-harnessagent): Use HarnessAgent to run coding agent harnesses like Claude Code or Codex against untrusted code inside Vercel Sandbox. Reproduce GitHub issues with the agent harness and generate a report for the maintainer.
- [Building an agent with OpenAI Agents SDK and Vercel Sandbox](/kb/guide/building-an-agent-with-openai-agents-sdk-and-vercel-sandbox): Learn how to build an agent with with OpenAI Agents SDK and Vercel Sandbox
- [Running OpenClaw in Vercel Sandbox](/kb/guide/running-openclaw-in-vercel-sandbox): This guide walks you through setting up OpenClaw inside a Vercel Sandbox and configuring the WhatsApp channel.
- [Running OpenCode securely with the Vercel Sandbox](/kb/guide/running-opencode-securely-with-the-vercel-sandbox): Run OpenCode in an isolated Vercel Sandbox MicroVM with controlled egress, using the SDK to restrict network access so the AI agent can only reach approved LLM endpoints.
- [Safely running AI generated code in your Next.js application](/kb/guide/running-ai-generated-code-sandbox): How to execute untrusted, AI‑generated code from a Next.js app using Vercel Sandbox, an isolated, ephemeral environment.

## Learn more about AI sandboxes

- [What is an AI sandbox?](https://vercel.com/i/what-is-an-ai-sandbox): An AI sandbox isolates code generated or used by an AI agent. Learn how execution, network controls, credentials, and persistent state fit together.
- [MicroVMs vs. containers for running AI-generated code](https://vercel.com/i/microvm-vs-container): Compare microVMs and containers for AI-generated code, including kernel isolation, container images, permissions, and execution lifecycle.
- [What is a Firecracker VM and how does it work?](https://vercel.com/i/what-is-firecracker): Learn how a Firecracker VM works, how microVMs differ from containers and traditional VMs, and why AI sandboxes use them to run coding agents.
- [7 AI sandbox providers compared](https://vercel.com/i/ai-sandbox-providers): Compare seven AI sandbox providers by isolation, persistence, network controls, and agent integration to choose an environment for running untrusted code.
- [6 kinds of agents that need a persistent workspace](https://vercel.com/i/ai-agents-persistent-workspace): See which coding, research, analysis, and incident agents need files that outlast a run, then choose between Sandbox persistence and Drives.
- [RL environments for AI agents](https://vercel.com/i/what-are-rl-environments): Learn how RL environments give AI agents tasks, observations, actions, and rewards, and where sandboxes fit into training and evaluation.

## Build with a eve Template

- [Data analyst](https://vercel.com/templates/eve/eve-data-analyst): Slack-based data analyst built on eve that answers questions about your business from a Postgres database.
- [Contentful assistant](https://vercel.com/templates/eve/eve-contentful-agent): Slack-based Contentful assistant with Vercel Drives providing a searchable copy of your Contentful content.
- [Marketing team](https://vercel.com/templates/eve/eve-marketing-team): A team of marketing agents: a lead routes work to specialists for positioning, long-form content, social, SEO, and email, publishing through Notion, Typefully, and Resend.
- [Software factory](https://vercel.com/templates/eve/eve-software-factory): Software factory built on eve: AI agents work each stage of the development loop, and people make the judgment calls.
- [Incident response](https://vercel.com/templates/eve/eve-incident-response-agent): sre investigates production issues using a hypothesis-driven approach and outputs verifiable evidence from sources.
- [GitHub maintainer](https://vercel.com/templates/eve/eve-github-maintainer): Kody, a personal GitHub maintainer agent that emails you a weekly digest of open issues, acts on your email replies, summarizes new pull requests, answers @mentions, and works delegated Linear issues.
- [Personal agent](https://vercel.com/templates/nuxt/eve-personal-agent): A durable AI assistant with long-term memory. Chat on the web or Slack, query Linear, and pick up where you left off.
- [Vercel Drives Starter](https://vercel.com/templates/eve/eve-vercel-drives-starter): An eve agent that reads and saves your team's files on a Vercel Drive.
- [Memory](https://vercel.com/templates/eve/eve-memory-agent): A Slack agent built on eve that remembers what your team tells it. Personal preferences and channel conventions are stored separately in Vercel Blob and recalled before every reply.
- [TanStack Start agent](https://vercel.com/templates/eve/eve-tanstack-agent): Web chat built on eve and TanStack Start, where the agent can respond with generative UI like tables and dashboards.

## All Vercel Sandbox guides

- [Vercel Sandbox vs Cloudflare Sandbox](/kb/guide/vercel-sandbox-vs-cloudflare-sandbox): Compare Vercel Sandbox and Cloudflare Sandbox as AI agent sandboxes, including isolation, persistence, network controls, SDKs, and deployment options.
- [Vercel Sandbox vs Modal Sandboxes](/kb/guide/vercel-sandbox-vs-modal-sandboxes): Compare Vercel Sandbox and Modal Sandboxes as AI agent sandboxes, including isolation, persistence, network controls, GPUs, SDKs, and deployment regions.
- [Vercel Sandbox vs Upstash Box](/kb/guide/vercel-sandbox-vs-upstash-box): Compare Vercel Sandbox and Upstash Box as AI agent sandboxes, including isolation, persistence, network controls, SDKs, and deployment regions.
- [How to perform large-scale data analysis with Vercel Sandbox and MCP](/kb/guide/large-scale-data-analysis-vercel-sandbox-mcp): Use Vercel Sandbox and an MCP server built with \`mcp-handler\` to let AI agents run DuckDB SQL and Python on large datasets without loading data into the model's context.
- [Run untrusted Python code safely with Vercel Sandbox](/kb/guide/python-and-vercel-sandbox): Execute untrusted and AI-generated code from Python in isolated microVMs, with files, processes, network policies, and snapshots.
- [Running Durable Agents on Vercel](/kb/guide/durable-ai-agents): Design durable AI agents on Vercel with patterns for execution recovery, human approval, safe retries, deployment changes, and persistent files.
- [How to give agents persistent storage with Vercel Drives](/kb/guide/persistent-storage-with-vercel-drives): Give AI SDK and TanStack AI agents persistent storage with Vercel Drives so they can save and reuse research notes across runs.
- [How Vercel Drives work and how to use them](/kb/guide/vercel-drives): Learn how Vercel Drives give Vercel Sandbox persistent, shareable storage, and how to create, mount, snapshot, fork, list, and delete a drive.
- [How to use Vercel Drives with an eve agent](/kb/guide/vercel-drives-eve-agent): Mount Vercel Drives in an eve agent's sandbox to give each user a persistent workspace and share read-only reference data across sessions.
- [Build a v0-style app builder with OpenAI Agents API and Vercel Sandbox](/kb/guide/v0-clone-openai-agents-vercel-sandbox): Build a chat-to-app workspace with live Next.js previews, follow-up edits, and saved projects using the OpenAI Agents API preview, Vercel Sandbox, and Queues.
- [Build an agentic app in FastAPI with OpenAI Agents API and Vercel Sandbox](/kb/guide/fastapi-openai-agents-api-vercel-sandbox): Learn how to build a repository Q\&A app using FastAPI, OpenAI Agents API, and Vercel Sandbox, with isolated code inspection, streamed progress, downloadable evidence, and deployment to Vercel.
- [Build an agent with OpenAI Agents API on Vercel](/kb/guide/openai-agents-api-vercel): Build and deploy an agent with OpenAI Agents API, Vercel Functions, Queues, and Sandbox for isolated code execution.
- [Using TanStack AI with Vercel Sandbox](/kb/guide/tanstack-ai-vercel-sandbox): Run coding agents in isolated Vercel Sandbox microVMs with the @tanstack/ai-sandbox-vercel provider, with durable resume-by-id, port previews, and workspace policies.
- [Run Cursor Cloud Agents on Vercel Sandbox](/kb/guide/cursor-vercel-sandbox): Learn how to run Cursor Cloud Agents on Vercel Sandbox with self-hosted worker pools, durable workflows, isolated microVMs, and scale-to-zero compute.
- [How to run Herdr coding agents in isolated Vercel Sandboxes](/kb/guide/run-herdr-coding-agents-isolated-vercel-sandboxes): Install the vercel.sandbox plugin for Herdr, approve an upload manifest, run each AI coding agent in its own isolated Vercel Sandbox microVM, and apply its changes back to your local worktree.
- [How to run Devin Outposts sessions on Vercel](/kb/guide/devin-outposts-vercel-sandbox): Run Devin Outposts sessions in isolated Vercel Sandbox microVMs. One browser authorization to set up, then sessions start from anywhere, even your phone.
- [How to test a container image in Vercel Sandbox before deploying](/kb/guide/test-container-image-vercel-sandbox): Validate a container image before deploying by booting it as a custom Sandbox image from Vercel Container Registry (VCR) or running Docker inside a Vercel Sandbox.
- [Manage your Sanity project from Slack with eve](/kb/guide/eve-sanity-copilot): A Slack-based Sanity copilot built on eve. It queries and edits content with GROQ, shapes schemas, manages releases, and drafts long-form pieces into Notion.
- [How to process user-uploaded files with Vercel Sandbox and Vercel Blob](/kb/guide/user-uploaded-files-vercel-sandbox-and-blob): Learn how to upload files to Vercel Blob, process them safely with FFmpeg in an isolated Vercel Sandbox, and store the results back in Blob.
- [How Vercel Sandbox duration and persistence work](/kb/guide/vercel-sandbox-duration-and-persistence): Session duration and persistence are two separate controls in Vercel Sandbox. The timeout option keeps a single run alive for up to 24 hours, while snapshots and persistent sandboxes carry state across runs for long-running agents and pipelines.
- [Add Python code execution to a TypeScript AI agent with Vercel Sandbox](/kb/guide/python-ai-sdk-vercel-sandbox): Add an \`executeCode\` tool to your TypeScript AI SDK agent with the \`ai-sdk-tool-code-execution\` package to run Python 3.13 inside an isolated Vercel Sandbox.
- [Investigate GitHub issues with \`HarnessAgent\` and Vercel Sandbox](/kb/guide/sandboxed-coding-agent-with-harnessagent): Use HarnessAgent to run coding agent harnesses like Claude Code or Codex against untrusted code inside Vercel Sandbox. Reproduce GitHub issues with the agent harness and generate a report for the maintainer.
- [Draft content in your voice from Slack with eve](/kb/guide/eve-content-agent): Deploy the eve content agent template, a Slack bot that drafts blog posts, LinkedIn posts, release notes, and newsletters in your house voice from Notion, using Vercel Connect, Vercel Blob, and AI Gateway.
- [Building an agent with OpenAI Agents SDK and Vercel Sandbox](/kb/guide/building-an-agent-with-openai-agents-sdk-and-vercel-sandbox): Learn how to build an agent with with OpenAI Agents SDK and Vercel Sandbox
- [Build a Claude Managed Agent with Vercel Sandbox](/kb/guide/run-claude-managed-agent-tools-with-vercel-sandbox): Build a Claude Managed Agent with Vercel Sandbox: each session runs in a fresh microVM with credential brokering and a webhook-driven control plane on Vercel.

## Explore other topics in the Vercel Knowledge Base

- [Enterprise Apps and Agents](/kb/enterprise): Explore how enterprises build, deploy, and govern internal apps and AI agents. Learn about citizen development, shadow IT, shadow AI, access controls, and agent auditing, with guidance for turning employee-built tools into supported business applications.
- [Docker](/kb/docker): Deploy HTTP applications from a standard Dockerfile with Vercel Functions, and run continuous background workers with Vercel Daemons. Find deployment and migration guides for both.
- [AI](/kb/ai): Build AI-powered applications using Vercel's agentic infrastructure.
- [Retail](/kb/retail): Build resilient storefronts and e-commerce experiences that hold up when traffic spikes.

## 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](/kb/architecture/agents): Build and operate agents with models, tools, and durable workflows.
- [Web applications](/kb/architecture/web): Choose rendering, data, authentication, and caching approaches.
- [Backends](/kb/architecture/backends): Choose a runtime, connect services, and run background work.

[Browse all stacks](/kb/architecture)

## Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

[Browse the prompt library](/kb/prompts) · [Read the Markdown index](/kb/prompts.md)

## Search guides from your terminal

Search the Knowledge Base and read guides as Markdown with the Vercel CLI. No login required.

```bash
# Find guides by keyword
npx vercel@latest kb search "rewrites and redirects"
npx vercel@latest kb search "AI SDK streaming"

# Show the latest guides
npx vercel@latest kb

# Print a guide as Markdown, by slug or URL
npx vercel@latest kb inspect <guide>
```
