- 简介
- UiPath 智能体入门
- 开始使用 UiPath 智能体(采用 LangGraph)
- 在 Studio Web 中构建低代码智能体
- 向 UiPath 智能体添加工具
- Getting Started with UiPath Maestro Flow
使用 UiPath CLI 和编码智能体技能构建、评估和发布编码 LangGraph 智能体。
在本实验室中,您将安装 UiPath CLI 和 Coding Agent 技能,然后使用 Coding Agent 构建、运行和评估 LangGraph 智能体。您将执行以下操作:
- 安装 UiPath CLI 和编码智能体技能。
- 构建一个本地项目,并在技能指导下构建 LangGraph 智能体。
- Add a live external lookup tool to the agent.
- 在本地运行和评估智能体。
- 将项目连接到 UiPath Studio Web 并推送第一个版本。
最后,您将在 UiPath 技能的指导下,通过编码智能体构建一个可用的 LangGraph 智能体,并将评估追踪记录上传到 Studio Web。
There are three approaches to create UiPath agents. This uses the LangGraph SDK; you can also create agents using the low-code Agent Builder and using the UiPath CLI.
预计时间: 45–60 分钟
您要构建的内容
This lab walks you through building a quest intake classifier for a fictional adventurer's guild: a coded LangGraph agent that reads a quest description and sorts it into one of four difficulty tiers.
It starts as a simple, single-node classifier so the focus stays on the CLI workflow, not the domain logic. Then you give it a tool so it can check its answer against a live external API before finalizing a tier, instead of guessing from vibes alone.
以下是您正在构建的内容的完整设计:
| 组件 | 详细信息 |
|---|---|
输入: description | string; the incoming quest description |
输出: tier | A Literal type constrained to exactly "Trivial", "Standard", "Heroic", or "Legendary", not a plain string, so the model cannot emit an out-of-vocabulary tier |
输出: reasoning | string; the agent's explanation for the tier it chose |
Tool: get_challenge_rating | A LangGraph tool, called only when a quest names or implies a specific creature, that looks up its challenge rating from the Open5e System Reference Document (SRD) API and cites it in the reasoning |
Why add a tool at all? A driving reason to run a LangGraph agent on UiPath, instead of a low-code agent, is complex Python logic that can call out to external systems, not just classify text. The tool step in this lab demonstrates that: the agent decides at runtime whether a quest needs verification, calls a live API, and reasons over the result.
先决条件
- CLI version - validated against UiPath CLI v1.201.0 (installed in Step 1). Different versions may behave differently; report drift with
uip feedback send. - UiPath 帐户- 开始之前,请注册或登录UiPath Automation Cloud 。
- Node.js 18+ - 安装 UiPath CLI 所必需的。检查
node --version。如有需要,请从nodejs.org下载。 - VS Code与编码智能体(Claude Code、Copilot 或 Cursor)一起使用。实验室说明使用 Claude Code,但任何受支持的编码智能体都可以使用。
- Bash 终端- 此实验室中的命令使用 Bash 语法。在 VS Code 中,打开一个新终端,然后选择Git Bash (或等效选项)作为终端类型。PowerShell 和 CMD 语法不同,可能会导致意外错误。
- ug - 快速的 Python 包管理器。使用以下命令安装:
或参阅ug 安装文档以了解其他选项。
pip install uvpip install uv - 管理员权限- 安装全局 npm 包和 Python 依赖项需要管理员/提升权限。如果您使用的是受到限制的工作笔记本电脑,请在开始之前确认您可以安装软件包,或提前与 IT 团队联系。
本实验无需具备 UiPath 知识,但具备 UiPath 知识将使其运行速度更快。
此实验室中的 2 名“智能体”。“编码智能体”是 UiPath 的术语,指的是部署在平台上的 Python 智能体;本实验室将使用 LangGraph SDK 构建一个示例。实验室说明中还会引用您的“编码智能体”(Claude Code、Copilot、Cursor),以帮助您编写 Python 代码。
When the instructions say "ask your coding agent," they mean your integrated development environment (IDE) assistant; when they say "run the agent" or "your LangGraph agent," they mean the UiPath agent being built.