Claude Platform Docs

Lister les mémoires

$client->beta->memoryStores->memories->list(string memoryStoreID, ?int depth, ?int limit, ?string page, ?string pathPrefix, ?ManagedAgentsMemoryView view, ?list<AnthropicBeta> betas, ?string workspaceID): PageCursor<ManagedAgentsMemoryListItem>
GET/v1/memory_stores/{memory_store_id}/memories

Lister les mémoires

Parameters
memoryStoreID: string
depth?:optional int

0 (or omitted) returns all descendants below path_prefix (recursive). 1 returns immediate children only; deeper entries roll up as memory_prefix items. depth=1 behaves like ls; omitting depth behaves like find.

limit?:optional int

Maximum number of items to return per page. Must be between 1 and 100. Defaults to 20 when omitted. Capped at 20 when view=full. Both memory and memory_prefix items count toward the limit.

page?:optional string

Opaque pagination cursor (a page_... value). Pass the next_page value from a previous response to fetch the next page; omit for the first page.

pathPrefix?:optional string

Optional path prefix filter. Must end with / (segment-aligned), e.g., /notes/. This value appears in request URLs. Do not include secrets or personally identifiable information.

view?:optional ManagedAgentsMemoryView

Which projection of each memory to return. Defaults to basic (content omitted). full populates content on each item and caps limit at 20; use this as the bulk-read path for export and sync.

betas?:optional list<AnthropicBeta>

Optional header to specify the beta version(s) you want to use.

workspaceID?:optional string
Returns
One of the following:
Lister les mémoires
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

$client = new Client(apiKey: 'my-anthropic-api-key');

$page = $client->beta->memoryStores->memories->list(
  'memory_store_id',
  depth: 0,
  limit: 0,
  page: 'page',
  pathPrefix: 'path_prefix',
  view: ManagedAgentsMemoryView::BASIC,
  betas: [AnthropicBeta::MESSAGE_BATCHES_2024_09_24],
  workspaceID: 'wrkspc_011CZkZaBF1tNoB5wlCeusgy',
);

var_dump($page);
Returns Examples
Response 200
{
  "data": [
    {
      "id": "id",
      "content_sha256": "content_sha256",
      "content_size_bytes": 0,
      "created_at": "2019-12-27T18:11:19.117Z",
      "memory_store_id": "memory_store_id",
      "memory_version_id": "memory_version_id",
      "path": "path",
      "type": "memory",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "content": "content"
    }
  ],
  "next_page": "next_page"
}