- 入门指南
- Studio Web 中的 UiPath 智能体
- UiPath 编码智能体

智能体用户指南
开始使用对话智能体
构建对话智能体遵循结构化生命周期,包括设计、测试、部署和监控。 关键步骤为:
- 设计智能体:使用 Studio Web 定义智能体的系统提示,配置可用工具,添加上下文锚定并设置升级工作流。
- 测试和评估:使用内置的调试聊天功能测试多轮交互。 将真实或模拟对话添加到评估集中,以验证行为和性能。
- 发布和部署:将智能体作为解决方案包发布到 Orchestrator。 确保解决方案文件夹包含用于执行的无服务器和无人值守机器人。
- 访问和管理:通过实例管理与智能体交互。 监控 runtime 行为,查看追踪日志,并根据反馈进行迭代。
在设计对话智能体时,请考虑以下最佳实践:
- 从明确的角色开始:定义智能体的语气和作用域(例如,“您是一个友好的人力资源助理...”)。
- 针对不可预测性的设计:用户可能会提供不完整或不正确的信息。 优雅地处理模糊问题。
- 指导工具使用:确保工具描述中清楚地说明了使用时间以及方式。
- 通过评估进行迭代:为正常路径和异常路径创建测试用例。相应地更新智能体逻辑。
构建对话智能体
您可以使用 Studio Web 中与自主智能体相同的低代码设计器创建对话智能体,其主要区别在于为实时多轮对话量身定制。
创建智能体
要开始:
-
选择“新建”按钮,然后选择“智能体”。
-
选择“对话智能体”类型。
(可选择)向 Autopilot 描述您的智能体,以生成入门配置
图 1. 创建新的对话智能体

与对话智能体发起对话会触发专用于该聊天的 Orchestrator 流程。此流程始终显示为“正在运行” ,因此可以立即响应您的消息。但是,它仅在您实际发送消息时才会消耗资源。在空闲和等待时,它不使用任何资源。
配置系统提示
系统提示定义了智能体的角色、目标、行为约束和工具/升级逻辑。 用于指导智能体如何:
- 向用户问候。
- 处理未知查询。
- 升级问题或调用工具。
- 保持一致的语气和风格。
Autopilot 可以根据您的用例帮助生成有效的启动提示词。
Conversational agents do not use user prompts or Data Manager inputs/outputs, however the conversational agent will have knowledge of authenticated user's name and email.
配置工具
Conversational agents can use the same tools as autonomous agents, including RPA workflows, API workflows, activities, other agents (excluding conversational agents), MCP servers (preview), IXP models (preview), and ready-to-use tools such as Analyze Attachments.
对于仅执行 API 调用的工作流,我们建议使用 API 工作流,以便在实时聊天中获得最佳性能。
使用工具级防护机制实施 runtime 策略。防护机制在测试和 runtime 都适用,在追踪日志中可见。有关详细信息,请参阅“护栏”。
配置上下文
添加上下文锚定索引,以向您的智能体提供特定知识源的访问权限。 智能体可以查询这些索引,以提供有信息依据的引文支持的响应。 有关详细信息,请参阅“上下文”。
Use files
You can upload files directly through the chat box for analysis. This enables conversational agents to process various file-based inputs seamlessly during interactions. The pre-built Analyze Attachments tool also supports file uploads and allows agents to interpret and reason over file content using large language models (LLMs).
You cannot include attachments in evaluation runs. While conversations can be added to an evaluation set, attachments cannot be passed in through debug chat, traces, or manual uploads.
配置升级和智能体记忆
对话智能体支持升级工作流和智能体记忆,以改进决策:
- 通过升级,智能体能够在置信度较低或用户意图不明确的场景下,通过 Action Center 将对话交给人类。对话同步运行,这意味着智能体会暂停所有进一步的交互,直到升级问题解决。
- 智能体记忆使智能体能够记住并重用之前解决的升级,从而减少冗余并提高效率。
有关详细信息,请参阅“升级和智能体记忆”。
评估和测试智能体
评估有助于确保您的对话智能体在各种对话路径中表现可靠。 此流程与评估自主智能体类似,但适用于对话。
Select Debug to run the agent in a chat-like environment, and interact with your agent using natural language.
Expand the full execution trace, which provides real-time tracing of the agent execution. It shows details such as:
- 智能体 LLM 调用和响应
- 工具调用,包含参数和最终输出
Add test cases directly from the History panel by selecting Add to evaluation set after a test run. An evaluation test is created for the conversation with:
- 对话历史记录:对话中之前切换的记录。
- 当前用户消息:用户在对话中发出的最新消息。
- 智能体预期响应。
这样可以测试智能体维护上下文和处理后续问题的能力,这对于获得良好的对话体验至关重要。
图 2. 创建评估集

For each evaluation test, you can use the Conversation builder interface to edit the conversation history and the current user prompt. A similar interface lets you define and refine the expected agent response, ensuring accurate test validation.
图 3. 编辑评估测试时出现的对话构建器窗口

图 4. 您可以通过选择“添加到评估集中”,从“调试聊天”中导入对话

访问对话智能体
After you publish and deploy a conversational agent, you can interact with it through the Agents Instance Management page.
图 5. 智能体实例管理

在 Microsoft Teams 和 Slack(预览版)中访问智能体
Conversational agents are available in Microsoft Teams and Slack. For details, refer to:
将对话智能体嵌入 UiPath 应用程序
您还可以使用 IFrame 组件直接将对话智能体嵌入到 UiPath 应用程序中。
-
创建和发布:首先,确保您的对话智能体已创建并发布。
-
添加 IFrame:在 Studio 中打开您的应用程序,然后将 IFrame 组件添加到您的页面中。
-
配置 URL:将 IFrame 的“来源”属性设置为使用以下格式和参数构建的 URL:
"https://<cloud_env>.uipath.com/<organization>/<tenant>/autopilotforeveryone_/conversational-agents/?agentId=<agent_id>&mode=embedded&title=<title>&welcomeTitle=<welcome_title>&welcomeDescription=<welcome_description>&suggestions=<suggestions>"有关详细信息,请参阅下表。
-
发布应用程序:发布您的应用程序。智能体已嵌入,随时可用!
参数 | 必填 | 描述 |
|---|---|---|
agentId | 是 | The Release ID of the published agent. To find it, navigate to Agents > Conversational agents, select "Chat now" on your agent, and copy the ID from the URL. |
mode | 否 |
默认为 |
title | 否 | 在聊天组件标头中显示的标题。默认为智能体名称。 |
welcomeTitle | 否 | 首次运行欢迎屏幕的标题。默认值为空字符串。 |
welcomeDescription | 否 | 首次运行欢迎屏幕的描述。默认值为空字符串。 |
suggestions | 否 | 为用户提供的首次运行建议提示词数组。默认为空数组 []。 备注:
|
showHistory | 否 | 布尔值 ( |