Memories

Update a memory (creates new version)

Update a memory by creating a new version. The original memory is preserved with isLatest=false.

patch/v4/memories

Request body

idstring

ID of the memory entry to operate on

contentstring

Exact content match of the memory entry to operate on. Use this when you don't have the ID.

containerTagstring required

Container tag / space identifier. Required to scope the operation.

newContentstring required

The new content that will replace the existing memory

metadataobject

Optional metadata. If not provided, inherits from the previous version.

Example request

{
  "id": "mem_abc123",
  "content": "John prefers dark mode",
  "containerTag": "user_123",
  "newContent": "John now prefers light mode"
}

Response

Memory updated successfully

idstring required

ID of the newly created memory version

memorystring required

The content of the new memory version

versionnumber required

Version number of this memory entry

parentMemoryIdstring nullable required

ID of the memory this version updates

rootMemoryIdstring nullable required

ID of the first memory in this version chain

createdAtstring datetime required

When this memory version was created

Example response

{
  "id": "mem_xyz789",
  "memory": "John now prefers light mode",
  "version": 2,
  "parentMemoryId": "mem_abc123",
  "rootMemoryId": "mem_abc123"
}

Changes