From f4245fdad2bcf06f3a2400e44e37ca3d539403a2 Mon Sep 17 00:00:00 2001 From: harshitgavita-07 Date: Fri, 2 Oct 2026 23:54:49 +0530 Subject: [PATCH] fix(agent-framework): give each add_memory call its own document Clarified memory handling by removing custom_id in memory addition. --- .../src/supermemory_agent_framework/tools.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/agent-framework-python/src/supermemory_agent_framework/tools.py b/packages/agent-framework-python/src/supermemory_agent_framework/tools.py index 2b70bdd7..c97b0541 100644 --- a/packages/agent-framework-python/src/supermemory_agent_framework/tools.py +++ b/packages/agent-framework-python/src/supermemory_agent_framework/tools.py @@ -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,