vercel-sandbox

Runs browser automation and untrusted code inside ephemeral Vercel Sandbox Firecracker microVMs.

Updated Jul 31, 2026
One-click install
npx skills add https://github.com/AarnavBaddam/skills --skill vercel-sandbox-aarnavbaddam
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vercel-sandbox
Source: https://github.com/AarnavBaddam/skills/tree/main/vercel-sandbox
Command: npx skills add https://github.com/AarnavBaddam/skills --skill vercel-sandbox-aarnavbaddam

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @vercel/sandbox.

What problem does it solve? Executing AI-generated or user-submitted code and running headless browser automation on your own infrastructure risks security and stability. This Skill provides guidance for running that code inside isolated, ephemeral Vercel Sandbox microVMs that spin up on demand and shut down after use. ## Core Features & Use Cases - Isolated Code Execution: Run untrusted or AI-generated code in Firecracker microVMs via the @vercel/sandbox SDK, with automatic OIDC authentication on Vercel. - Headless Browser Automation: Drive agent-browser and Chromium inside the sandbox for screenshots, accessibility snapshots, form filling, and multi-step workflows. - Sandbox Snapshots: Pre-build VM images with system dependencies and Chromium installed for sub-second startup instead of ~30s cold installs. - Use Case: Build an API route that accepts a URL, opens it in a sandboxed headless browser, captures a screenshot and accessibility tree, and returns both — safe even when the URL or automation steps come from end users. ## Quick Start Ask the AI to set up a Vercel Sandbox using @vercel/sandbox that opens a URL in headless Chromium and returns a screenshot.

Frequently Asked Questions about vercel-sandbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run untrusted code safely with Vercel Sandbox?

Use the @vercel/sandbox SDK to create an ephemeral Firecracker microVM with Sandbox.create(), then execute commands via sandbox.runCommand(). The VM is fully isolated and shuts down when you call sandbox.stop(), so untrusted code never touches your infrastructure.

How to run headless Chrome browser automation on Vercel?

Install agent-browser and Chromium system dependencies inside a Vercel Sandbox microVM, then drive it with commands like open, snapshot, fill, click, and screenshot. The sandbox persists between commands, supporting full multi-step automation sequences.

What is a Vercel Sandbox snapshot and why use one?

A sandbox snapshot is a saved VM image with system dependencies, agent-browser, and Chromium pre-installed, similar to a Docker image. Booting from a snapshot reduces startup from about 30 seconds to sub-second, which is recommended for production deployments.

Does Vercel Sandbox work with frameworks other than Next.js?

Yes, the pattern works identically across SvelteKit, Nuxt, Remix, and Astro. The only difference is where the server-side code lives, such as server actions, API routes, loaders, or server endpoints.

How does Vercel Sandbox authentication work locally vs deployed?

On Vercel deployments, the SDK authenticates automatically via OIDC using VERCEL_OIDC_TOKEN. For local development, set VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID environment variables, which are passed into Sandbox.create().

Why is my Vercel Sandbox browser automation slow to start?

Without a snapshot, each run installs Chromium system dependencies and agent-browser from scratch, taking about 30 seconds. Create a snapshot once with the provided script and set AGENT_BROWSER_SNAPSHOT_ID to get sub-second startup.