agentic-ui-usage
Skill233 starsChanged 7 months agoMITView on GitHub
Guides how to use @ant-design/agentic-ui in applications (install, import, layout, chat, editor, i18n). Use when integrating the library, building chat/agent UI, or asking about component API from consumer perspective. Triggers on 使用 agentic-ui, 集成, 引入, 安装, chat UI, 智能体界面, 接入, import from agentic-ui, ConfigProvider, locale.
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- ant-design/agentic-uiword for word, first seen Oct 9, 2026
Other versions1 project uses a version of this.
Word for word · 1
- ant-design/agentic-ui★ 233100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/AGENTS.mdcCursor rule
- .cursor/rules/clean-code.mdcCursor rule
- .cursor/rules/codequality.mdcCursor rule
- .cursor/rules/playwright.mdcCursor rule
- .cursor/rules/react.mdcCursor rule
- .cursor/rules/test.mdcCursor rule
- llms.txtllms.txt
- agentic-ui-developmentSkill
- component-agentic-layoutSkill
- component-agent-run-barSkill
- component-ai-labelSkill
- component-answer-alertSkill
- component-bubbleSkill
- component-chat-boot-pageSkill
- component-chat-layoutSkill
- component-historySkill
- component-markdown-editorSkill
- component-markdown-input-fieldSkill
- component-pluginsSkill
- component-quote-backtoSkill
- component-schemaSkill
- component-sharedSkill
- component-task-listSkill
- component-thought-chainSkill
- component-tool-useSkill
- component-welcome-messageSkill
- component-workspaceSkill
- gh-create-prSkill
- markdown-syntax-guideSkill
The file
Files
Agentic UI 组件库使用指南
面向在业务项目中使用 @ant-design/agentic-ui 的开发者:安装、引入、常见场景与 API 查阅方式。
安装与依赖
pnpm add @ant-design/agentic-ui
# 或 npm / yarn- Peer:
react、react-dom>= 16.9.0(项目需已安装)。 - 运行时依赖:包内已含
antd、@ant-design/cssinjs等,无需单独安装。 - 使用前确保项目已正确引入 Ant Design 样式或 CSS-in-JS 方案(与 antd 5 一致)。
引入方式
// 按需引入常用组件
import {
AgenticLayout,
ChatLayout,
History,
Workspace,
Bubble,
AIBubble,
UserBubble,
MarkdownInputField,
MarkdownEditor,
ThoughtChainList,
ToolUseBar,
TaskList,
AgentRunBar,
WelcomeMessage,
ChatBootPage,
} from '@ant-design/agentic-ui';
// 类型
import type { HistoryItemProps, BubbleListProps } from '@ant-design/agentic-ui';- 组件与类型均从
@ant-design/agentic-ui单入口导出,无需从子路径导入。 - 若打包器支持 Tree Shaking,未用到的组件会被剔除。
典型使用场景
1. 智能体聊天整体布局
左栏历史 + 中间聊天 + 右侧工作区:
<AgenticLayout
left={<History dataSource={sessions} onSelect={...} />}
center={
<ChatLayout
header={...}
content={<Bubble.List messages={messages} />}
footer={<MarkdownInputField onSubmit={...} />}
/>
}
right={<Workspace tabs={[...]} />}
header={{ leftCollapsed, rightCollapsed, onLeftCollapse, onRightCollapse }}
/>2. 仅聊天区域(无三栏)
<ChatLayout
content={<Bubble.List messages={messages} />}
footer={<MarkdownInputField onSubmit={...} />}
/>3. 消息列表与气泡
- 使用
Bubble.List+AIBubble/UserBubble或直接传入messages与渲染约定。 - 流式、思维链、工具调用等由气泡与 ThoughtChainList、ToolUseBar 等配合展示。
4. 编辑器与输入
- 只读/展示:
MarkdownEditor只读模式或直接渲染 Markdown。 - 可编辑:
MarkdownEditor受控 +value/onChange。 - 输入框:
MarkdownInputField支持附件、语音、发送等,通过onSubmit等回调与后端对接。
5. 国际化
- 通过 Ant Design 的
ConfigProvider传入locale,与 antd 一致。 - 组件库内置中英文等 locale,可合并或覆盖:
import { locale } from '@ant-design/agentic-ui'(具体以文档为准),再传给ConfigProvider。
API 与文档查阅
- 组件 API:仓库内
docs/components/下各组件文档(如agentic-layout.md、bubble.md),含 Props、受控/非受控说明。 - Demo:
docs/demos-pages/与站点 Demo 页(如 layout、chat、editor、markdown-input-field、workspace、history 等)对应实际用法。 - 类型:从
@ant-design/agentic-ui导出,用 TypeScript 时可查看.d.ts或 IDE 提示。
使用注意
- 布局类(如
AgenticLayout、ChatLayout)需保证外层有合适宽高(如 100vh/100%)。 - 列表类(History、Bubble.List)注意数据源格式与文档中的类型定义一致。
- 主题与 token 随 Ant Design ConfigProvider 与主题配置生效,与 antd 5 一致。
在业务项目中接入、写页面或查 API 时,可优先参考本文与官方文档 Demo,再按需查阅各组件文档。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

