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

uip 智能体记忆

使用“uip 智能体记忆”在低代码智能体上附加、列出和删除记忆空间和记忆项目。

uip agent memory 管理附加到智能体的记忆空间功能:记忆空间是智能体可以在运行时搜索的检索增强召回来源(情景或升级记忆)。uip agent memory item 管理种子到已配置内存空间中的单个键/值项目。

仅限本地 — 无需登录。

大纲​

uip agent memory add    <name> --memory-space <name> --folder-path <path> [--reference-key <key>] [--description <desc>] [--threshold <n>] [--result-count <n>] [--search-mode <hybrid|semantic>] [--field <name=weight>]... [--disable-dynamic-few-shot] [--path <dir>]
uip agent memory list                                                                                                                                                                                                                            [--path <dir>]
uip agent memory remove <name> [--folder-path <path>]                                                                                                                                                                                             [--path <dir>]

uip agent memory item add    <name> <key> <value> --memory-type <episodic|escalation> [--folder-path <path>] [--description <desc>] [--metadata <json>] [--path <dir>]
uip agent memory item list   <name> [--folder-path <path>]                                                                                                                                                                                        [--path <dir>]
uip agent memory item remove <name> <key> [--folder-path <path>]                                                                                                                                                                                  [--path <dir>]
uip agent memory add    <name> --memory-space <name> --folder-path <path> [--reference-key <key>] [--description <desc>] [--threshold <n>] [--result-count <n>] [--search-mode <hybrid|semantic>] [--field <name=weight>]... [--disable-dynamic-few-shot] [--path <dir>]
uip agent memory list                                                                                                                                                                                                                            [--path <dir>]
uip agent memory remove <name> [--folder-path <path>]                                                                                                                                                                                             [--path <dir>]

uip agent memory item add    <name> <key> <value> --memory-type <episodic|escalation> [--folder-path <path>] [--description <desc>] [--metadata <json>] [--path <dir>]
uip agent memory item list   <name> [--folder-path <path>]                                                                                                                                                                                        [--path <dir>]
uip agent memory item remove <name> <key> [--folder-path <path>]                                                                                                                                                                                  [--path <dir>]

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

UIP 智能体记忆添加​

将记忆空间附加到智能体。

参数​

  • <name> (必填) — 要在智能体中使用的功能名称。

选项​

标记默认必填用途
--memory-space <name>—是要附加的记忆空间名称。
--folder-path <path>—是记忆空间所在的文件夹路径。
--reference-key <key>—记忆空间解决方案资源密钥。
--description <desc>—记忆空间说明。
--threshold <n>0检索分数阈值。
--result-count <n>3要检索的结果数(正整数)。
--search-mode <mode>hybridhybrid 或 semantic。
--field <name=weight>—输入字段权重。可重复。
--disable-dynamic-few-shot关闭附加记忆空间,而不启用动态少样本检索(默认启用)。
--path <path>.智能体项目目录的路径。

示例​

uip agent memory add SupportRecall --memory-space customer-support-recall --folder-path Shared --path ./my-agent
uip agent memory add SupportRecall --memory-space customer-support-recall --folder-path Shared --path ./my-agent

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

{
  "Code": "AgentMemoryAdd",
  "Data": {
    "Status": "Memory space added",
    "Name": "SupportRecall",
    "MemorySpace": "customer-support-recall",
    "FolderPath": "Shared",
    "DynamicFewShotEnabled": true,
    "Id": "a1b2c3d4-0000-0000-0000-000000000070"
  }
}
{
  "Code": "AgentMemoryAdd",
  "Data": {
    "Status": "Memory space added",
    "Name": "SupportRecall",
    "MemorySpace": "customer-support-recall",
    "FolderPath": "Shared",
    "DynamicFewShotEnabled": true,
    "Id": "a1b2c3d4-0000-0000-0000-000000000070"
  }
}

uip 智能体记忆列表​

选项​

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

示例​

uip agent memory list --path ./my-agent
uip agent memory list --path ./my-agent

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

{
  "Code": "AgentMemoryList",
  "Data": [
    { "Name": "SupportRecall", "MemorySpace": "customer-support-recall", "FolderPath": "Shared", "DynamicFewShotEnabled": true, "Id": "a1b2c3d4-0000-0000-0000-000000000070" }
  ]
}
{
  "Code": "AgentMemoryList",
  "Data": [
    { "Name": "SupportRecall", "MemorySpace": "customer-support-recall", "FolderPath": "Shared", "DynamicFewShotEnabled": true, "Id": "a1b2c3d4-0000-0000-0000-000000000070" }
  ]
}

uip 智能体记忆删除​

参数​

  • <name> (必填) — 要删除的功能名称、记忆空间名称或 ID。

选项​

标记用途
--folder-path <path>按记忆空间名称删除时的文件夹路径。
--path <path>智能体项目目录的路径(默认为 .)。

示例​

uip agent memory remove SupportRecall --path ./my-agent
uip agent memory remove SupportRecall --path ./my-agent

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

{ "Code": "AgentMemoryRemove", "Data": { "Status": "Memory space removed", "Name": "SupportRecall" } }
{ "Code": "AgentMemoryRemove", "Data": { "Status": "Memory space removed", "Name": "SupportRecall" } }

未按名称/ID 找到内存空间,命令失败,退出代码非零。

添加 uip 智能体记忆项目​

将记忆项目添加到已配置的记忆空间。

参数​

名称必填用途
<name>是功能名称、记忆空间名称或 ID。
<key>是内存项目键。
<value>是记忆项目值。

选项​

标记必填用途
--folder-path <path>按记忆空间名称选择时的文件夹路径。
--memory-type <type>是episodic (0) 或 escalation (1) — 也接受数值 0/1。
--description <desc>内存项目描述。
--metadata <json>JSON 对象形式的记忆项目元数据。
--path <path>智能体项目目录的路径(默认为 .)。

示例​

uip agent memory item add SupportRecall customer-tier gold --memory-type episodic --metadata '{"source":"seed"}' --path ./my-agent

uip agent memory item add SupportRecall escalation-case pending --memory-type escalation --path ./my-agent
uip agent memory item add SupportRecall customer-tier gold --memory-type episodic --metadata '{"source":"seed"}' --path ./my-agent

uip agent memory item add SupportRecall escalation-case pending --memory-type escalation --path ./my-agent

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

{
  "Code": "AgentMemoryItemAdd",
  "Data": { "Status": "Memory item added", "Memory": "SupportRecall", "Key": "customer-tier", "MemoryType": 0, "Id": "a1b2c3d4-0000-0000-0000-000000000080" }
}
{
  "Code": "AgentMemoryItemAdd",
  "Data": { "Status": "Memory item added", "Memory": "SupportRecall", "Key": "customer-tier", "MemoryType": 0, "Id": "a1b2c3d4-0000-0000-0000-000000000080" }
}

uip 智能体记忆项目列表​

参数​

  • <name> (必填) — 功能名称、内存空间名称或 ID。

选项​

标记用途
--folder-path <path>按记忆空间名称选择时的文件夹路径。
--path <path>智能体项目目录的路径(默认为 .)。

示例​

uip agent memory item list SupportRecall --path ./my-agent
uip agent memory item list SupportRecall --path ./my-agent

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

{
  "Code": "AgentMemoryItemList",
  "Data": [
    { "Key": "customer-tier", "Value": "gold", "MemoryType": 0, "Description": null, "Metadata": { "source": "seed" }, "Id": "a1b2c3d4-0000-0000-0000-000000000080" }
  ]
}
{
  "Code": "AgentMemoryItemList",
  "Data": [
    { "Key": "customer-tier", "Value": "gold", "MemoryType": 0, "Description": null, "Metadata": { "source": "seed" }, "Id": "a1b2c3d4-0000-0000-0000-000000000080" }
  ]
}

删除 uip 智能体记忆项目​

参数​

名称必填用途
<name>是功能名称、记忆空间名称或 ID。
<key>是要删除的内存项目密钥或 ID。

选项​

标记用途
--folder-path <path>按记忆空间名称选择时的文件夹路径。
--path <path>智能体项目目录的路径(默认为 .)。

示例​

uip agent memory item remove SupportRecall customer-tier --path ./my-agent
uip agent memory item remove SupportRecall customer-tier --path ./my-agent

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

{ "Code": "AgentMemoryItemRemove", "Data": { "Status": "Memory item removed", "Memory": "SupportRecall", "Key": "customer-tier" } }
{ "Code": "AgentMemoryItemRemove", "Data": { "Status": "Memory item removed", "Memory": "SupportRecall", "Key": "customer-tier" } }

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新