AnthropicClaude 托管智能体

创建记忆库

创建一个记忆库,供智能体跨会话保存和读取记忆。

POST /anthropic/v1/memory_stores○ 未支持

请求体

  • namestring必填

    Human-readable name for the store. Required; 1–255 characters; no control characters. The mount-path slug under `/mnt/memory/` is derived from this name (lowercased, non-alphanumeric runs collapsed to a hyphen). Names need not be unique within a workspace.

  • descriptionstring可选

    Free-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent.

  • metadataobject可选

    Arbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Not visible to the agent.

返回

501 平台还没有实现这个端点;调用会得到下面这个响应:

平台还没有提供智能体可读写的持久记忆库。调用会返回 501(not_implemented_error),不产生副作用,官方 SDK 不会重试。

错误按 Claude Managed Agents 格式返回,参见 错误码

响应

HTTP 200

Successful response

application/json

名称类型说明
idstringUnique identifier for the memory store (a `memstore_...` tagged ID). Use this when attaching the store to a session, or in the `{memory_store_id}` path parameter of subsequent calls.
created_atstringA timestamp in RFC 3339 format
namestringHuman-readable name for the store. 1–255 characters. The store's mount-path slug under `/mnt/memory/` is derived from this name.
typestring
updated_atstringA timestamp in RFC 3339 format
archived_atnull | stringA timestamp in RFC 3339 format
descriptionstringFree-text description of what the store contains, up to 1024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent. Empty string when unset.
metadataobjectArbitrary key-value tags for your own bookkeeping (such as the end user a store belongs to). Up to 16 pairs; keys 1–64 characters; values up to 512 characters. Returned on retrieve/list but not filterable.