Topic: AI agents

Introducing UI SDK: composable interactions and an interface agents can use

A practical introduction to UI SDK behaviors, primitives, framework adapters, and the agent bridge, with React requirements, benchmark limits, and a small Astro integration to evaluate.

Once the interface renders, keyboard behavior, focus, and state changes still need checking. · Source: GIPHY

A region picker for an events website might look like a button and a list of cities. Implementing it raises more questions: How do arrow keys move focus? Where does focus return after Escape? What happens near the edge of the screen? How does a screen reader identify the current selection?

Those details still need checking when AI helps write the frontend. A component that renders and responds to a mouse click is only part of the job.

What does UI SDK handle?

UI SDK is a TypeScript library with composable interaction behaviors, ready-made components, and an interface agents can use to read and operate components. It launched on November 12, 2026. When the documentation was checked for this article on November 14, it was still in beta, with APIs subject to change. Release introduction

Its two uses can be adopted separately: a coding agent can help build components during development, and a connected agent can operate the interface at runtime. Asking Codex to build a UI SDK select does not require adding an AI assistant to the website.

Behaviors, primitives, and adapters

Layer Responsibility Region picker example
Behavior A reusable interaction Move focus, select an item, open a popup
Primitive Bring state, actions, and component parts together Manage the selected region, open state, trigger, and items
Framework adapter Connect the interaction definition to a framework Render and use the picker in React

For example, createRovingFocus handles arrow-key focus movement, createTypeahead finds options as someone types, and createPopup handles a popup. Developers combine the behaviors they need, then use definePrimitive() to organize state, methods, and parts. Core introduction, Defining a primitive

This becomes useful as requirements grow. A single-choice region picker might later need search, multiple selection, and event counts. Its interaction foundations can be reused; fetching counts and deciding which filter combinations are valid remain application responsibilities.

Start with existing components

UI SDK includes components such as Select, Combobox, Dialog, and Date Picker, with adapters for React, Vue, Svelte, Solid, and Web Components. The interaction definition is shared across frameworks; each framework keeps its own rendering conventions. Release introduction

Start with those components for ordinary requirements. Compose behaviors into a custom primitive when an existing component cannot express the interaction the product needs.

Styling can stay with the application’s CSS. Components do not impose a visual design by default, and an optional default stylesheet is available. Adopting the library does not require replacing the whole design. React installation

Give the coding agent documentation to work from

The project provides a component-building skill, version-specific Markdown documentation in its packages, and testing tools for keyboard behavior, focus, and ARIA. Agent development support

A useful task is more specific than “build a region dropdown”:

Build an event-region filter using the existing styles. Users must be able to select a region with the keyboard, and closing the menu must return focus to the trigger. Connect the selected value to the existing search flow and check what happens when the filter is cleared.

That request describes interaction, data flow, and acceptance criteria. Package documentation helps the agent use the API correctly; developers still own the product rules and final checks.

How the agent bridge operates the interface

Suppose an events website has controls for region, date, and price. A user asks, “Find free events in Keelung this weekend.”

Once the application connects a model and the agent bridge, the agent can read integrated components and their available actions, then call component methods. snapshot() reads information, while act() executes actions. Changes go through the component API and change callbacks, and the application can use allow to accept or reject an action. Agent interaction

People and agents can work with the same controls. The agent fills in a region, the user adjusts the date, and the interface shows the application’s current filters.

Readable state and callable actions give an agent a defined way to operate the interface. · Source: GIPHY

Changing the region to Keelung does not complete the search. The application must connect that value to its search logic, whether that filters loaded data, calls an API, or navigates to a corresponding page. Acceptance checks should cover both the control and the actual event results.

How it relates to other UI tools and AI SDK

Tool Main focus
UI SDK Composable behaviors, components across frameworks, and an agent interface
Radix Primitives Low-level React components focused on accessibility and composition
React Aria Interactions, accessibility, and internationalization with your own styles
shadcn/ui Editable component source, default designs, and component distribution
AI SDK Model integration, tool calls, streaming, and other AI application capabilities

Radix and React Aria already address composable interactions and accessibility. The combination worth investigating in UI SDK is shared interaction definitions across frameworks, development resources for agents, and a runtime interface for operating components. Radix, React Aria, shadcn/ui

AI SDK handles the model side. An in-app assistant still needs message handling, tool execution, and results passed back to the model; UI SDK supplies the interface’s state and actions. AI SDK

If an application’s Dialog, Tabs, and Select already meet its needs, I would keep them. A custom interaction that is hard to implement, or a workflow where users and agents need to work together, offers a clearer reason to try UI SDK.

Try a small integration in Astro

For an events website, the region filter could live in a React island while Astro renders event descriptions and the main content. Astro can load JavaScript for selected interactive components, leaving room for a limited adoption. Astro islands documentation

This is an integration proposal, not a compatibility test against a particular project. The current installation guide requires React and React DOM 19 or newer, @types/react 19.2.10 or newer for TypeScript projects, and both @ui-sdk/react and @ui-sdk/core. React installation

The first trial can cover only region selection: show the current value, open the list, select an option, and update the search results. Check keyboard behavior, focus, mobile interaction, and hydration before adding the agent bridge. That makes it easier to separate component issues from search data flow or agent integration issues.

What the benchmark tells us

The official benchmark asked agents to rename a project, update members and notification settings, and save. Both approaches used Sonnet through Claude Code, with three runs per approach. The table shows medians, and every run completed the task.

Metric Browser tools UI SDK + agent bridge
Tool calls 16 5
Text returned by tools 39.8k characters 6.8k characters
Completion time 41 seconds 16 seconds
Cost reported by Claude Code US$0.073 US$0.032

Text volume is measured in characters, not tokens. The comparison changes both the component library and the interaction method, and the sample is small. It does not measure website loading speed, frontend JavaScript size, or how efficiently a coding agent writes code. Official benchmark

My reading is that structured interface actions are worth testing on a real task. These numbers are not enough to estimate savings across an entire project.

What I learned

I would treat building components with an agent and operating components through an agent as separate decisions. The development tools can be useful before a product needs a runtime assistant.

I would also verify the control value and search results together. UI SDK handles interactions; the application still owns data retrieval and correct results. The benchmark gives me a reason to try it, while the actual benefit needs checking against my own task.

Decide with one complete task

Adoption criteria can be concrete: a person can choose a region, an agent can change permitted filters, the controls and search results stay consistent, and the maintenance work is acceptable.

Complete that trial before expanding to dates, multiple selection, or a more complex editor. The library supplies interaction foundations; accessibility across the complete flow, application rules, and correct results still belong in the project’s acceptance checks.