使用工具端到端运行智能体,验证自主 API 调用,并确认完整的智能体管道。
连接工具并更新智能体合同后,您就可以测试完整管道了。
步骤 5 - 端到端测试
To test the agent end-to-end, use the Debug button from the toolbar at the top of the agent builder. This opens up the Debug configuration dialog, then do the following:
- Open the Entrypoint arguments tab
- Enter a quest description from the code block below
- Then select Save & Debug to run it
The villagers report a massive creature has been destroying farms on the edge of the forest at night.
The villagers report a massive creature has been destroying farms on the edge of the forest at night.
After you click on Save & Debug, you can watch the Execution Trail at the bottom of the agent builder as it executes. The Execution Trail shows the agent's full decision process. For a tool-using agent, expect at least three events:
- The agent's initial analysis of the quest
- The tool call with the search term it chose
- The tool response with the candidate list
The agent then reasons over those candidates before producing its final output.
您应该会看到:
- 智能体使用根据任务选择的搜索词来调用Unattended Query 。
- 该工具会返回候选对象列表。
- 智能体会选择最佳匹配项并返回五个输出字段。
Select the HTTP Request - Open5e Monster Query span to see the request the tool actually sent: the v2/creatures/ URL, the search term the agent chose in name__icontains, and the document__key and fields values you configured in Step 1. The response below it carries the key identifier for each candidate.
Verify the output contains all five fields: monsterIndex, monsterName, monsterType, monsterCr, and monsterReasoning. monsterIndex is the API's key, so it carries the srd_ prefix - for example srd_giant-ape. The monsterReasoning field should explain why the agent chose this monster for the quest.
您构建的内容
已经构建了 UiPathfinder 的第一个组件:
- Built a live API connector that searches the 5e SRD: one input, one HTTP request, one output.
- 已将其作为工具连接到智能体,只需在智能体构建器中进行选择。
- 现在,智能体可以自主决定何时调用工具、搜索什么内容,以及哪个候选对象最适合任务。
两步推理链(搜索词选择和候选对象评估)正是会生成有意义的评估信号的轨迹;这就是下一个实验室的内容。
后续操作
- Open5e API 文档- 探索完整的此项搜索 API,了解哪些字段可用。
- UiPath Integration Service - 构建连接到 SaaS API 的工具,而无需编写自定义工作流。
- UiPath 社区- 论坛、操作方法和开发者讨论。