---
name: php186-skill-75523
description: "使用 assistant-ui 构建具有可重用线程、运行时、消息组件和模型/提供者适配器的生产级 React 聊天界面。"
---

# Build React agent chat interfaces with assistant-ui

## 使用 assistant-ui 构建 React 代理聊天界面

 

使用 assistant-ui 构建具有可重用线程、运行时、消息组件和模型/提供者适配器的生产级 React 聊天界面。

 

## 先决条件

 

React 应用程序，@assistant-ui/react，运行时适配器如 @assistant-ui/react-ai-sdk，后端模型或代理端点

 

## 安装

 

使用与您的环境匹配的上游安装或设置路径：

 

- npx assistant-ui@latest create # 新项目
- npx assistant-ui@latest init # 添加到现有项目
- npm install @assistant-ui/react @assistant-ui/react-ai-sdk

 

基本用法或入门说明：

 

- 最快的路径是 CLI，它会生成一个 Next.js 应用程序或将样式组件添加到现有项目中：
- bash
- 或者直接安装包：
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/assistant-ui/assistant-ui/HEAD/README.md

 

## 文档

 

- https://www.assistant-ui.com
