查询记忆库

更新时间:
复制 MD 格式

使用 GetMemoryStore 接口获取记忆库详情,包括当前输入和输出类型。

前提条件

请求参数

字段

类型

必填

说明

memoryStoreName

string

是

记忆库名称。

请求示例

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

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

响应

字段

说明

otsInstance

AgentStorage 名称。

memoryStoreName

记忆库名称。

storeUid

记忆库唯一 ID,部分记忆库可能不返回该字段。

description

记忆库描述,未设置时省略。

extractInstructions

自定义记忆抽取指令,未设置时省略。

inputType

输入类型:messages 或 file。

outputTypes

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

storageMode

使用兼容类型声明的记忆库可能返回该字段;新类型声明的记忆库不返回。

wikiReflectionEnabled

是否启用 Wiki 反射。

createdAt

创建时间。

updatedAt

最近更新时间。

{
  "otsInstance": "your-instance-name",
  "memoryStoreName": "agent_memory",
  "storeUid": "store_c346adcc-2c6d-d69f-75da-4642f7b76a27",
  "description": "Agent 对话记忆库",
  "inputType": "messages",
  "outputTypes": ["structured", "file"],
  "wikiReflectionEnabled": false,
  "createdAt": "2026-08-31T07:19:48.935Z",
  "updatedAt": "2026-08-31T07:25:10.321Z"
}