Memories changedapi/beta/memory_stores/memories
Nearest release: v2.1.306, published 2 hours after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+193added
Lines−69removed
From line
5
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits20to this page, all time
## Create a Memory ## List Memories ## Retrieve a Memory ## Update a Memory ## Delete a Memory ## Create a memory ## List memories ## Retrieve a memory ## Update a memory ## Delete a memory
The whole hunk
from line 5, old and new numbered
/
from line 5
55
66# Memories
77
8## Create a memory
8## Create a Memory
99
1010**POST** `/v1/memory_stores/{memory_store_id}/memories`
1111
12Create a memory
12Create a Memory
1313
1414### Path parameters
1515
from line 21
2121
2222- `view: optional BetaManagedAgentsMemoryView`
2323
24 Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.
24 Whether a `memory` or `memory_version` in the response includes its `content`. Defaults to `full` on retrieve operations and to `basic` on list, create, and update operations.
2525
26 With `full`, list operations return at most 20 items per page.
27
2628 - `"basic"`
2729
2830 Return the object with `content` set to `null`. The `content_size_bytes` and `content_sha256` fields remain populated, so sync clients can diff without fetching content.
from line 159
157159
158160- `content: string or null`
159161
160 UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory.
162 The UTF-8 text content of the new memory. Pass `""` to create an empty memory.
161163
164 The maximum size is 100 kB (102,400 bytes).
165
162166- `path: string`
163167
164 Hierarchical path for the new memory, e.g. `/projects/foo/notes.md`. Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive.
168 The path of the new memory, such as `/projects/foo/notes.md`. Paths are case-sensitive.
165169
170 A path starts with `/` and has 1 to 20 segments. A segment can't be empty and can't be `.` or `..`. A path can't contain control characters, format characters, or the line and paragraph separators U+2028 and U+2029. It must be in Unicode Normalization Form C and at most 1,024 bytes long.
171
166172 minLength: 2, maxLength: 1024
167173
168174### Returns
from line 175
169175
170176- `BetaManagedAgentsMemory object`
171177
172 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
178 A text document at a path inside a memory store.
173179
180 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
181
182 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
183
174184 - `type: "memory"`
175185
176186 - `id: string`
177187
178 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
188 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
179189
190 To retrieve, update, or delete the memory, pass this ID.
191
180192 - `content_sha256: string`
181193
182194 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 195
183195
184196 - `content_size_bytes: number`
185197
186 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
198 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
187199
188200 format: int32
189201
from line 211
199211
200212 - `memory_version_id: string`
201213
202 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
214 The ID of the memory version that holds the memory's current content (`memver_...`).
203215
216 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
217
218 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
219
204220 - `path: string`
205221
206222 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 223
207223
208224 - `updated_at: string`
209225
210 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
226 When the memory was last changed, in RFC 3339.
211227
228 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
229
212230 format: date-time
213231
214232 - `content: optional string or null`
215233
216 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
234 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
217235
236 The maximum size is 100 kB (102,400 bytes).
237
218238### Example
219239
220240```bash
from line 266
246266}
247267```
248268
249## List memories
269## List Memories
250270
251271**GET** `/v1/memory_stores/{memory_store_id}/memories`
252272
253List memories
273List Memories
254274
255275### Path parameters
256276
from line 282
262282
263283- `depth: optional number`
264284
265 `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`.
285 How far below `path_prefix` to list. Defaults to `0`, which lists every memory below the prefix.
266286
287 Pass `1` to list only the direct children. Deeper memories are then grouped into `memory_prefix` items.
288
267289 format: int32
268290
269291- `limit: optional number`
270292
271 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.
293 The maximum number of items to return per page, from 1 to 100. Defaults to 20.
272294
295 With `view=full`, a page holds at most 20 items. `memory` and `memory_prefix` items both count toward the limit.
296
273297 format: int32
274298
275299- `page: optional string`
276300
277 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.
301 The `next_page` value from a previous response, to get the next page. Omit it to get the first page.
278302
279303- `path_prefix: optional string`
280304
281 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.
305 Return only memories whose path starts with this prefix, such as `/notes/`. This value appears in request URLs. Do not include secrets or personally identifiable information.
282306
307 Omit it to list the whole store. The prefix must end with `/` and matches whole segments, so `/notes/` matches `/notes/todo.md` but not `/notes-archive/todo.md`.
308
283309- `view: optional BetaManagedAgentsMemoryView`
284310
285 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.
311 Whether each memory in the response includes `content`. Defaults to `basic`, which sets it to `null`.
286312
313 With `full`, a page holds at most 20 items.
314
287315 - `"basic"`
288316
289317 Return the object with `content` set to `null`. The `content_size_bytes` and `content_sha256` fields remain populated, so sync clients can diff without fetching content.
from line 450
422450
423451 - `BetaManagedAgentsMemory object`
424452
425 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
453 A text document at a path inside a memory store.
426454
455 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
456
457 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
458
427459 - `type: "memory"`
428460
429461 - `id: string`
430462
431 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
463 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
432464
465 To retrieve, update, or delete the memory, pass this ID.
466
433467 - `content_sha256: string`
434468
435469 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 470
436470
437471 - `content_size_bytes: number`
438472
439 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
473 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
440474
441475 format: int32
442476
from line 486
452486
453487 - `memory_version_id: string`
454488
455 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
489 The ID of the memory version that holds the memory's current content (`memver_...`).
456490
491 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
492
493 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
494
457495 - `path: string`
458496
459497 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 498
460498
461499 - `updated_at: string`
462500
463 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
501 When the memory was last changed, in RFC 3339.
464502
503 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
504
465505 format: date-time
466506
467507 - `content: optional string or null`
468508
469 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
509 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
470510
511 The maximum size is 100 kB (102,400 bytes).
512
471513 - `BetaManagedAgentsMemoryPrefix object`
472514
473 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
515 A directory marker that [List Memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) returns instead of the memories below the requested `depth`.
474516
517 It stands for one or more memories whose paths start with `path`. It isn't a stored object and doesn't have an ID. Each marker counts toward the page `limit`.
518
475519 - `type: "memory_prefix"`
476520
477521 - `path: string`
from line 524
480524
481525- `next_page: optional string or null`
482526
483 Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request.
527 The value to pass as `page` to get the next page, or `null` if there are no more results.
484528
485529### Example
486530
from line 557
513557}
514558```
515559
516## Retrieve a memory
560## Retrieve a Memory
517561
518562**GET** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
519563
520Retrieve a memory
564Retrieve a Memory
521565
522566### Path parameters
523567
from line 577
533577
534578- `view: optional BetaManagedAgentsMemoryView`
535579
536 Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.
580 Whether a `memory` or `memory_version` in the response includes its `content`. Defaults to `full` on retrieve operations and to `basic` on list, create, and update operations.
537581
582 With `full`, list operations return at most 20 items per page.
583
538584 - `"basic"`
539585
540586 Return the object with `content` set to `null`. The `content_size_bytes` and `content_sha256` fields remain populated, so sync clients can diff without fetching content.
from line 715
669715
670716- `BetaManagedAgentsMemory object`
671717
672 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
718 A text document at a path inside a memory store.
673719
720 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
721
722 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
723
674724 - `type: "memory"`
675725
676726 - `id: string`
677727
678 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
728 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
679729
730 To retrieve, update, or delete the memory, pass this ID.
731
680732 - `content_sha256: string`
681733
682734 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 735
683735
684736 - `content_size_bytes: number`
685737
686 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
738 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
687739
688740 format: int32
689741
from line 751
699751
700752 - `memory_version_id: string`
701753
702 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
754 The ID of the memory version that holds the memory's current content (`memver_...`).
703755
756 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
757
758 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
759
704760 - `path: string`
705761
706762 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 763
707763
708764 - `updated_at: string`
709765
710 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
766 When the memory was last changed, in RFC 3339.
711767
768 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
769
712770 format: date-time
713771
714772 - `content: optional string or null`
715773
716 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
774 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
717775
776 The maximum size is 100 kB (102,400 bytes).
777
718778### Example
719779
720780```bash
from line 801
741801}
742802```
743803
744## Update a memory
804## Update a Memory
745805
746806**POST** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
747807
748Update a memory
808Update a Memory
749809
750810### Path parameters
751811
from line 821
761821
762822- `view: optional BetaManagedAgentsMemoryView`
763823
764 Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.
824 Whether a `memory` or `memory_version` in the response includes its `content`. Defaults to `full` on retrieve operations and to `basic` on list, create, and update operations.
765825
826 With `full`, list operations return at most 20 items per page.
827
766828 - `"basic"`
767829
768830 Return the object with `content` set to `null`. The `content_size_bytes` and `content_sha256` fields remain populated, so sync clients can diff without fetching content.
from line 963
901963
902964- `path: optional string or null`
903965
904 New path for the memory (a rename). Must start with `/`, contain at least one non-empty segment, and be at most 1,024 bytes. Must not contain empty segments, `.` or `..` segments, control or format characters, or the Unicode line and paragraph separators (U+2028, U+2029), and must be NFC-normalized. Paths are case-sensitive. The memory's `id` is preserved across renames. Omit to leave the path unchanged.
966 The new path of the memory, which renames it. Omit it to keep the current path.
905967
968 The memory keeps its `id`. A path starts with `/` and has 1 to 20 segments. A segment can't be empty and can't be `.` or `..`. A path can't contain control characters, format characters, or the line and paragraph separators U+2028 and U+2029. It must be in Unicode Normalization Form C and at most 1,024 bytes long. Paths are case-sensitive.
969
906970 minLength: 2, maxLength: 1024
907971
908972- `precondition: optional BetaManagedAgentsPrecondition`
909973
910 Optional optimistic-concurrency precondition. When supplied, the update applies only if the memory's current state matches; on mismatch the request returns `memory_precondition_failed_error` (HTTP 409). When omitted, the update is unconditional.
974 The condition that the memory must meet for the update to apply. Omit it to update unconditionally.
911975
976 If the condition fails, the request fails with HTTP status 409.
977
912978 - `type: "content_sha256"`
913979
914980 - `content_sha256: optional string`
from line 985
919985
920986- `BetaManagedAgentsMemory object`
921987
922 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
988 A text document at a path inside a memory store.
923989
990 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
991
992 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
993
924994 - `type: "memory"`
925995
926996 - `id: string`
927997
928 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
998 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
929999
1000 To retrieve, update, or delete the memory, pass this ID.
1001
9301002 - `content_sha256: string`
9311003
9321004 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 1005
9331005
9341006 - `content_size_bytes: number`
9351007
936 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
1008 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
9371009
9381010 format: int32
9391011
from line 1021
9491021
9501022 - `memory_version_id: string`
9511023
952 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1024 The ID of the memory version that holds the memory's current content (`memver_...`).
9531025
1026 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
1027
1028 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
1029
9541030 - `path: string`
9551031
9561032 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 1033
9571033
9581034 - `updated_at: string`
9591035
960 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1036 When the memory was last changed, in RFC 3339.
9611037
1038 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
1039
9621040 format: date-time
9631041
9641042 - `content: optional string or null`
9651043
966 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
1044 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
9671045
1046 The maximum size is 100 kB (102,400 bytes).
1047
9681048### Example
9691049
9701050```bash
from line 1073
9931073}
9941074```
9951075
996## Delete a memory
1076## Delete a Memory
9971077
9981078**DELETE** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
9991079
1000Delete a memory
1080Delete a Memory
10011081
10021082### Path parameters
10031083
from line 1223
11431223
11441224- `BetaManagedAgentsDeletedMemory object`
11451225
1146 Tombstone returned by [Delete a memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
1226 The confirmation that [Delete a Memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http) returns.
11471227
1228 Deleting a memory doesn't delete its versions. [List Memory Versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) returns them while they are retained: each version is kept for at least the version retention period after it was written, unless the store itself is deleted.
1229
1230 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about how long versions are kept.
1231
11481232 - `type: "memory_deleted"`
11491233
11501234 - `id: string`
from line 1268
11841268
11851269- `BetaManagedAgentsContentSha256Precondition object`
11861270
1187 Optimistic-concurrency precondition: the update applies only if the memory's stored `content_sha256` equals the supplied value. On mismatch, the request returns `memory_precondition_failed_error` (HTTP 409); re-read the memory and retry against the fresh state. If the precondition fails but the stored state already exactly matches the requested `content` and `path`, the server returns 200 instead of 409.
1271 A precondition that applies an update only if the memory's current content has the hash in `content_sha256`.
11881272
1273 If the hashes differ, the request fails with HTTP status 409. Retrieve the memory and retry. If the memory already has exactly the requested `content` and `path`, the request succeeds even though the hashes differ.
1274
11891275 - `type: "content_sha256"`
11901276
11911277 - `content_sha256: optional string`
from line 1282
11961282
11971283- `BetaManagedAgentsDeletedMemory object`
11981284
1199 Tombstone returned by [Delete a memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
1285 The confirmation that [Delete a Memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http) returns.
12001286
1287 Deleting a memory doesn't delete its versions. [List Memory Versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) returns them while they are retained: each version is kept for at least the version retention period after it was written, unless the store itself is deleted.
1288
1289 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about how long versions are kept.
1290
12011291 - `type: "memory_deleted"`
12021292
12031293 - `id: string`
from line 1404
13141404
13151405 - `BetaManagedAgentsMemoryPathConflictError object`
13161406
1317 The error returned with HTTP status 409 when a create or rename targets a path that another memory uses, or a path that overlaps another memory's path.
1407 The error returned with HTTP status 409 when you create or rename a memory and the path you give is already used by another memory or overlaps another memory's path.
13181408
13191409 Two paths overlap when one is an ancestor of the other, such as `/notes` and `/notes/todo.md`. To free the path, rename or delete the memory that `conflicting_memory_id` references, then retry. To change that memory instead of creating a new one, update it.
13201410
from line 1434
13441434
13451435- `BetaManagedAgentsMemory object`
13461436
1347 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
1437 A text document at a path inside a memory store.
13481438
1439 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
1440
1441 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
1442
13491443 - `type: "memory"`
13501444
13511445 - `id: string`
13521446
1353 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
1447 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
13541448
1449 To retrieve, update, or delete the memory, pass this ID.
1450
13551451 - `content_sha256: string`
13561452
13571453 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 1454
13581454
13591455 - `content_size_bytes: number`
13601456
1361 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
1457 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
13621458
13631459 format: int32
13641460
from line 1470
13741470
13751471 - `memory_version_id: string`
13761472
1377 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1473 The ID of the memory version that holds the memory's current content (`memver_...`).
13781474
1475 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
1476
1477 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
1478
13791479 - `path: string`
13801480
13811481 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 1482
13821482
13831483 - `updated_at: string`
13841484
1385 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1485 When the memory was last changed, in RFC 3339.
13861486
1487 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
1488
13871489 format: date-time
13881490
13891491 - `content: optional string or null`
13901492
1391 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
1493 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
13921494
1495 The maximum size is 100 kB (102,400 bytes).
1496
13931497### Beta Managed Agents Memory List Item
13941498
13951499- `BetaManagedAgentsMemoryListItem = BetaManagedAgentsMemory or BetaManagedAgentsMemoryPrefix`
13961500
1397 One item in a [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) response: either a `memory` object or, when `depth` is set, a `memory_prefix` rollup marker.
1501 One item in a [List Memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) response: a `memory`, or a `memory_prefix` marker when `depth` is `1`.
13981502
13991503 - `BetaManagedAgentsMemory object`
14001504
1401 A `memory` object: a single text document at a hierarchical path inside a memory store. The `content` field is populated when `view=full` and `null` when `view=basic`; the `content_size_bytes` and `content_sha256` fields are always populated so sync clients can diff without fetching content. Memories are addressed by their `mem_...` ID; the path is the create key and can be changed via update.
1505 A text document at a path inside a memory store.
14021506
1507 `content` is `null` when the response uses `view=basic`. `content_size_bytes` and `content_sha256` are always set, so you can detect changes without fetching the content. To retrieve, update, or delete a memory, pass its ID, which stays the same when its path changes.
1508
1509 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#view-and-edit-memories) to learn more about working with memories.
1510
14031511 - `type: "memory"`
14041512
14051513 - `id: string`
14061514
1407 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
1515 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
14081516
1517 To retrieve, update, or delete the memory, pass this ID.
1518
14091519 - `content_sha256: string`
14101520
14111521 Lowercase hex SHA-256 digest of the UTF-8 `content` bytes (64 characters). The server applies no normalization, so clients can compute the same hash locally for staleness checks and as the value for a `content_sha256` precondition on update. Always populated, regardless of `view`.
from line 1522
14121522
14131523 - `content_size_bytes: number`
14141524
1415 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
1525 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
14161526
14171527 format: int32
14181528
from line 1538
14281538
14291539 - `memory_version_id: string`
14301540
1431 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1541 The ID of the memory version that holds the memory's current content (`memver_...`).
14321542
1543 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
1544
1545 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#audit-memory-changes) to learn more about memory versions.
1546
14331547 - `path: string`
14341548
14351549 Hierarchical path of the memory within the store, e.g. `/projects/foo/notes.md`. Always starts with `/`. Paths are case-sensitive and unique within a store. Maximum 1,024 bytes.
from line 1550
14361550
14371551 - `updated_at: string`
14381552
1439 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
1553 When the memory was last changed, in RFC 3339.
14401554
1555 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
1556
14411557 format: date-time
14421558
14431559 - `content: optional string or null`
14441560
1445 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
1561 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
14461562
1563 The maximum size is 100 kB (102,400 bytes).
1564
14471565 - `BetaManagedAgentsMemoryPrefix object`
14481566
1449 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
1567 A directory marker that [List Memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) returns instead of the memories below the requested `depth`.
14501568
1569 It stands for one or more memories whose paths start with `path`. It isn't a stored object and doesn't have an ID. Each marker counts toward the page `limit`.
1570
14511571 - `type: "memory_prefix"`
14521572
14531573 - `path: string`
from line 1578
14581578
14591579- `BetaManagedAgentsMemoryPathConflictError object`
14601580
1461 The error returned with HTTP status 409 when a create or rename targets a path that another memory uses, or a path that overlaps another memory's path.
1581 The error returned with HTTP status 409 when you create or rename a memory and the path you give is already used by another memory or overlaps another memory's path.
14621582
14631583 Two paths overlap when one is an ancestor of the other, such as `/notes` and `/notes/todo.md`. To free the path, rename or delete the memory that `conflicting_memory_id` references, then retry. To change that memory instead of creating a new one, update it.
14641584
from line 1618
14981618
14991619- `BetaManagedAgentsMemoryPrefix object`
15001620
1501 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
1621 A directory marker that [List Memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) returns instead of the memories below the requested `depth`.
15021622
1623 It stands for one or more memories whose paths start with `path`. It isn't a stored object and doesn't have an ID. Each marker counts toward the page `limit`.
1624
15031625 - `type: "memory_prefix"`
15041626
15051627 - `path: string`
from line 1632
15101632
15111633- `BetaManagedAgentsMemoryView = "basic" or "full"`
15121634
1513 Selects which projection of a `memory` or `memory_version` the server returns. `basic` returns the object with `content` set to `null`; `full` populates `content`. When omitted, the default is endpoint-specific: retrieve operations default to `full`; list, create, and update operations default to `basic`. Listing with `view=full` caps `limit` at 20.
1635 Whether a `memory` or `memory_version` in the response includes its `content`. Defaults to `full` on retrieve operations and to `basic` on list, create, and update operations.
1636
1637 With `full`, list operations return at most 20 items per page.
15141638
15151639 - `"basic"`
15161640
No line in this hunk matches that.