列出记忆库

更新时间:
复制 MD 格式

使用 ListMemoryStores 接口分页列出当前 AgentStorage 实例中的记忆库。每个列表项包含输入和输出类型,可用于区分结构化记忆、服务生成的文件和应用管理的文件。

前提条件

请求参数

字段

类型

必填

说明

limit

int

否

本页最多返回数量。

nextToken

string

否

上一页返回的不透明分页令牌。

请求示例

使用 API Key 认证时,通过 x-ots-instancename 和 x-ots-apikey 请求头传入实例名和 API Key。

curl -X POST https://<endpoint>/ListMemoryStores \
  -H "x-ots-instancename: <instance-name>" \
  -H "x-ots-apikey: <your-api-key>" \
  -H "Content-Type: application/json" \
  -d '{}'

响应

字段

说明

stores

记忆库列表。

stores[].memoryStoreName

记忆库名称。

stores[].inputType

输入类型:messages 或 file。

stores[].outputTypes

输出类型集合,元素为 structured 或 file。

nextToken

下一页令牌;没有更多数据时省略。

{
  "stores": [
    {
      "memoryStoreName": "agent_memory",
      "inputType": "messages",
      "outputTypes": ["structured", "file"]
    },
    {
      "memoryStoreName": "agent_files",
      "inputType": "file",
      "outputTypes": ["file"]
    }
  ]
}