NEWS

Vercel launches UI SDK for AI agents to compose interfaces with reusable building blocks

Vercel launches UI SDK for AI agents to compose interfaces with reusable building blocks
Image: Redação iMasters
News
Reading
4 min
In short

Open source library in beta treats keyboard navigation, focus, selection, and drag and drop as reusable behaviors, with a dedicated API for agents to operate components without relying on screenshots.

Vercel launched the UI SDK this Wednesday (the 18th), an open source TypeScript library that treats keyboard navigation, focus, selection, popups, and drag and drop as reusable behaviors, instead of leaving them buried inside ready-made components. The project is published on GitHub as vercel-labs/ui and remains in beta, at version 0.1.0-beta.1, under the Apache 2.0 license.

Vercel's proposal is twofold: to give developers a lower level of abstraction than finished components, and to give AI agents a way to read and operate those components without relying on screenshots of the interface. According to the announcement reported by InfoQ, the documentation and APIs may still change before a stable release, in line with the terms of the company's public beta.

Behaviors instead of ready-made components

The core of the project lives in the @ui-sdk/core package, which gathers more than 50 isolated behaviors. Among them are createPopup, createSelection, createTypeahead, createRovingFocus, createReorder, createResize, createViewport, createListbox, createChange, createFocusRecovery, and createVirtualizer.

Each one solves a specific piece of interaction, such as opening a floating menu in the right position or keeping keyboard focus cycling correctly between items in a list. The idea is that a developer, or more often an agent, combines these blocks inside definePrimitive, a function that declares at once the state, the public API, and the slots (visual parts) of a component.

From there, framework adapters come into play: createParts renders the same primitive in React, Vue, Svelte, Solid, or as Web Components, always with the same part names. The pieces come unstyled and expose attributes and CSS variables, for whoever will apply their own visual identity on top.

These same behaviors underpin an initial library of more than 50 ready-to-use unstyled components, from Color Picker and Token Input to Command, Calendar, Tree, and OTP Input, all with the same part structure across the five adapters.

A dedicated bridge for agents to operate the UI

The differentiator Vercel highlights is that the UI SDK was designed to be used by agents, not just written by them. A skill called ui-sdk, installed with npx skills add vercel-labs/ui --skill ui-sdk, points an agent to the Markdown documentation that already ships inside the installed packages.

At runtime, the createAgent function, imported from the corresponding framework package (for example, @ui-sdk/react/agent), exposes three operations: snapshot, act, and query. With them, an agent reads a component's state and calls actions through the component's own API, without needing a screenshot of the screen.

The application keeps control over these actions: it can approve or reject each step. Change callbacks receive an origin marked as agent and can cancel the change before it takes effect. registerTools, in turn, exposes the same methods to the agent embedded in the browser via WebMCP, when the browser provides document.modelContext.

In practice, this separates two roles that today tend to blur together: a coding agent that generates the interface, and a runtime agent that operates that interface once it's ready, such as clicking a menu item or reordering a list, in a way that's auditable and reversible by the app.

How this positions itself against what already exists

Developers already have several headless (unstyled) libraries at this same level of abstraction: Radix UI, Base UI, React Aria, Ark UI with its Zag.js state machines, and Headless UI. shadcn/ui sits one layer above these, as a component kit that gets copied into the developer's own repository. According to Vercel, the UI SDK aims lower, at composable behaviors shared across frameworks, and adds a dedicated bridge for agents.

The project's changelog explicitly thanks the teams behind Radix, Base UI, React Aria, shadcn/ui, Nuxt UI, and Geist, Vercel's own design system. Vercel did not say whether shadcn/ui will be rebuilt on top of the UI SDK in the future.

What the first people to look at the code said

Rahim, a product engineer at Mux and creator of the Vidstack player, reacted after reading the project's source code:

This is genuinely really cool. I loved how it was packaged. So elegant, @shadcn and @shuding! I'm going to study this for a while. 1. createAgent is a

Translated from the Brazilian Portuguese original · Read the original