Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Open-source AI agent demonstrating Claude Sonnet 4.5 computer use with Next.js, Vercel Sandboxes, and the AI SDK.
AI SDK Computer Use Demo is an open-source reference app from Vercel Labs that pairs the AI SDK with Anthropic Claude Sonnet 4.5 to create a chatbot that can control a real Linux desktop inside a Vercel Sandbox. It takes natural-language chat messages as input and returns streaming text responses while Claude uses a computer tool and a bash tool to perform actions such as clicking, typing, scrolling, and running shell commands in the remote environment.
This template is a full-stack Next.js application built with the App Router, Tailwind CSS, and shadcn/ui. It runs on Vercel and uses a pre-built Sandbox snapshot containing Xvnc, openbox, noVNC, websockify, Google Chrome, xdotool, and ImageMagick, so the model can see and interact with a desktop streamed to the browser. The project is publicly available on GitHub under the vercel-labs organization.
When a user sends a message, the Next.js chat UI streams the prompt to Claude Sonnet 4.5 through the AI SDK. Claude calls the computer tool to take screenshots, move the mouse, type, and scroll, and the bash tool to run shell commands inside the Vercel Sandbox. The sandbox's Xvnc display is captured and forwarded through websockify to noVNC, which renders the desktop in a resizable iframe in the browser.
The template is open-source and free to use, but running it requires a Vercel account for Sandbox access and an Anthropic API key, both of which are paid services beyond any free tier.
Node.js 18 or later, the Vercel CLI, a Vercel account, and an Anthropic API key. After installing dependencies with pnpm, you create a Sandbox snapshot using npx tsx lib/sandbox/create-snapshot.ts, which takes about 10 minutes, then set the ANTHROPIC_API_KEY and SANDBOX_SNAPSHOT_ID variables.
No. The remote desktop environment is a Vercel Sandbox, and authentication relies on either a VERCEL_OIDC_TOKEN generated by the Vercel CLI or a VERCEL_TOKEN, VERCEL_TEAM_ID, and VERCEL_PROJECT_ID set manually.
