{"id":"pg_tgicotyq8l2q","property_id":"prp_pklgwresh6hp","domain_id":"dom_zrkwapcbulfb","root_domain":"vercel.com","locale":"en","url":"https://vercel.com/sandbox","url_hash":"b927bd2f596835b9a15e852f14bd00806d5134571516146f37f6647df00f19ac","path":"/sandbox","depth":1,"canonical_url":"https://vercel.com/sandbox","canonical_page_id":null,"page_type":"landing","page_type_guess":"landing","state":"indexed","skip_reason":"budget","priority":"0.9","discovered_via":"sitemap","first_seen_at":"2026-08-27T09:05:09.074Z","last_seen_at":"2026-09-26T09:10:02.787Z","http_status":200,"content_hash":"e1a6ba8bb63d10e662220909d82adeead35369f2528d64cf7ab6f08a3e93286b","title":"Sandbox - Vercel","description":"The safest way to run code you didn’t write. Run AI-generated, customer, or untrusted code in isolated, ephemeral VMs.","author":null,"published_at":null,"modified_at":null,"word_count":1148,"reading_time_sec":313,"lang_detected":"en","images":[],"links_out":null,"markdown_source":"readability","refresh_interval":"monthly","last_fetched_at":"2026-09-26T09:08:36.878Z","next_refresh_at":"2026-10-26T09:08:36.878Z","runs_count":1,"changes_count":0,"last_changed_at":null,"fail_count":0,"last_error":null,"created_at":"2026-08-27T09:05:09.074Z","updated_at":"2026-08-27T09:05:09.074Z","inlinks":29,"inlinks_body":4,"outlinks":78,"outlinks_external":11,"anchor_terms":["Sandbox","Vercel Sandbox","Vercel SandboxIsolated execution.","Vercel SandboxRun agent generated code securely and at scale.npm i @vercel/sandbox"],"template_score":"0.96666666666666666667","cash":"0.0708840378997727155","cash_total":"0.77771343605485007961","pagerank":"0.0191563972127175","is_orphan":false,"link_confirmed":true,"discovered_wave":0,"embedded_hash":null,"embedded_at":null,"domain_name":"Vercel Inc.","brand_color":null,"domain_rank":579,"spam_score":14,"markdown":"## The safest way to run code you didn’t write\n\nModern apps increasingly need to execute code they didn’t author. From AI agents, customer scripts, or dynamic systems.\n\nUse cases\n\n## Run the agent’s code, the agent itself, or your own code\n\nEvery sandbox is the same isolated Firecracker microVM with its own filesystem and network. What you run inside it is up to you.\n\n### The agent’s code\n\nWrite the agent’s output to the sandbox filesystem and execute it there. You get the exit code and output back without running any of it on your own infrastructure.\n\n### The agent itself\n\nPoint a coding agent at a sandbox instead of your laptop. Its edits, package installs, and shell commands all stay inside the microVM.\n\n1.  Install the CLI and log in.\n    \n2.  Start a sandbox and boot the agent.\n    \n\nThe base image already includes `claude`, `codex`, and `opencode`, so there is nothing to install inside the sandbox. The agent walks you through its own login the first time you start it.\n\n### Your code\n\nBuilds, test suites, and migrations work the same way. One command gets you a clean machine, so nothing depends on what is installed on your laptop.\n\n1.  Install the CLI and log in.\n    \n2.  Run a command.\n    \n\nSecurity\n\n## Network Firewall with Credentials Brokering and Requests Proxying\n\nControl egress traffic with fine-grained network policies that can be updated at runtime. Credentials brokering injects secrets into outbound requests without exposing them inside the sandbox. Requests Proxying routes selected traffic to your own proxy server for additional security and observability.\n\n-   **Dynamic policies:** allow-all, deny-all, or user-defined rules\n    \n-   **Credentials injected on egress:** never enter the sandbox\n    \n-   **Route any request** to your own proxy server\n    \n-   **Live policy updates** without restarting processes\n    \n\nRegions\n\n## Run each sandbox near your users, your data, or the rest of your stack\n\nPick a region per sandbox or set a project default for maximum performance and compliance. Vercel Sandbox runs your workload there: near your users, your data, or the rest of your stack. Pro and Enterprise teams can add failover regions, so sandbox creation keeps working even when a region is unavailable.\n\n-   **Choose a region per sandbox** or set a project default, on any plan\n    \n-   **Failover regions** creation continues when a region is unavailable, on Pro and Enterprise\n    \n-   **Place workloads deliberately** meet data-location requirements and cut latency\n    \n-   **Same workflow everywhere** SDK, CLI, and dashboard\n    \n\nPerformance\n\n## Snapshots with Instant Environment Restore\n\nCapture the complete state of a running sandbox (filesystem and installed packages), then restore it instantly. Share environments with teammates, checkpoint long-running tasks, or skip dependency installation entirely by snapshotting after setup.\n\n-   **Skip dependency installation** on every run\n    \n-   **Share identical environments** with your team\n    \n-   **Checkpoint progress** on long-running tasks\n    \n-   **Spin up multiple parallel instances** from one snapshot\n    \n\n## Cost-efficient, scalable execution with Fluid compute\n\nVercel Sandbox runs on Fluid compute, Vercel’s optimized execution model that scales CPU and memory dynamically across millions of executions.\n\nWith **Active CPU pricing**, you’re billed for CPU only when code is actively running, not during idle or wait time, resulting in up to 95% lower cost for workloads with bursty or I/O-bound patterns.\n\n> Vercel Sandbox expands what our frontend infrastructure can handle. We plan to rely on it more for running untrusted code in AI workflows and for integrating tools that cannot run in a Node.js serverless function.”\n\nTudor GolubencoCTO, Xata\n\n> Cua lets teams run computer-use agents from their apps with 100+ compatible VLMs — agents operate real desktops backed by Vercel Sandbox. Next.js playground on Vercel; agents execute in Vercel Sandbox via Cua with logs, replays, and evals.”\n\nFrancesco BonacciFounder, Cua\n\n## Get started\n\nYou can get started with Vercel Sandbox quickly and easily.\n\n[See more examples](https://vercel.com/docs/vercel-sandbox/examples)\n\nLaunch a secure, interactive sandbox environment in milliseconds.\n\nQuickly give **Vercel Sandbox** a try with your AI tool of choice.\n\nBootstrap a simple Node.js CLI that creates a Vercel sandbox. Use this code:\n\nInclude auth setup (vercel login && vercel link) with error handling.\n\n## Frequently asked questions\n\nWhat is Vercel Sandbox?\n\nVercel Sandbox is an on-demand, isolated Linux microVM that runs arbitrary code safely through an SDK or CLI.\n\nWhy use Sandbox instead of managing containers or VMs myself?\n\nSandbox gives you secure microVM isolation, built-in authentication and observability, and usage-based pricing without any infrastructure to maintain.\n\nCan it run untrusted or AI-generated code safely?\n\nYes. Sandbox is purpose-built to execute untrusted or AI-generated code in fully isolated, short-lived environments.\n\nHow is isolation implemented?\n\nEach sandbox runs in its own Firecracker microVM with a dedicated kernel, on the same infrastructure that powers Vercel's builds. Code in one sandbox can't see the processes, filesystem, or network of any other.\n\nWhat runtimes are supported?\n\nThe default image ships Node.js 24 and Python 3.14, and managed images cover Node.js 22, 24, and 26. You can also bring your own image through Vercel Container Registry.\n\nCan I install system packages and use sudo?\n\nYes. Each sandbox runs Ubuntu by default, so you can install packages with apt-get and use sudo as needed, or bring any Linux image.\n\nCan I run Docker containers or use FUSE?\n\nYes. Sandboxes have full support for elevated privileges within the microVM, so you can run Docker containers and use FUSE as needed.\n\nHow long can a sandbox run?\n\nEach session defaults to 5 minutes and can be extended programmatically, up to a continuous runtime limit of 24 hours on Pro and Enterprise plans and 45 minutes on Hobby. The limit resets every time a sandbox stops and resumes, so the total lifetime of a sandbox is effectively unbounded.\n\nWhat resources can I allocate?\n\nEach sandbox can use up to 32 vCPUs on Enterprise plans, 8 vCPUs on Pro plans and 4 vCPUs on Hobby plans. RAM is provisioned at 2 GB per vCPU.\n\nCan I expose a dev server or app on a public URL?\n\nYes. You can open up to 15 ports and access them through a sandbox URL, such as sandbox.domain(port).\n\nHow is network data transfer billed?\n\nData a sandbox downloads from the internet, such as packages, Git repositories, artifacts, and datasets, is free. Data the sandbox sends to the internet is billable, as is traffic to and from exposed ports. For example, downloading an npm package is free, but requests and responses handled by a web server on an exposed port are billable.\n\nHow do I monitor what’s running?\n\nYou can view active sandboxes in the Sandboxes tab of your project with metrics under the Observability → Sandboxes tab, and stream real-time logs to your terminal.\n\nWhich regions can sandboxes run in?\n\nSandboxes can run in\n\n[all Vercel regions](https://vercel.com/docs/sandbox/concepts/regions). Choose a region per sandbox or set a project default on any plan. The default region is `iad1`. Pro and Enterprise teams can also configure failover regions, which Vercel tries in order if it cannot create a sandbox in the primary region. Active CPU and Provisioned Memory rates vary by region; see\n\n[regional pricing](https://vercel.com/docs/sandbox/pricing#regional-pricing).","storage":{"htmlKey":"stealpage/html/vercel.com/pg_tgicotyq8l2q/run_r8lxwhaj9bi6.html.gz","markdownKey":"stealpage/md/vercel.com/pg_tgicotyq8l2q/run_r8lxwhaj9bi6.md.gz"},"facets":null,"assets":[{"kind":"image","src_url":"https://lishhsx6kmthaacj.public.blob.vercel-storage.com/og-images/sandbox-og.png","r2_key":null,"alt":null,"caption":null,"width":null,"height":null,"is_hero":true,"zone":"main"},{"kind":"image","src_url":"https://vercel.com/vc-ap-vercel-marketing/_next/static/immutable/media/vercel-light.3_gxxexgi1nmy.svg","r2_key":null,"alt":"Vercel","caption":null,"width":16,"height":14,"is_hero":false,"zone":"footer"},{"kind":"image","src_url":"https://vercel.com/vc-ap-vercel-marketing/_next/static/immutable/media/vercel-dark.1f3cgy23m5_jy.svg","r2_key":null,"alt":"Vercel","caption":null,"width":16,"height":14,"is_hero":false,"zone":"footer"}],"shots":[{"viewport":"mobile","width":390,"height":844,"r2_key":"stealpage/shots/vercel.com/pg_tgicotyq8l2q/run_r8lxwhaj9bi6-mobile.png","phash":"03d090a08800c0b4","visual_delta":null,"captured_at":"2026-09-26T09:08:41.793Z"},{"viewport":"desktop","width":1440,"height":900,"r2_key":"stealpage/shots/vercel.com/pg_tgicotyq8l2q/run_r8lxwhaj9bi6-desktop.png","phash":"070a00820803194b","visual_delta":null,"captured_at":"2026-09-26T09:08:41.587Z"}],"history":[{"id":"run_r8lxwhaj9bi6","started_at":"2026-09-26T09:08:36.873Z","http_status":200,"fetcher":"direct","changed":false,"diff":null,"word_count":1148}],"citedBy":[{"id":"pg_cjoyozo9gt4j","url":"https://vercel.com/ai-sdk","title":"AI SDK - Vercel","anchors":["Sandbox","Vercel SandboxRun agent generated code securely and at scale.npm i @vercel/sandbox"],"zone":"main"},{"id":"pg_shocgxz1klct","url":"https://vercel.com/templates","title":"Templates - Vercel","anchors":["Sandbox"],"zone":"main"},{"id":"pg_6q5usg2wi-jc","url":"https://vercel.com/eve","title":"eve – The Agent Framework - Vercel","anchors":["Sandbox","Vercel Sandbox","Vercel SandboxIsolated execution."],"zone":"main"}]}