English ← MyDocs

列出 memory stores

get /v1/memory_stores

列出 memory stores

Query Parameters

  • "created_at[gte]": optional string

    仅返回 created_at 在此时间之后(含)的 stores。在传输中以 created_at[gte] 发送。

  • "created_at[lte]": optional string

    仅返回 created_at 在此时间之前(含)的 stores。在传输中以 created_at[lte] 发送。

  • include_archived: optional boolean

    当为 true 时,结果中包含已归档的 stores。默认为 false(排除已归档的 stores)。

  • limit: optional number

    每页返回的最大 store 数量。必须在 1 到 100 之间。省略时默认为 20。

  • page: optional string

    不透明的分页游标(page_... 值)。传入先前响应中的 next_page 值以获取下一页;省略则获取第一页。

Header Parameters

  • "anthropic-beta": optional array of AnthropicBeta

    可选的头部参数,用于指定您想使用的 beta 版本。

    • string

    • "message-batches-2024-09-24" or "prompt-caching-2024-07-31" or "computer-use-2024-10-22" or 22 more

      • "message-batches-2024-09-24"

      • "prompt-caching-2024-07-31"

      • "computer-use-2024-10-22"

      • "computer-use-2025-01-24"

      • "pdfs-2024-09-25"

      • "token-counting-2024-11-01"

      • "token-efficient-tools-2025-02-19"

      • "output-128k-2025-02-19"

      • "files-api-2025-04-14"

      • "mcp-client-2025-04-04"

      • "mcp-client-2025-11-20"

      • "dev-full-thinking-2025-05-14"

      • "interleaved-thinking-2025-05-14"

      • "code-execution-2025-05-22"

      • "extended-cache-ttl-2025-04-11"

      • "context-1m-2025-08-07"

      • "context-management-2025-06-27"

      • "model-context-window-exceeded-2025-08-26"

      • "skills-2025-10-02"

      • "fast-mode-2026-02-01"

      • "output-300k-2026-03-24"

      • "user-profiles-2026-03-24"

      • "advisor-tool-2026-03-01"

      • "managed-agents-2026-04-01"

      • "cache-diagnosis-2026-04-07"

Returns

  • data: optional array of BetaManagedAgentsMemoryStore

    本页的 memory stores,按最新排列。当没有匹配过滤条件的 stores 时为空。

    • id: string

      memory store 的唯一标识符(memstore_... 标签 ID)。在将 store 挂载到会话或在后续调用的 {memory_store_id} 路径参数中使用此 ID。

    • created_at: string

      RFC 3339 格式的时间戳

    • name: string

      store 的人类可读名称。1-255 个字符。store 在 /mnt/memory/ 下的挂载路径 slug 派生自此名称。

    • type: "memory_store"

      • "memory_store"
    • updated_at: string

      RFC 3339 格式的时间戳

    • archived_at: optional string

      RFC 3339 格式的时间戳

    • description: optional string

      store 内容的自由文本描述,最多 1024 个字符。当 store 被挂载时会包含在代理的系统提示词中,因此请确保描述对代理有用。未设置时为空字符串。

    • metadata: optional map[string]

      用于您自身记账的任意键值标签(例如 store 所属的终端用户)。最多 16 对;键名 1-64 个字符;值最多 512 个字符。在 retrieve/list 时返回但不可过滤。

  • next_page: optional string

    下一页的不透明游标(page_... 值)。在下一次请求中作为 page 传入。当没有更多结果时为 null

Example

curl https://api.anthropic.com/v1/memory_stores \
    -H 'anthropic-version: 2023-06-01' \
    -H 'anthropic-beta: managed-agents-2026-04-01' \
    -H "X-Api-Key: $ANTHROPIC_API_KEY"

Response

{
  "data": [
    {
      "id": "id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "type": "memory_store",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "archived_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "metadata": {
        "foo": "string"
      }
    }
  ],
  "next_page": "next_page"
}