UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

uip 智能体刷新

应用待处理的架构迁移,并使用“uip 智能体刷新”重新生成派生文件。

uip agent refresh应用待处理架构迁移,并从 重新生成派生文件(entry-points.json bindings_v2.jsonagent.json)。即使存储架构已是最新版本,它始终会重新生成这些工件。每次编辑agent.json后,在uip agent validate之前运行。

与validate不同,刷新会写入文件:它会修复偏移的contentTokens ,突出过期的agent.version ,应用内存中的迁移管道,然后写回已迁移的文件,重新生成entry-points.json / bindings_v2.json ,并且 — --inline-in-flow智能体 — 为任何连线 Integration Service 连接器工具生成resources/<id>/resource.json ,并从父级.flow文件中去除该智能体的过时嵌入式配置(尽最大努力;命令永不失败)。

大纲​

uip agent refresh [path] [--path <path>] [--bindings-target <path>] [--inline-in-flow]
uip agent refresh [path] [--path <path>] [--bindings-target <path>] [--inline-in-flow]

[path] 与 --path 互斥 — 两者都传递会抛出 AgentRefreshConflictingPath。

所有调用均遵循全局选项( --output 、 --output-filter 、 --log-level 、 --log-file )。退出代码遵循标准合同。

参数​

  • [path] (可选,默认为. ) — 智能体项目目录。不能与 --path 一起使用。

选项​

标记默认用途
--path <path>—位置参数 [path] 的替代选项。无法与之结合使用。
--bindings-target <path><projectDir>/bindings_v2.json;对于 --inline-in-flow,当直属父目录包含 bindings_v2.json 文件时,为直接父目录的 .flow要将智能体工具绑定写入/合并的路径。
--inline-in-flow关闭刷新流程项目中的内联智能体。跳过 entry-points.json 次检查 / project.uiproj 次检查;绑定将合并到父级流程项目的 bindings_v2.json 中。

示例​

# Refresh the current directory after editing agent.json
uip agent refresh

# Refresh a specific standalone project
uip agent refresh ./my-agent

# Refresh an inline agent, merging bindings into the parent flow
uip agent refresh ./my-flow/<uuid> --inline-in-flow
# Refresh the current directory after editing agent.json
uip agent refresh

# Refresh a specific standalone project
uip agent refresh ./my-agent

# Refresh an inline agent, merging bindings into the parent flow
uip agent refresh ./my-flow/<uuid> --inline-in-flow

数据形状(--输出 json)​

{
  "Code": "AgentRefresh",
  "Data": {
    "Status": "Refreshed — storage schema migrated to 47.0.0; artifacts regenerated",
    "ProjectDir": "/abs/path/my-agent",
    "Model": "gpt-5.4",
    "StorageVersion": "47.0.0",
    "MigrationApplied": true,
    "Validated": { "agent": true, "resources": 2, "evalSets": 0, "evaluators": 0 },
    "AgentVersionBumped": true,
    "MigratedFiles": 1,
    "ConnectorToolsGenerated": [
      { "nodeId": "n1", "name": "SlackSender", "connectorKey": "uipath-slack", "resourceId": "a1b2c3d4-0000-0000-0000-000000000605" }
    ],
    "DerivedFilesGenerated": true,
    "DerivedFiles": 2,
    "FlowShellified": true,
    "FlowResourceNodesStripped": 1,
    "Warnings": ["..."]
  }
}
{
  "Code": "AgentRefresh",
  "Data": {
    "Status": "Refreshed — storage schema migrated to 47.0.0; artifacts regenerated",
    "ProjectDir": "/abs/path/my-agent",
    "Model": "gpt-5.4",
    "StorageVersion": "47.0.0",
    "MigrationApplied": true,
    "Validated": { "agent": true, "resources": 2, "evalSets": 0, "evaluators": 0 },
    "AgentVersionBumped": true,
    "MigratedFiles": 1,
    "ConnectorToolsGenerated": [
      { "nodeId": "n1", "name": "SlackSender", "connectorKey": "uipath-slack", "resourceId": "a1b2c3d4-0000-0000-0000-000000000605" }
    ],
    "DerivedFilesGenerated": true,
    "DerivedFiles": 2,
    "FlowShellified": true,
    "FlowResourceNodesStripped": 1,
    "Warnings": ["..."]
  }
}

Status 读取为“已在 <version>”而不是“迁移到”未应用迁移时。Validated 之后的每个字段都是可选的,并且仅在该步骤产生某些结果时才存在: AgentVersionBumped 仅当 agent.version 本身发生冲突时;仅当 MigratedFiles 为 true 时,MigrationApplied才为 ; ConnectorToolsGenerated仅适用于生成新连接器工具资源文件的 --inline-in-flow 运行; FlowShellified/FlowResourceNodesStripped 仅适用于父 --inline-in-flow 的嵌入式配置已被移除的 .flow 运行;仅当发生非严重警告时,才使用 Warnings。已为 InlineInFlow: true 运行添加 --inline-in-flow。

失败时使用的Code: "AgentRefreshFailed" Data.Errors数组形状与uip agent validate 相同。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新