From b8eb0015f7871b8556733adb255a28bd5a0c327e Mon Sep 17 00:00:00 2001 From: The Mavik <179817126+themavik@users.noreply.github.com> Date: Mon, 9 Feb 2026 22:19:40 +0530 Subject: [PATCH] fix: use keyword arguments for Neo4jGraph initialization (#3906) Root cause: Neo4jGraph.__init__ parameter order is (url, username, password, token, database, ...) but the code passed database as the 4th positional argument, which maps to the token parameter. This caused the database value to be silently used as token, while the actual database defaulted to 'neo4j'. Fix: Use explicit keyword arguments to ensure each value maps to the correct parameter regardless of positional order. --- mem0/memory/graph_memory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mem0/memory/graph_memory.py b/mem0/memory/graph_memory.py index 80a7cced77..0b911dff51 100644 --- a/mem0/memory/graph_memory.py +++ b/mem0/memory/graph_memory.py @@ -30,10 +30,10 @@ class MemoryGraph: def __init__(self, config): self.config = config self.graph = Neo4jGraph( - self.config.graph_store.config.url, - self.config.graph_store.config.username, - self.config.graph_store.config.password, - self.config.graph_store.config.database, + url=self.config.graph_store.config.url, + username=self.config.graph_store.config.username, + password=self.config.graph_store.config.password, + database=self.config.graph_store.config.database, refresh_schema=False, driver_config={"notifications_min_severity": "OFF"}, )