From df528f06505bdc05b7250f01e359cc9c48e4c375 Mon Sep 17 00:00:00 2001 From: Quentin Veys Date: Thu, 5 Feb 2026 14:36:29 +0100 Subject: [PATCH] fix(graphiti): migrate graphiti_memory imports to canonical paths (#1714) * fix(graphiti): migrate graphiti_memory imports to canonical paths The `graphiti_memory.py` shim was removed during the backend refactor (commit 11fcdf42) but consumers were never updated. This caused all `from graphiti_memory import ...` to fail silently (caught by try/except ImportError), preventing the Graphiti memory system from initializing for any project. Migrate the 3 remaining import sites to use the canonical module path `integrations.graphiti.memory` instead of the deleted shim. Closes #1220 Co-Authored-By: Claude Opus 4.5 * style: combine docstring import example into single line Address Gemini Code Assist review suggestion to merge two import examples from the same module into one line. Co-Authored-By: Claude Opus 4.5 --------- Co-authored-by: Claude Opus 4.5 Co-authored-by: Andy <119136210+AndyMik90@users.noreply.github.com> --- apps/backend/integrations/graphiti/memory.py | 8 ++------ apps/backend/integrations/graphiti/providers_pkg/utils.py | 2 +- apps/backend/memory/graphiti_helpers.py | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/backend/integrations/graphiti/memory.py b/apps/backend/integrations/graphiti/memory.py index 832d5d67..ab3787e5 100644 --- a/apps/backend/integrations/graphiti/memory.py +++ b/apps/backend/integrations/graphiti/memory.py @@ -12,12 +12,8 @@ The refactored code is now organized as: - graphiti/search.py - Semantic search logic - graphiti/schema.py - Graph schema definitions -This facade ensures existing imports continue to work: - from graphiti_memory import GraphitiMemory, is_graphiti_enabled - -New code should prefer importing from the graphiti package: - from graphiti import GraphitiMemory - from graphiti.schema import GroupIdMode +Import from this module: + from integrations.graphiti.memory import GraphitiMemory, is_graphiti_enabled, GroupIdMode For detailed documentation on the memory system architecture and usage, see graphiti/graphiti.py. diff --git a/apps/backend/integrations/graphiti/providers_pkg/utils.py b/apps/backend/integrations/graphiti/providers_pkg/utils.py index 406bdd0c..20a007e9 100644 --- a/apps/backend/integrations/graphiti/providers_pkg/utils.py +++ b/apps/backend/integrations/graphiti/providers_pkg/utils.py @@ -62,7 +62,7 @@ async def get_graph_hints( try: from pathlib import Path - from graphiti_memory import GraphitiMemory, GroupIdMode + from integrations.graphiti.memory import GraphitiMemory, GroupIdMode # Determine project directory from project_id or use current dir project_dir = Path.cwd() diff --git a/apps/backend/memory/graphiti_helpers.py b/apps/backend/memory/graphiti_helpers.py index 11a1a075..3d03db5b 100644 --- a/apps/backend/memory/graphiti_helpers.py +++ b/apps/backend/memory/graphiti_helpers.py @@ -17,7 +17,7 @@ from core.sentry import capture_exception logger = logging.getLogger(__name__) if TYPE_CHECKING: - from graphiti_memory import GraphitiMemory + from integrations.graphiti.memory import GraphitiMemory def is_graphiti_memory_enabled() -> bool: @@ -60,7 +60,7 @@ async def get_graphiti_memory( return None try: - from graphiti_memory import GraphitiMemory, GroupIdMode + from integrations.graphiti.memory import GraphitiMemory, GroupIdMode if project_dir is None: project_dir = spec_dir.parent.parent