fix(agent-framework): give each add_memory call its own document

Clarified memory handling by removing custom_id in memory addition.
This commit is contained in:
harshitgavita-07 2026-10-02 23:54:49 +05:30 • committed by GitHub
parent bce2d0dc16
commit f4245fdad2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -130,10 +130,12 @@ class SupermemoryTools:
) -> str:
"""Add (remember) memories/details/information about the user or other facts or entities. Run when explicitly asked or when the user mentions any information generalizable beyond the context of the current conversation."""
try:
# No custom_id: each remembered fact is its own document. A shared id would
# make every call update one document, replacing the previous memory and
# colliding with the conversation transcript saved under connection.custom_id.
response = await self._client.add(
content=memory,
container_tag=self._connection.container_tag,
custom_id=self._connection.custom_id,
)
result: MemoryAddResult = {
"success": True,