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

uip 智能体防护机制

使用“uip 智能体防护栏”列出防护栏定义、BYOG 防护栏、LLM-as-judge 模型和防护栏目录。

uip agent guardrails 是一个只读发现组,用于智能体项目可以引用的防护机制(内置验证程序和自带防护机制 (BYOG) 连接),以及可用于 LLM-as-judge 防护机制和为每个验证程序编写了目录元数据(描述、用例、示例)。它不会为项目附加护栏;这通过手动编辑 agent.json 来完成。

大纲​

uip agent guardrails list [--byo]
uip agent guardrails llm-as-judge-models
uip agent guardrails catalog [--validator <id>]
uip agent guardrails list [--byo]
uip agent guardrails llm-as-judge-models
uip agent guardrails catalog [--validator <id>]

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

uip 智能体防护机制列表​

列出可用的防护栏定义,包括已禁用的防护栏定义(应该显示已禁用的 BYOG 配置,否则它与从未设置的配置无法区分)。

选项​

标记用途
--byo筛选以仅显示自带 (BYOG) 防护机制。

示例​

uip agent guardrails list

uip agent guardrails list --byo
uip agent guardrails list

uip agent guardrails list --byo

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

{
  "Code": "GuardrailDefinitionsList",
  "Data": [
    {
      "Validator": "pii_detection",
      "IsByo": false,
      "Status": "Available",
      "AllowedScopes": ["Agent", "Llm", "Tool"],
      "GuardrailStages": { "Agent": ["PreExecution", "PostExecution"], "Llm": ["PreExecution", "PostExecution"], "Tool": ["PreExecution", "PostExecution"] },
      "Parameters": [
        { "Type": "enum-list", "Id": "entities", "Required": true, "DefaultValue": ["Email", "Address"], "Options": ["Person", "Address", "Email", "..."] }
      ]
    }
  ]
}
{
  "Code": "GuardrailDefinitionsList",
  "Data": [
    {
      "Validator": "pii_detection",
      "IsByo": false,
      "Status": "Available",
      "AllowedScopes": ["Agent", "Llm", "Tool"],
      "GuardrailStages": { "Agent": ["PreExecution", "PostExecution"], "Llm": ["PreExecution", "PostExecution"], "Tool": ["PreExecution", "PostExecution"] },
      "Parameters": [
        { "Type": "enum-list", "Id": "entities", "Required": true, "DefaultValue": ["Email", "Address"], "Options": ["Person", "Address", "Email", "..."] }
      ]
    }
  ]
}

Validator 不是唯一 — BYOG 定义可以共享内置程序的名称(一个租户可以有两个 harmful_content 条目)。使用 IsByo 加上 Byo* 字段(ByoValidatorName、ByoConnectionId、ByoConfigurationId、ByoConnectorName、ByoConnectorKey、FolderKey)来区分它们 — ByoValidatorName 和 ByoConnectionId 是两个编码智能体传递给 ByoValidator(...) 的值。

uip 智能体防护机制 llm-as-judge-models​

列出可用于 LLM-as-judge 防护机制的 LLM 模型。需要登录。

示例​

uip agent guardrails llm-as-judge-models
uip agent guardrails llm-as-judge-models

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

{
  "Code": "LlmGatewayModelsList",
  "Data": [
    { "ModelId": "anthropic.claude-haiku-4-5-20251001-v1:0", "DisplayName": "Claude Haiku 4.5", "Vendor": "AwsBedrock", "ModelFamily": "AnthropicClaude", "SubscriptionType": "UiPathOwned", "IsByo": false, "IsPreview": false, "IsBlockedByPolicy": false }
  ]
}
{
  "Code": "LlmGatewayModelsList",
  "Data": [
    { "ModelId": "anthropic.claude-haiku-4-5-20251001-v1:0", "DisplayName": "Claude Haiku 4.5", "Vendor": "AwsBedrock", "ModelFamily": "AnthropicClaude", "SubscriptionType": "UiPathOwned", "IsByo": false, "IsPreview": false, "IsBlockedByPolicy": false }
  ]
}

系统会在返回列表之前,筛选出被租户策略阻止的模型。

uip 智能体防护机制目录​

为护栏验证程序获取编写的目录元数据(描述、用例、示例)。

选项​

标记用途
--validator <id>按snake_case ID筛选单个验证程序(例如pii_detection)。

示例​

uip agent guardrails catalog

uip agent guardrails catalog --validator pii_detection
uip agent guardrails catalog

uip agent guardrails catalog --validator pii_detection

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

{
  "Code": "GuardrailCatalog",
  "Data": {
    "schema_version": "1.0.0",
    "guardrails": [
      { "validator_id": "pii_detection", "display_name": "PII Detection", "type": "BuiltIn", "status": "Available", "description": "...", "use_cases": ["..."], "examples": [] }
    ]
  }
}
{
  "Code": "GuardrailCatalog",
  "Data": {
    "schema_version": "1.0.0",
    "guardrails": [
      { "validator_id": "pii_detection", "display_name": "PII Detection", "type": "BuiltIn", "status": "Available", "description": "...", "use_cases": ["..."], "examples": [] }
    ]
  }
}

如果尚未为租户启用目录功能,则此操作将失败,并显示 Code: "GuardrailCatalogUnavailable"。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新