Skip to main content
POST
归档记忆存储
每个请求都必须发送 ?beta=true

授权

X-Api-Key
string
header
默认值:sk-ant-local-default
必填

OMA 工作区 API 密钥。

请求头

anthropic-version
string
anthropic-beta
string

路径参数

memory_store_id
string
必填

记忆存储标识符。

查询参数

beta
enum<boolean>
必填

为此接口启用 Beta API 合同,必须为 true

可用选项:
true

响应

请求成功。

归档 memory_store 的响应。返回已设置 archived_at 的存储。

type
enum<string>
必填
可用选项:
memory_store
id
string
必填

记忆存储的唯一标识符(带 memstore_... 标记的 ID)。将存储附加到会话时,或在后续调用的 {memory_store_id} 路径参数中,请使用该值。

name
string
必填

存储的人类可读名称。1–255 个字符。该存储在 /mnt/memory/ 下的挂载路径 slug 由此名称派生。

created_at
string<date-time>
必填

存储创建的时间戳。

updated_at
string<date-time>
必填

该存储的 namedescriptionmetadata 最后一次修改的时间戳。存储内部的记忆写入不会更新此时间戳。

description
string

描述存储内容的自由文本,最多 1024 个字符。当存储被附加时会包含在智能体的系统提示词中,因此措辞应对智能体有用。未设置时为空字符串。

metadata
object

供你自己记录使用的任意键值标签(例如存储所属的终端用户)。最多 16 对;键为 1–64 个字符;值最多 512 个字符。在 retrieve/list 时返回,但不可用于过滤。

archived_at
string<date-time> | null

存储被归档时的时间戳,处于活跃状态时为 null。一经设置便不会清除;归档是单向的。已归档的存储为只读,且无法附加到新的会话。