使用 GetMemoryStore 接口获取记忆库详情,包括当前输入和输出类型。
前提条件
已创建 AgentStorage 实例且状态为
normal,并获取实例访问地址(endpoint)和实例名。已创建 API Key。
请求参数
字段 | 类型 | 必填 | 说明 |
| 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"
}'响应
字段 | 说明 |
| AgentStorage 名称。 |
| 记忆库名称。 |
| 记忆库唯一 ID,部分记忆库可能不返回该字段。 |
| 记忆库描述,未设置时省略。 |
| 自定义记忆抽取指令,未设置时省略。 |
| 输入类型: |
| 输出类型集合,元素为 |
| 使用兼容类型声明的记忆库可能返回该字段;新类型声明的记忆库不返回。 |
| 是否启用 Wiki 反射。 |
| 创建时间。 |
| 最近更新时间。 |
{
"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"
}该文章对您有帮助吗?