From 9337a873ec86322e3f482c80354d680e6d0c0e06 Mon Sep 17 00:00:00 2001 From: Andy Kwok Date: Sat, 23 Aug 2025 08:36:19 -0700 Subject: [PATCH] Fix: Missing app_id on Neptune Analytics client (#3278) Signed-off-by: Andy Kwok --- mem0/graphs/configs.py | 1 + mem0/graphs/neptune/main.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mem0/graphs/configs.py b/mem0/graphs/configs.py index b48cc40ad..0b5e1e168 100644 --- a/mem0/graphs/configs.py +++ b/mem0/graphs/configs.py @@ -42,6 +42,7 @@ class MemgraphConfig(BaseModel): class NeptuneConfig(BaseModel): + app_id: Optional[str] = Field("Mem0", description="APP_ID for the connection") endpoint: Optional[str] = ( Field( None, diff --git a/mem0/graphs/neptune/main.py b/mem0/graphs/neptune/main.py index 987442d8b..c47280b65 100644 --- a/mem0/graphs/neptune/main.py +++ b/mem0/graphs/neptune/main.py @@ -4,6 +4,7 @@ from .base import NeptuneBase try: from langchain_aws import NeptuneAnalyticsGraph + from botocore.config import Config except ImportError: raise ImportError("langchain_aws is not installed. Please install it using 'make install_all'.") @@ -16,9 +17,11 @@ class MemoryGraph(NeptuneBase): self.graph = None endpoint = self.config.graph_store.config.endpoint + app_id = self.config.graph_store.config.app_id if endpoint and endpoint.startswith("neptune-graph://"): graph_identifier = endpoint.replace("neptune-graph://", "") - self.graph = NeptuneAnalyticsGraph(graph_identifier) + self.graph = NeptuneAnalyticsGraph(graph_identifier = graph_identifier, + config = Config(user_agent_appid=app_id)) if not self.graph: raise ValueError("Unable to create a Neptune client: missing 'endpoint' in config")