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

UiPath CLI 用户指南

UIP 智能体配置

uip agent config用于读取并更新智能体项目的agent.json中的单个密钥。这方便了自动化和脚本:它所做的所有操作都可以通过手动编辑agent.json来完成,但动词可以理解文件的结构(设置、元数据、消息),并公开平面键命名空间。

大纲

uip agent config get [key] [--path <dir>]
uip agent config set <key> <value> [--path <dir>]
uip agent config get [key] [--path <dir>]
uip agent config set <key> <value> [--path <dir>]

所有uip agent config子命令均采用全局选项--output--output-filter--log-level--log-file )。退出代码遵循标准合同

获取 uip 智能体配置

agent.json读取单个密钥(或完整的策划摘要)。

参数

  • [key] (可选) — 配置密钥。已知键包括modelnamesystemPrompt以及agent.json支持的任何其他嵌套路径(在没有策划摘要密钥的情况下运行uip agent config get )。省略打印该摘要。

选项

标记默认用途
--path <path>.智能体项目目录的路径。

示例

# Read a single key
uip agent config get model --path ./my-agent

# Dump the curated summary for the current directory
uip agent config get
# Read a single key
uip agent config get model --path ./my-agent

# Dump the curated summary for the current directory
uip agent config get

数据形状(--输出 json)

单密钥( Code: "AgentConfigGet" ):

{
  "Code": "AgentConfigGet",
  "Data": {
    "Key": "model",
    "Value": "gpt-4o-2024-11-20"
  }
}
{
  "Code": "AgentConfigGet",
  "Data": {
    "Key": "model",
    "Value": "gpt-4o-2024-11-20"
  }
}

摘要(无键):

{
  "Code": "AgentConfigGet",
  "Data": {
    "Name": "my-agent",
    "Description": "-",
    "Model": "gpt-4o-2024-11-20",
    "Engine": "advanced",
    "MaxTokens": "-",
    "Temperature": "-",
    "SystemPrompt": "You are…",
    "UserPrompt": "-"
  }
}
{
  "Code": "AgentConfigGet",
  "Data": {
    "Name": "my-agent",
    "Description": "-",
    "Model": "gpt-4o-2024-11-20",
    "Engine": "advanced",
    "MaxTokens": "-",
    "Temperature": "-",
    "SystemPrompt": "You are…",
    "UserPrompt": "-"
  }
}

SystemPromptUserPromptcontentagent.json数组中的systemuser条目的messages[]字段,已截断为 120 个字符。任何缺失值都呈现为-

uip 智能体配置集

更新agent.json中的密钥。值将按原义写入,超出 CLI 的内置规范化范围不会进行类型强制转换。

参数

  • <key> (必填) — 要写入的配置密钥。与get相同的命名空间。
  • <value> (必填) — 新值。

选项

标记默认用途
--path <path>.智能体项目目录的路径。

示例

# Swap the model on a scaffolded agent
uip agent config set model gpt-4o-2024-11-20 --path ./my-agent

# Rename the agent (metadata.name)
uip agent config set name "Invoice Triage" --path ./my-agent
# Swap the model on a scaffolded agent
uip agent config set model gpt-4o-2024-11-20 --path ./my-agent

# Rename the agent (metadata.name)
uip agent config set name "Invoice Triage" --path ./my-agent

数据形状(--输出 json)

{
  "Code": "AgentConfigSet",
  "Data": {
    "Key": "model",
    "Value": "gpt-4o-2024-11-20",
    "Status": "Updated"
  }
}
{
  "Code": "AgentConfigSet",
  "Data": {
    "Key": "model",
    "Value": "gpt-4o-2024-11-20",
    "Status": "Updated"
  }
}

CLI 不会在set后重新验证agent.json 。之后运行uip agent validate以确认项目仍具有内部一致性(内容令牌、入口点.json 同步等)。

另请参阅

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新