
The app spins up a Vercel Sandbox from a pre-built snapshot that includes:
When a user sends a message, Claude uses the computer tool (screenshot, click, type, scroll) and the bash tool (run shell commands) to interact with the sandbox desktop. The noVNC stream is displayed in a resizable iframe alongside the chat.
User ↔ Next.js Chat UI ↔ AI SDK ↔ Claude Sonnet 4.5↓Vercel Sandbox┌─────────────────────┐│ Xvnc (:99) ││ openbox ││ Chrome ││ websockify → noVNC │└─────────────────────┘↓noVNC iframe in browser
You can deploy your own version to Vercel by clicking the button below:
pnpm install
Install the Vercel CLI and link your project:
pnpm install -g vercelvercel linkvercel env pull
This creates a .env.local file with VERCEL_OIDC_TOKEN for Sandbox authentication.
Alternatively, set VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID manually in your .env.local.
The snapshot pre-installs the desktop environment (Xvnc, Chrome, openbox, noVNC, xdotool, ImageMagick) so sandboxes boot in seconds.
npx tsx lib/sandbox/create-snapshot.ts
This takes ~10 minutes. When done, it outputs a snapshot ID. Add it to your .env.local:
SANDBOX_SNAPSHOT_ID=snap_xxxxxxxxxxxxx
ANTHROPIC_API_KEY=sk-ant-...
pnpm dev
Open http://localhost:3000 to use the computer use agent.
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | Yes | Anthropic API key for Claude |
SANDBOX_SNAPSHOT_ID | Yes | Vercel Sandbox snapshot with the desktop environment |
VERCEL_OIDC_TOKEN | Yes* | Auto-set by vercel env pull for Sandbox auth |
VERCEL_TOKEN | Alt* | Alternative to OIDC — a Vercel personal access token |
VERCEL_TEAM_ID | Alt* | Required with VERCEL_TOKEN |
VERCEL_PROJECT_ID | Alt* | Required with VERCEL_TOKEN |
* Either VERCEL_OIDC_TOKEN (via vercel env pull) or the VERCEL_TOKEN + team/project IDs are required for Sandbox authentication.