setup by assistant-ui/skills
npx skills add https://github.com/assistant-ui/skills --skill setuppackage.json):使用 npx assistant-ui@latest initnpx assistant-ui@latest init --yes--overwritenpx assistant-ui@latest create <name>-t <default|minimal|cloud|cloud-clerk|langgraph|mcp>npx assistant-ui@latest create <name> --example <example>npx assistant-ui@latest create <name> --preset <url>广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
create)npx assistant-ui@latest create my-app -t minimal
npx assistant-ui@latest create my-app -t cloud-clerk
npx assistant-ui@latest create my-app --preset "https://www.assistant-ui.com/playground/init?preset=chatgpt"
模板:
| 模板 | 描述 |
|---|---|
default | 包含 Vercel AI SDK 的默认模板 |
minimal | 最基础的起点 |
cloud | 云端持久化存储起始模板 |
cloud-clerk | 包含 Clerk 认证的云端起始模板 |
langgraph | LangGraph 起始模板 |
mcp | MCP 起始模板 |
当省略 -t 时:
default。在非交互式 shell 中,如果未提供项目目录,create 将使用 my-aui-app。
init)npx assistant-ui@latest init --yes
init 命令仅适用于现有项目(需要 package.json)。如果未找到项目,它会自动转发到 create。向 init 传递 --preset 也会转发到 create(兼容性路径)。
--yes 标志以非交互方式运行(无提示)。
npx assistant-ui@latest add markdown-text
npx assistant-ui@latest add thread-list
注册表:https://r.assistant-ui.com/{name}.json
使用 CLI 模板时(npx assistant-ui@latest create),切勿修改生成的代码,除非明确要求。
对于 AI SDK 以外的运行时或 Next.js 以外的框架,请查阅参考文件:
| 设置 | 运行时钩子 | 参考 |
|---|---|---|
| AI SDK 高级(工具、云端、选项) | useChatRuntime | references/ai-sdk.md |
| 样式和 UI 自定义(shadcn 模式) | — | references/styling.md |
| LangGraph 智能体 | useLangGraphRuntime | references/langgraph.md |
| AG-UI 协议 | useAgUiRuntime | references/ag-ui.md |
| A2A 协议 | useA2ARuntime | references/a2a.md |
| 自定义流式 API | useLocalRuntime | references/custom-backend.md |
| 现有状态(Redux/Zustand) | useExternalStoreRuntime | references/custom-backend.md |
| Vite / TanStack Start | — | references/tanstack.md |
切勿安装 @assistant-ui/styles 或 @assistant-ui/react-ui —— 两者均已弃用并删除。
对于参考文件未涵盖的问题,请使用文档网站:
https://www.assistant-ui.com/llms.txt —— 简洁的目录表.mdx,例如 https://www.assistant-ui.com/docs/runtimes/ai-sdk.mdx每周安装量
450
代码仓库
GitHub 星标数
7
首次出现
2026年1月21日
安全审计
安装于
codex368
opencode357
gemini-cli350
github-copilot339
cursor300
amp292
package.json exists): use npx assistant-ui@latest initnpx assistant-ui@latest init --yes--overwritenpx assistant-ui@latest create <name>-t <default|minimal|cloud|cloud-clerk|langgraph|mcp>npx assistant-ui@latest create <name> --example <example>npx assistant-ui@latest create <name> --preset <url>create)npx assistant-ui@latest create my-app -t minimal
npx assistant-ui@latest create my-app -t cloud-clerk
npx assistant-ui@latest create my-app --preset "https://www.assistant-ui.com/playground/init?preset=chatgpt"
Templates:
| Template | Description |
|---|---|
default | Default template with Vercel AI SDK |
minimal | Bare-bones starting point |
cloud | Cloud-backed persistence starter |
cloud-clerk | Cloud-backed starter with Clerk auth |
langgraph | LangGraph starter template |
mcp | MCP starter template |
When -t is omitted:
default.If no project directory is provided in a non-interactive shell, create uses my-aui-app.
init)npx assistant-ui@latest init --yes
The init command is for existing projects only (requires package.json). If no project is found, it automatically forwards to create. Passing --preset to init also forwards to create (compatibility path).
The --yes flag runs non-interactively (no prompts).
npx assistant-ui@latest add markdown-text
npx assistant-ui@latest add thread-list
Registry: https://r.assistant-ui.com/{name}.json
When using CLI templates (npx assistant-ui@latest create), never modify generated code unless explicitly requested.
For runtimes other than AI SDK or frameworks other than Next.js, consult the reference files:
| Setup | Runtime Hook | Reference |
|---|---|---|
| AI SDK advanced (tools, cloud, options) | useChatRuntime | references/ai-sdk.md |
| Styling and UI customization (shadcn pattern) | — | references/styling.md |
| LangGraph agents | useLangGraphRuntime | references/langgraph.md |
| AG-UI protocol | useAgUiRuntime | references/ag-ui.md |
NEVER install @assistant-ui/styles or @assistant-ui/react-ui — both are deprecated and deleted.
For issues not covered by the reference files, use the docs website:
https://www.assistant-ui.com/llms.txt — compact table of contents.mdx to the docs URL, e.g. https://www.assistant-ui.com/docs/runtimes/ai-sdk.mdxWeekly Installs
450
Repository
GitHub Stars
7
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
codex368
opencode357
gemini-cli350
github-copilot339
cursor300
amp292
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装
| A2A protocol | useA2ARuntime | references/a2a.md |
| Custom streaming API | useLocalRuntime | references/custom-backend.md |
| Existing state (Redux/Zustand) | useExternalStoreRuntime | references/custom-backend.md |
| Vite / TanStack Start | — | references/tanstack.md |