
Vercel Sandbox
The vercel-sandbox skill enables developers to run agent-browser with headless Chrome inside ephemeral Vercel Sandbox microVMs for browser automation tasks. It solves the problem of executing browser automation in Vercel-deployed applications (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.) without binary size constraints or infrastructure setup, providing on-demand Linux VMs that spin up, execute commands, and shut down automatically. The skill supports both snapshot-based rapid startup and standard initialization with system dependencies and agent-browser installation.
- skills.sh installs
- 11.3K
- GitHub stars
- 29.3K
Install
$ npx -y skills add vercel-labs/agent-browser --skill vercel-sandbox --agent claude-codeInstalls into .claude/skills of the current project.
Files
Browser Automation with Vercel Sandbox
Run agent-browser + headless Chrome inside ephemeral Vercel Sandbox microVMs. A Linux VM spins up on demand, executes browser commands, and shuts down. Works with any Vercel-deployed framework (Next.js, SvelteKit, Nuxt, Remix, Astro, etc.).
Dependencies
pnpm add @agent-browser/sandbox @vercel/sandbox
The sandbox VM needs system dependencies for Chromium plus agent-browser itself. The @agent-browser/sandbox helpers install them by default for fresh sandboxes and use sandbox snapshots (below) for sub-second startup. Pass installSystemDependencies: false only when the sandbox image already provides Chromium's required libraries.
Core Pattern
import {
createAgentBrowserSnapshot,
runAgentBrowserCommand,
withAgentBrowserSandbox,
type VercelSandboxSession,
} from "@agent-browser/sandbox/vercel";
async function withBrowser<T>(
fn: (sandbox: VercelSandboxSession) => Promise<T>,
): Promise<T> {
return withAgentBrowserSandbox(fn);
}
Screenshot
The screenshot --json command saves to a file and returns the path. Read the file back as base64:
Sponsors