uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
uip 智能体调试
使用示例输入对 Studio Web 运行低代码智能体,并使用“uip agentDebug”流式传输结果。
uip agent debug 使用您提供的输入,针对 Studio Web 端到端运行低代码智能体,轮询直到运行完成且流式传输状态发生变化。需要登录。
项目必须使用 project.uiproj 清单文件 — 仍使用旧版 project.json 布局的项目会快速失败,并显示转换指令(uip solution pack/publish 等打包命令仍接受 project.json;仅适用于 Studio 网页的命令,例如需要使用较新的清单文件)。
大纲
uip agent debug <project-path> [-i <json>] [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]
uip agent debug <project-path> [-i <json>] [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]
参数
<project-path>(必填) — 智能体项目目录的路径(包含agent.json)。
选项
| 标记 | 默认 | 用途 |
|---|---|---|
-i, --inputs <json> | {} | JSON 对象形式的输入参数,例如'{"input":"hello"}'。必须解析为普通对象。 |
--poll-interval <ms> | 2000 | 轮询间隔(以毫秒为单位)。 |
--timeout <seconds> | 600 秒(10 分钟) | 等待运行完成的最长秒数。 |
--login-validity <minutes> | 10 | 要继续操作,在令牌过期之前剩余的最短分钟数。 |
示例
uip agent debug ./my-agent -i '{"input":"hello"}'
uip agent debug ./my-agent --timeout 120 --poll-interval 5000
uip agent debug ./my-agent -i '{"input":"hello"}'
uip agent debug ./my-agent --timeout 120 --poll-interval 5000
数据形状(--输出 json)
成功( Code: "AgentDebug" ):
{
"Code": "AgentDebug",
"Data": {
"JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
"TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
"State": "Successful",
"Output": { "content": "hi there" }
},
"Instructions": "Debug run completed: Successful"
}
{
"Code": "AgentDebug",
"Data": {
"JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
"TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
"State": "Successful",
"Output": { "content": "hi there" }
},
"Instructions": "Debug run completed: Successful"
}
Output 仅当运行生成一个时才存在;仅当服务返回额外诊断信息时,才存在 Info。
不成功的最终状态— 相同的Code: "AgentDebug" ,但作为失败返回(退出代码1 ), Message: "Debug run <state>."和Instructions指向uip traces spans get <TraceId>以检查运行。
项目清单文件不兼容:
{
"Result": "Failure",
"ErrorCode": "invalid_argument",
"Message": "...",
"Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
{
"Result": "Failure",
"ErrorCode": "invalid_argument",
"Message": "...",
"Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
相关内容
uip agent validate— 首先运行以确认项目格式正确;上传失败说明中建议。uip traces spans get— 在处于不成功状态后检查调试运行的追踪。