You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix deduplication for "message" type long-term memories
The memory server indexes any messages from working memory into
"message" type memory records in long-term memory. However, we
were not attempting to deduplicate these memory records -- only
the higher-level long-term memory types, like semantic and episodic
memory.
This change refactors the logic we use to store messages long-term
such that they work similarly to long-term memories the client adds
to working memory. When a client adds a message to working memory,
the client gives the memory an ID, and the memory gets a blank
`persisted_at` timestamp. After setting working memory, we kick
off a background task to persist any promoted long-term memories
and messages in long-term memory. When we copy the messages into
long-term memory, we now update the `persisted_at` timestamp. If
we see that working memory again and try to persist any new memories
or messages, we'll skip any that have already been persisted.
0 commit comments