Skip to main content
Combines multiple memories into a single new memory, soft-deleting the sources.

Parameters

sourceIds
string[]
required
IDs of the memories to consolidate.
mergedContent
string
required
The consolidated content for the new memory.
layer
string
default:"long_term"
Layer for the merged memory.

Behavior

  1. Creates a new memory with the merged content and a fresh embedding
  2. Soft-deletes all source memories
  3. Returns the new consolidated memory

Usage

Pair with find_duplicates to clean up redundant memories:
1. find_duplicates(memoryId) → [similar1, similar2]
2. consolidate_memories([memoryId, similar1.id, similar2.id], "merged text")