开始使用

粘贴一段提示词到智能体里即可完成配置,然后选择下一步。

UI SDK 是一个行为库,提供浮层、列表和键入查找(typeahead)等行为,由你的智能体把它们组合成组件。它可以和 React、Vue、Svelte、Solid 和 Web Components 一起使用。

第一次来?简介说明了这一切是如何运作的。

快速开始

选择你的框架,然后把这段提示词复制到你的智能体里。

提示词
Set up ui-sdk in this React project. It needs React 19 or newer.

1. Install @ui-sdk/react and @ui-sdk/core with the project's package manager. If a release-age policy blocks the install, stop and ask me instead of changing it.
2. Add a note to AGENTS.md, creating it if needed: before using ui-sdk, follow the ui-sdk skill if it's installed, and read node_modules/@ui-sdk/react/docs/llms.txt. To build a new component, also search node_modules/@ui-sdk/react/docs/core.md by heading, and read rendering.md next to it.
3. If you support skills, run: npx skills@latest add vercel-labs/ui --skill ui-sdk

然后让你的智能体构建一个组件:

提示词
Build a search field with ui-sdk: a text input and a Clear button that only shows when there's text. Clear empties the input and puts focus back in it. Use our existing styles.

找到组件

或者查看所有组件。

自己构建

与智能体协作

看看更新日志里有哪些新内容。