The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 5
55
66# Memory Stores
77
8## Create a memory store
8## Create a Memory Store
99
1010**POST** `/v1/memory_stores`
1111
12Create a memory store
12Create a Memory Store
1313
1414### Headers
1515
from line 137
137137
138138- `name: string`
139139
140 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.
140 The name of the memory store, 1 to 255 characters long, without control characters. Names don't have to be unique in a workspace.
141
142 In a session, the store's directory under `/mnt/memory/` is based on this name. The name is lowercased and every run of characters other than ASCII letters and digits becomes one hyphen. The session's memory store resource gives the exact path in `mount_path`.
143
144 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#how-the-agent-accesses-memory) to learn more about how agents access memory stores.
141145
142146 minLength: 1, maxLength: 255
143147
144148- `description: optional string`
145149
146 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.
150 Free-text description of what the store contains, up to 1,024 characters. Included in the agent's system prompt when the store is attached, so word it to be useful to the agent.
147151
148152 maxLength: 1024
149153
150154- `metadata: optional map[string]`
151155
152 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.
156 Key-value pairs for your own use, such as the end user that the store belongs to. The agent doesn't see them.
157
158 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters.
153159
154160### Returns
155161
from line 167
161167
162168 - `id: string`
163169
164 Unique 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.
170 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
165171
166172 - `archived_at: string or null`
167173
168 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
174 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
175
176 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
177
178 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
169179
170180 format: date-time
171181
172182 - `created_at: string`
173183
174 Timestamp when the store was created.
184 When the memory store was created, in RFC 3339.
175185
176186 format: date-time
177187
178188 - `description: string`
179189
180 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. Empty string when unset.
190 Free-text description of what the store contains, up to 1,024 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.
181191
182192 - `metadata: map[string]`
183193
184 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. Returned on retrieve/list but not filterable.
194 Key-value pairs for your own use, such as the end user that the store belongs to.
195
196 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
185197
186198 - `name: string`
187199
from line 201
189201
190202 - `updated_at: string`
191203
192 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
204 When the memory store was last changed, in RFC 3339.
205
206 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
193207
194208 format: date-time
195209
from line 237
223237}
224238```
225239
226## List memory stores
240## List Memory Stores
227241
228242**GET** `/v1/memory_stores`
229243
230List memory stores
244List Memory Stores
231245
232246### Query parameters
233247
234248- `"created_at[gte]": optional string`
235249
236 Return only stores whose `created_at` is at or after this time (inclusive). Sent on the wire as `created_at[gte]`.
250 Return only memory stores created at or after this time (inclusive).
237251
238252 format: date-time
239253
240254- `"created_at[lte]": optional string`
241255
242 Return only stores whose `created_at` is at or before this time (inclusive). Sent on the wire as `created_at[lte]`.
256 Return only memory stores created at or before this time (inclusive).
243257
244258 format: date-time
245259
from line 269
255269
256270- `page: optional string`
257271
258 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.
272 The `next_page` value from a previous response, to get the next page. Omit it to get the first page.
259273
260274### Headers
261275
from line 403
389403
390404 - `id: string`
391405
392 Unique 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.
406 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
393407
394408 - `archived_at: string or null`
395409
396 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
410 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
411
412 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
413
414 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
397415
398416 format: date-time
399417
400418 - `created_at: string`
401419
402 Timestamp when the store was created.
420 When the memory store was created, in RFC 3339.
403421
404422 format: date-time
405423
406424 - `description: string`
407425
408 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. Empty string when unset.
426 Free-text description of what the store contains, up to 1,024 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.
409427
410428 - `metadata: map[string]`
411429
412 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. Returned on retrieve/list but not filterable.
430 Key-value pairs for your own use, such as the end user that the store belongs to.
431
432 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
413433
414434 - `name: string`
415435
from line 437
417437
418438 - `updated_at: string`
419439
420 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
440 When the memory store was last changed, in RFC 3339.
441
442 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
421443
422444 format: date-time
423445
424446- `next_page: optional string or null`
425447
426 Opaque cursor for the next page (a `page_...` value). Pass as `page` on the next request. `null` when there are no more results.
448 The value to pass as `page` to get the next page, or `null` if there are no more results.
427449
428450### Example
429451
from line 476
454476}
455477```
456478
457## Retrieve a memory store
479## Retrieve a Memory Store
458480
459481**GET** `/v1/memory_stores/{memory_store_id}`
460482
461Retrieve a memory store
483Retrieve a Memory Store
462484
463485### Path parameters
464486
465487- `memory_store_id: string`
466488
467 ID of the memory store to retrieve (a `memstore_...` identifier). Required. Enumerate IDs via `GET /v1/memory_stores`.
489 The ID of the memory store to retrieve (`memstore_...`).
468490
469491### Headers
470492
from line 620
598620
599621 - `id: string`
600622
601 Unique 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.
623 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
602624
603625 - `archived_at: string or null`
604626
605 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
627 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
628
629 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
630
631 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
606632
607633 format: date-time
608634
609635 - `created_at: string`
610636
611 Timestamp when the store was created.
637 When the memory store was created, in RFC 3339.
612638
613639 format: date-time
614640
615641 - `description: string`
616642
617 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. Empty string when unset.
643 Free-text description of what the store contains, up to 1,024 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.
618644
619645 - `metadata: map[string]`
620646
621 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. Returned on retrieve/list but not filterable.
647 Key-value pairs for your own use, such as the end user that the store belongs to.
648
649 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
622650
623651 - `name: string`
624652
from line 654
626654
627655 - `updated_at: string`
628656
629 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
657 When the memory store was last changed, in RFC 3339.
658
659 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
630660
631661 format: date-time
632662
from line 686
656686}
657687```
658688
659## Update a memory store
689## Update a Memory Store
660690
661691**POST** `/v1/memory_stores/{memory_store_id}`
662692
663Update a memory store
693Update a Memory Store
664694
665695### Path parameters
666696
667697- `memory_store_id: string`
668698
669 ID of the memory store to update (a `memstore_...` identifier). Required. Enumerate IDs via `GET /v1/memory_stores`. Updating an archived store returns 400.
699 The ID of the memory store to update (`memstore_...`).
700
701 The request fails with HTTP status 400 if the store is archived.
670702
671703### Headers
672704
from line 826
794826
795827- `description: optional string or null`
796828
797 New description for the store, up to 1024 characters. Pass an empty string to clear it.
829 New description for the store, up to 1,024 characters. Pass an empty string to clear it.
798830
799831 maxLength: 1024
800832
801833- `metadata: optional map[string] or null`
802834
803 Metadata patch. Set a key to a string to upsert it, or to null to delete it. Omit the field to preserve. The stored bag is limited to 16 keys (up to 64 chars each) with values up to 512 chars.
835 Changes to apply to the memory store's metadata. Keys you leave out keep their values.
836
837 Set a key to a string to add or replace it, or to `null` to remove it. After the change, the metadata can hold at most 16 key-value pairs. Keys are 1 to 64 characters long and values at most 512 characters.
804838
805839- `name: optional string or null`
806840
807 New human-readable name for the store. 1–255 characters; no control characters. Renaming changes the slug used for the store's `mount_path` in sessions created after the update.
841 The new name of the memory store, 1 to 255 characters long, without control characters.
842
843 Sessions created after the change use the new name for the store's directory under `/mnt/memory/`.
808844
809845 minLength: 1, maxLength: 255
810846
from line 854
818854
819855 - `id: string`
820856
821 Unique 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.
857 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
822858
823859 - `archived_at: string or null`
824860
825 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
861 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
862
863 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
864
865 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
826866
827867 format: date-time
828868
829869 - `created_at: string`
830870
831 Timestamp when the store was created.
871 When the memory store was created, in RFC 3339.
832872
833873 format: date-time
834874
835875 - `description: string`
836876
837 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. Empty string when unset.
877 Free-text description of what the store contains, up to 1,024 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.
838878
839879 - `metadata: map[string]`
840880
841 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. Returned on retrieve/list but not filterable.
881 Key-value pairs for your own use, such as the end user that the store belongs to.
882
883 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
842884
843885 - `name: string`
844886
from line 888
846888
847889 - `updated_at: string`
848890
849 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
891 When the memory store was last changed, in RFC 3339.
892
893 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
850894
851895 format: date-time
852896
from line 922
878922}
879923```
880924
881## Delete a memory store
925## Delete a Memory Store
882926
883927**DELETE** `/v1/memory_stores/{memory_store_id}`
884928
885Delete a memory store
929Delete a Memory Store
886930
887931### Path parameters
888932
889933- `memory_store_id: string`
890934
891 ID of the memory store to permanently delete (a `memstore_...` identifier). Required. Deletion cascades to all memories and memory versions in the store and cannot be undone.
935 The ID of the memory store to delete (`memstore_...`).
936
937 Deleting a store also deletes all its memories and memory versions. It can't be undone.
892938
893939### Headers
894940
from line 1089
10431089}
10441090```
10451091
1046## Archive a memory store
1092## Archive a Memory Store
10471093
10481094**POST** `/v1/memory_stores/{memory_store_id}/archive`
10491095
1050Archive a memory store
1096Archive a Memory Store
10511097
10521098### Path parameters
10531099
10541100- `memory_store_id: string`
10551101
1056 ID of the memory store to archive (a `memstore_...` identifier). Required. Archiving is one-way and idempotent; archived stores cannot be unarchived. Enumerate IDs via `GET /v1/memory_stores`.
1102 The ID of the memory store to archive (`memstore_...`).
1103
1104 Archiving can't be undone. Archiving a store that is already archived returns it unchanged.
10571105
10581106### Headers
10591107
from line 1235
11871235
11881236 - `id: string`
11891237
1190 Unique 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.
1238 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
11911239
11921240 - `archived_at: string or null`
11931241
1194 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
1242 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
1243
1244 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
1245
1246 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
11951247
11961248 format: date-time
11971249
11981250 - `created_at: string`
11991251
1200 Timestamp when the store was created.
1252 When the memory store was created, in RFC 3339.
12011253
12021254 format: date-time
12031255
12041256 - `description: string`
12051257
1206 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. Empty string when unset.
1258 Free-text description of what the store contains, up to 1,024 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.
12071259
12081260 - `metadata: map[string]`
12091261
1210 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. Returned on retrieve/list but not filterable.
1262 Key-value pairs for your own use, such as the end user that the store belongs to.
1263
1264 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
12111265
12121266 - `name: string`
12131267
from line 1269
12151269
12161270 - `updated_at: string`
12171271
1218 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
1272 When the memory store was last changed, in RFC 3339.
1273
1274 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
12191275
12201276 format: date-time
12211277
from line 1326
12701326
12711327 - `id: string`
12721328
1273 Unique 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.
1329 The unique ID of the memory store (`memstore_...`). Use it to attach the store to a session.
12741330
12751331 - `archived_at: string or null`
12761332
1277 Timestamp when the store was archived, or `null` if active. Set once and never cleared; archiving is one-way. Archived stores are read-only and cannot be attached to new sessions.
1333 When the memory store was archived, in RFC 3339, or `null` if it hasn't been.
1334
1335 Archiving can't be undone. An archived store can't be attached to new sessions. You can't create or update its memories or update the store. You can still read and delete its memories, redact their versions, and delete the store.
1336
1337 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#archive-a-store) to learn more about archiving.
12781338
12791339 format: date-time
12801340
12811341 - `created_at: string`
12821342
1283 Timestamp when the store was created.
1343 When the memory store was created, in RFC 3339.
12841344
12851345 format: date-time
12861346
12871347 - `description: string`
12881348
1289 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. Empty string when unset.
1349 Free-text description of what the store contains, up to 1,024 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.
12901350
12911351 - `metadata: map[string]`
12921352
1293 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. Returned on retrieve/list but not filterable.
1353 Key-value pairs for your own use, such as the end user that the store belongs to.
1354
1355 A store has at most 16 pairs. Keys are 1 to 64 characters long and values at most 512 characters. You can't filter lists by metadata.
12941356
12951357 - `name: string`
12961358
from line 1360
12981360
12991361 - `updated_at: string`
13001362
1301 Timestamp when the store's `name`, `description`, or `metadata` was last modified. Memory writes inside the store do not advance this.
1363 When the memory store was last changed, in RFC 3339.
1364
1365 Changing its `name`, `description`, or `metadata` updates it. Archiving the store does too. Changes to the store's memories don't.
13021366
13031367 format: date-time
13041368
13051369## Memory Stores › Memories
13061370
1307### Create a memory
1371### Create a Memory
13081372
13091373**POST** `/v1/memory_stores/{memory_store_id}/memories`
13101374
1311Create a memory
1375Create a Memory
13121376
13131377#### Path parameters
13141378
from line 1384
13201384
13211385- `view: optional BetaManagedAgentsMemoryView`
13221386
1323 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.
1387 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.
1388
1389 With `full`, list operations return at most 20 items per page.
13241390
13251391 - `"basic"`
13261392
from line 1522
14561522
14571523- `content: string or null`
14581524
1459 UTF-8 text content for the new memory. Maximum 100 kB (102,400 bytes). Required; pass `""` explicitly to create an empty memory.
1525 The UTF-8 text content of the new memory. Pass `""` to create an empty memory.
1526
1527 The maximum size is 100 kB (102,400 bytes).
14601528
14611529- `path: string`
14621530
1463 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.
1531 The path of the new memory, such as `/projects/foo/notes.md`. Paths are case-sensitive.
1532
1533 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.
14641534
14651535 minLength: 2, maxLength: 1024
14661536
from line 1538
14681538
14691539- `BetaManagedAgentsMemory object`
14701540
1471 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.
1541 A text document at a path inside a memory store.
1542
1543 `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.
1544
1545 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.
14721546
14731547 - `type: "memory"`
14741548
14751549 - `id: string`
14761550
1477 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
1551 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
1552
1553 To retrieve, update, or delete the memory, pass this ID.
14781554
14791555 - `content_sha256: string`
14801556
from line 1558
14821558
14831559 - `content_size_bytes: number`
14841560
1485 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
1561 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
14861562
14871563 format: int32
14881564
from line 1574
14981574
14991575 - `memory_version_id: string`
15001576
1501 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).
1577 The ID of the memory version that holds the memory's current content (`memver_...`).
1578
1579 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
1580
1581 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.
15021582
15031583 - `path: string`
15041584
from line 1586
15061586
15071587 - `updated_at: string`
15081588
1509 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).
1589 When the memory was last changed, in RFC 3339.
1590
1591 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
15101592
15111593 format: date-time
15121594
15131595 - `content: optional string or null`
15141596
1515 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
1597 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
1598
1599 The maximum size is 100 kB (102,400 bytes).
15161600
15171601#### Example
15181602
from line 1629
15451629}
15461630```
15471631
1548### List memories
1632### List Memories
15491633
15501634**GET** `/v1/memory_stores/{memory_store_id}/memories`
15511635
1552List memories
1636List Memories
15531637
15541638#### Path parameters
15551639
from line 1645
15611645
15621646- `depth: optional number`
15631647
1564 `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`.
1648 How far below `path_prefix` to list. Defaults to `0`, which lists every memory below the prefix.
1649
1650 Pass `1` to list only the direct children. Deeper memories are then grouped into `memory_prefix` items.
15651651
15661652 format: int32
15671653
15681654- `limit: optional number`
15691655
1570 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.
1656 The maximum number of items to return per page, from 1 to 100. Defaults to 20.
1657
1658 With `view=full`, a page holds at most 20 items. `memory` and `memory_prefix` items both count toward the limit.
15711659
15721660 format: int32
15731661
15741662- `page: optional string`
15751663
1576 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.
1664 The `next_page` value from a previous response, to get the next page. Omit it to get the first page.
15771665
15781666- `path_prefix: optional string`
15791667
1580 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.
1668 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.
1669
1670 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`.
15811671
15821672- `view: optional BetaManagedAgentsMemoryView`
15831673
1584 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.
1674 Whether each memory in the response includes `content`. Defaults to `basic`, which sets it to `null`.
1675
1676 With `full`, a page holds at most 20 items.
15851677
15861678 - `"basic"`
15871679
from line 1813
17211813
17221814 - `BetaManagedAgentsMemory object`
17231815
1724 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.
1816 A text document at a path inside a memory store.
1817
1818 `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.
1819
1820 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.
17251821
17261822 - `type: "memory"`
17271823
17281824 - `id: string`
17291825
1730 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
1826 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
1827
1828 To retrieve, update, or delete the memory, pass this ID.
17311829
17321830 - `content_sha256: string`
17331831
from line 1833
17351833
17361834 - `content_size_bytes: number`
17371835
1738 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
1836 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
17391837
17401838 format: int32
17411839
from line 1849
17511849
17521850 - `memory_version_id: string`
17531851
1754 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).
1852 The ID of the memory version that holds the memory's current content (`memver_...`).
1853
1854 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
1855
1856 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.
17551857
17561858 - `path: string`
17571859
from line 1861
17591861
17601862 - `updated_at: string`
17611863
1762 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).
1864 When the memory was last changed, in RFC 3339.
1865
1866 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
17631867
17641868 format: date-time
17651869
17661870 - `content: optional string or null`
17671871
1768 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
1872 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
1873
1874 The maximum size is 100 kB (102,400 bytes).
17691875
17701876 - `BetaManagedAgentsMemoryPrefix object`
17711877
1772 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.
1878 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`.
1879
1880 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`.
17731881
17741882 - `type: "memory_prefix"`
17751883
from line 1887
17791887
17801888- `next_page: optional string or null`
17811889
1782 Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request.
1890 The value to pass as `page` to get the next page, or `null` if there are no more results.
17831891
17841892#### Example
17851893
from line 1920
18121920}
18131921```
18141922
1815### Retrieve a memory
1923### Retrieve a Memory
18161924
18171925**GET** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
18181926
1819Retrieve a memory
1927Retrieve a Memory
18201928
18211929#### Path parameters
18221930
from line 1940
18321940
18331941- `view: optional BetaManagedAgentsMemoryView`
18341942
1835 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.
1943 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.
1944
1945 With `full`, list operations return at most 20 items per page.
18361946
18371947 - `"basic"`
18381948
from line 2078
19682078
19692079- `BetaManagedAgentsMemory object`
19702080
1971 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.
2081 A text document at a path inside a memory store.
2082
2083 `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.
2084
2085 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.
19722086
19732087 - `type: "memory"`
19742088
19752089 - `id: string`
19762090
1977 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
2091 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
2092
2093 To retrieve, update, or delete the memory, pass this ID.
19782094
19792095 - `content_sha256: string`
19802096
from line 2098
19822098
19832099 - `content_size_bytes: number`
19842100
1985 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
2101 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
19862102
19872103 format: int32
19882104
from line 2114
19982114
19992115 - `memory_version_id: string`
20002116
2001 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).
2117 The ID of the memory version that holds the memory's current content (`memver_...`).
2118
2119 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
2120
2121 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.
20022122
20032123 - `path: string`
20042124
from line 2126
20062126
20072127 - `updated_at: string`
20082128
2009 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).
2129 When the memory was last changed, in RFC 3339.
2130
2131 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
20102132
20112133 format: date-time
20122134
20132135 - `content: optional string or null`
20142136
2015 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
2137 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
2138
2139 The maximum size is 100 kB (102,400 bytes).
20162140
20172141#### Example
20182142
from line 2164
20402164}
20412165```
20422166
2043### Update a memory
2167### Update a Memory
20442168
20452169**POST** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
20462170
2047Update a memory
2171Update a Memory
20482172
20492173#### Path parameters
20502174
from line 2184
20602184
20612185- `view: optional BetaManagedAgentsMemoryView`
20622186
2063 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.
2187 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.
2188
2189 With `full`, list operations return at most 20 items per page.
20642190
20652191 - `"basic"`
20662192
from line 2326
22002326
22012327- `path: optional string or null`
22022328
2203 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.
2329 The new path of the memory, which renames it. Omit it to keep the current path.
2330
2331 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.
22042332
22052333 minLength: 2, maxLength: 1024
22062334
22072335- `precondition: optional BetaManagedAgentsPrecondition`
22082336
2209 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.
2337 The condition that the memory must meet for the update to apply. Omit it to update unconditionally.
2338
2339 If the condition fails, the request fails with HTTP status 409.
22102340
22112341 - `type: "content_sha256"`
22122342
from line 2348
22182348
22192349- `BetaManagedAgentsMemory object`
22202350
2221 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.
2351 A text document at a path inside a memory store.
2352
2353 `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.
2354
2355 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.
22222356
22232357 - `type: "memory"`
22242358
22252359 - `id: string`
22262360
2227 Unique identifier for this memory (a `mem_...` value). Stable across renames; use this ID, not the path, to read, update, or delete the memory.
2361 The unique ID of the memory (`mem_...`). It stays the same when the memory's path changes.
2362
2363 To retrieve, update, or delete the memory, pass this ID.
22282364
22292365 - `content_sha256: string`
22302366
from line 2368
22322368
22332369 - `content_size_bytes: number`
22342370
2235 Size of `content` in bytes (the UTF-8 plaintext length). Always populated, regardless of `view`.
2371 The size of the memory's `content` in UTF-8 bytes. It is set regardless of `view`.
22362372
22372373 format: int32
22382374
from line 2384
22482384
22492385 - `memory_version_id: string`
22502386
2251 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).
2387 The ID of the memory version that holds the memory's current content (`memver_...`).
2388
2389 Memory versions don't have a flag that marks the latest one. Compare their IDs with this field instead.
2390
2391 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.
22522392
22532393 - `path: string`
22542394
from line 2396
22562396
22572397 - `updated_at: string`
22582398
2259 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).
2399 When the memory was last changed, in RFC 3339.
2400
2401 To find out who made the change, look at `created_by` on the memory version that `memory_version_id` references.
22602402
22612403 format: date-time
22622404
22632405 - `content: optional string or null`
22642406
2265 The memory's UTF-8 text content. Populated when `view=full`; `null` when `view=basic`. Maximum 100 kB (102,400 bytes).
2407 The memory's UTF-8 text content, or `null` when the response uses `view=basic`.
2408
2409 The maximum size is 100 kB (102,400 bytes).
22662410
22672411#### Example
22682412
from line 2436
22922436}
22932437```
22942438
2295### Delete a memory
2439### Delete a Memory
22962440
22972441**DELETE** `/v1/memory_stores/{memory_store_id}/memories/{memory_id}`
22982442
2299Delete a memory
2443Delete a Memory
23002444
23012445#### Path parameters
23022446
from line 2586
24422586
24432587- `BetaManagedAgentsDeletedMemory object`
24442588
2445 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).
2589 The confirmation that [Delete a Memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http) returns.
2590
2591 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.
2592
2593 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.
24462594
24472595 - `type: "memory_deleted"`
24482596
from line 2619
24712619
24722620## Memory Stores › Memory Versions
24732621
2474### List memory versions
2622### List Memory Versions
24752623
24762624**GET** `/v1/memory_stores/{memory_store_id}/memory_versions`
24772625
2478List memory versions
2626List Memory Versions
24792627
24802628#### Path parameters
24812629
from line 2651
25032651
25042652- `limit: optional number`
25052653
2506 The maximum number of versions to return per page. Defaults to 20.
2654 The maximum number of versions to return per page, from 1 to 100. Defaults to 20.
2655
2656 With `view=full`, a page holds at most 20 versions.
25072657
25082658 format: int32
25092659
from line 2661
25112661
25122662 Return only versions of the memory with this ID (`mem_...`).
25132663
2514 The filter still works after the memory is deleted. The results then include the version whose `operation` is `deleted`.
2664 The filter still works after the memory is deleted. While that memory's versions are retained, the results include the version whose `operation` is `deleted`.
25152665
25162666- `operation: optional BetaManagedAgentsMemoryVersionOperation`
25172667
from line 2693
25432693
25442694- `view: optional BetaManagedAgentsMemoryView`
25452695
2546 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.
2696 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.
2697
2698 With `full`, list operations return at most 20 items per page.
25472699
25482700 - `"basic"`
25492701
from line 2847
26952847
26962848 - `memory_id: string`
26972849
2698 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
2850 The ID of the memory that this version belongs to (`mem_...`).
2851
2852 The ID stays valid after the memory is deleted. Pass it as `memory_id` to [List Memory Versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to get the memory's retained versions, including its `deleted` version while the lineage is retained.
26992853
27002854 - `memory_store_id: string`
27012855
from line 2887
27332887
27342888 - `created_by: optional BetaManagedAgentsActor`
27352889
2736 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
2890 Who made this change to the memory, or `null` if the author wasn't recorded.
2891
2892 Redacting the version doesn't change this field. A `session_actor` here is an agent that wrote through the store's mounted filesystem at `/mnt/memory/`. The version doesn't record the API key that created that session. So the author in `created_by` is who made the change, not who is ultimately responsible for it.
2893
2894 You can [retrieve the session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) to learn more about where the change came from.
27372895
27382896 - `BetaManagedAgentsSessionActor object`
27392897
from line 2947
27892947
27902948 - `redacted_at: optional string or null`
27912949
2792 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
2950 When the version was redacted, in RFC 3339, or `null` if it hasn't been.
2951
2952 When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are `null`.
2953
2954 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#redact-a-version) to learn more about redaction.
27932955
27942956 format: date-time
27952957
from line 2961
27992961
28002962- `next_page: optional string or null`
28012963
2802 Opaque cursor for the next page (a `page_...` value), or `null` if there are no more results. Pass as `page` on the next request.
2964 The value to pass as `page` to get the next page, or `null` if there are no more results.
28032965
28042966#### Example
28052967
from line 3003
28413003}
28423004```
28433005
2844### Retrieve a memory version
3006### Retrieve a Memory Version
28453007
28463008**GET** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}`
28473009
2848Retrieve a memory version
3010Retrieve a Memory Version
28493011
28503012#### Path parameters
28513013
from line 3023
28613023
28623024- `view: optional BetaManagedAgentsMemoryView`
28633025
2864 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.
3026 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.
3027
3028 With `full`, list operations return at most 20 items per page.
28653029
28663030 - `"basic"`
28673031
from line 3161
29973161
29983162- `BetaManagedAgentsMemoryVersion object`
29993163
3000 A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and are not deleted with the memory; each version is retained for at least the version retention period after it was written, unless the store itself is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
3164 One entry in a memory's history, recording a single change and who made it.
3165
3166 Every change to a memory adds one version. Only redaction can change a version after that. Versions belong to the memory store and stay after the memory is deleted. Each version is retained for at least the version retention period after it was written, unless the store itself is deleted.
3167
3168 Retrieving a redacted version succeeds, with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`. Check `redacted_at` to find out whether a version was redacted.
3169
3170 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.
30013171
30023172 - `type: "memory_version"`
30033173
from line 3183
30133183
30143184 - `memory_id: string`
30153185
3016 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
3186 The ID of the memory that this version belongs to (`mem_...`).
3187
3188 The ID stays valid after the memory is deleted. Pass it as `memory_id` to [List Memory Versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to get the memory's retained versions, including its `deleted` version while the lineage is retained.
30173189
30183190 - `memory_store_id: string`
30193191
from line 3223
30513223
30523224 - `created_by: optional BetaManagedAgentsActor`
30533225
3054 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
3226 Who made this change to the memory, or `null` if the author wasn't recorded.
3227
3228 Redacting the version doesn't change this field. A `session_actor` here is an agent that wrote through the store's mounted filesystem at `/mnt/memory/`. The version doesn't record the API key that created that session. So the author in `created_by` is who made the change, not who is ultimately responsible for it.
3229
3230 You can [retrieve the session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) to learn more about where the change came from.
30553231
30563232 - `BetaManagedAgentsSessionActor object`
30573233
from line 3283
31073283
31083284 - `redacted_at: optional string or null`
31093285
3110 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
3286 When the version was redacted, in RFC 3339, or `null` if it hasn't been.
3287
3288 When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are `null`.
3289
3290 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#redact-a-version) to learn more about redaction.
31113291
31123292 format: date-time
31133293
from line 3330
31503330}
31513331```
31523332
3153### Redact a memory version
3333### Redact a Memory Version
31543334
31553335**POST** `/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact`
31563336
3157Redact a memory version
3337Redact a Memory Version
31583338
31593339#### Path parameters
31603340
from line 3472
32923472
32933473- `BetaManagedAgentsMemoryVersion object`
32943474
3295 A `memory_version` object: one immutable, attributed row in a memory's append-only history. Every non-no-op mutation to a memory produces a new version. Versions belong to the store (not the individual memory) and are not deleted with the memory; each version is retained for at least the version retention period after it was written, unless the store itself is deleted. Retrieving a redacted version returns 200 with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`; branch on `redacted_at`, not HTTP status.
3475 One entry in a memory's history, recording a single change and who made it.
3476
3477 Every change to a memory adds one version. Only redaction can change a version after that. Versions belong to the memory store and stay after the memory is deleted. Each version is retained for at least the version retention period after it was written, unless the store itself is deleted.
3478
3479 Retrieving a redacted version succeeds, with `content`, `path`, `content_size_bytes`, and `content_sha256` set to `null`. Check `redacted_at` to find out whether a version was redacted.
3480
3481 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.
32963482
32973483 - `type: "memory_version"`
32983484
from line 3494
33083494
33093495 - `memory_id: string`
33103496
3311 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
3497 The ID of the memory that this version belongs to (`mem_...`).
3498
3499 The ID stays valid after the memory is deleted. Pass it as `memory_id` to [List Memory Versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to get the memory's retained versions, including its `deleted` version while the lineage is retained.
33123500
33133501 - `memory_store_id: string`
33143502
from line 3534
33463534
33473535 - `created_by: optional BetaManagedAgentsActor`
33483536
3349 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
3537 Who made this change to the memory, or `null` if the author wasn't recorded.
3538
3539 Redacting the version doesn't change this field. A `session_actor` here is an agent that wrote through the store's mounted filesystem at `/mnt/memory/`. The version doesn't record the API key that created that session. So the author in `created_by` is who made the change, not who is ultimately responsible for it.
3540
3541 You can [retrieve the session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) to learn more about where the change came from.
33503542
33513543 - `BetaManagedAgentsSessionActor object`
33523544
from line 3594
34023594
34033595 - `redacted_at: optional string or null`
34043596
3405 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
3597 When the version was redacted, in RFC 3339, or `null` if it hasn't been.
3598
3599 When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are `null`.
3600
3601 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#redact-a-version) to learn more about redaction.
34063602
34073603 format: date-time
34083604
34093605