
Vercel UI SDK Guide: Let an AI Agent Operate Your React Components Safely, Without Screenshots
Also available in Hindi: यह लेख हिंदी में पढ़ें
Vercel's UI SDK is a new open-source TypeScript library, now in public beta, that agents can use and not just write. Its createAgent bridge lets an AI agent read your components' state and call their actions through the component's own API, with no screenshots. It is Apache 2.0, published as vercel-labs/ui, and its APIs may still change.
Step 1: install and add a component
For React (version 19 or later):
npm install @ui-sdk/react @ui-sdk/core
npx skills add vercel-labs/ui --skill ui-sdk
The second command gives your coding agent the docs shipped inside the packages. Adapters also exist for Vue, Svelte, Solid and Web Components. Give each component an accessible name, because the agent finds it by its label:
<Input aria-label="Project name" defaultValue="Apollo" />
Step 2: create the bridge
import { createAgent } from "@ui-sdk/react/agent"
const agent = createAgent()
const page = agent.snapshot()
await agent.act({ steps: [{ ref: "Project name", action: "setValue", args: ["Atlas"] }] })
snapshot lists components with their label, value and allowed actions. act runs steps in order; if one fails, earlier steps stay applied. query finds choices in a Select or Combobox. agentTools gives you JSON Schemas for these three tools to pass to your model, and registerTools exposes them to a browser agent through WebMCP.
Step 3: ask a person before risky changes
Without an allow callback, the bridge accepts every supported action. Add one:
const agent = createAgent({
allow: (step) => step.confirm ? window.confirm(step.confirm) : step.action === "setValue",
})
Return true, false or a promise. If nobody answers within 5 minutes, the step fails. Your change callbacks also see details.source === "agent" and can call details.cancel().
Step 4: mark what the agent may see
data-agent-confirm="Charges $20..."makes a control wait for a person.data-agent-hiddenremoves a section from what the agent sees.data-agent-secretshows the value as "[redacted]". Password, card and one-time-code fields are treated as secret automatically.
Text from the page can include what users typed, so treat it as data and keep humans approving anything that spends money or deletes things.
Related reading: A2UI 1.0 interactive agent UI, Vercel eve 1.0 first agent, how to build an AI agent and the Vercel tool page.
Sources
- Introducing UI SDK, UI SDK changelog (vercel-labs/ui on GitHub)
- Connect an Agent, UI SDK docs
- Permissions, UI SDK docs
- Vercel Releases UI SDK for Agents, InfoQ (18 Nov 2026)
FAQ
Is Vercel UI SDK free?
Yes. It is open source under the Apache 2.0 licence. It is a beta, so APIs may change before general availability.
Do I need Vercel hosting?
No. It is a front-end library that runs in your app wherever you host it.
Does it work outside React?
Yes. There are adapters for Vue, Svelte, Solid and Web Components.
How is it different from Radix UI or shadcn/ui?
It works at a lower level, as shared behaviours across frameworks, and adds a built-in bridge for agents.