Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

fix: AsyncMemory.reset() does not reset entity store (#5535)

Hrushikesh Yadav8b370def80bd
diff --git a/mem0/memory/main.py b/mem0/memory/main.py
index 5295e6e39..9f2ef2b69 100644
--- a/mem0/memory/main.py
+++ b/mem0/memory/main.py
@@ -3475,6 +3475,13 @@ class AsyncMemory(MemoryBase):
self.config.vector_store.provider, self.config.vector_store.config
)
+ if self._entity_store is not None:
+ try:
+ await asyncio.to_thread(self._entity_store.reset)
+ except Exception as e:
+ logger.warning(f"Failed to reset entity store: {e}")
+ self._entity_store = None
+
capture_event("mem0.reset", self, {"sync_type": "async"})
await display_first_run_notice_async(self, "async", "reset")