Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

Merge branch 'master' into dev

Nicholas Tindle65e80c715914
diff --cc autogpt_platform/backend/backend/copilot/graphiti/ingest.py
index ab9192a89c,e49bda2792..4d3091d1cf
--- a/autogpt_platform/backend/backend/copilot/graphiti/ingest.py
+++ b/autogpt_platform/backend/backend/copilot/graphiti/ingest.py
@@@ -12,7 -12,7 +12,7 @@@ from datetime import datetime, timezon
from graphiti_core.nodes import EpisodeType
- from .client import derive_memory_group_id, get_graphiti_client
-from .client import derive_group_id, ensure_indices_once, get_graphiti_client
++from .client import derive_memory_group_id, ensure_indices_once, get_graphiti_client
from .memory_model import MemoryEnvelope, MemoryKind, MemoryStatus, SourceKind
from .types import EDGE_TYPE_MAP, EDGE_TYPES, ENTITY_TYPES
@@@ -284,11 -257,12 +284,15 @@@ async def _ingestion_worker(user_id: st
# graph write raises. See ``IngestionCompletion``.
completion: IngestionCompletion | None = payload.pop("_completion", None)
try:
- group_id = derive_group_id(user_id)
+ if payload.get("group_id") != group_id:
+ raise MemoryScopeViolationError(
+ "Ingestion payload memory group mismatch"
+ )
client = await get_graphiti_client(group_id)
+ # This is the write path, so materializing the graph is
+ # intended here — unlike driver construction, which must
+ # never create one. Once per group per loop.
+ await ensure_indices_once(group_id, client)
# ``_edge_metadata`` is a sidecar (not an add_episode kwarg) —
# pop it before the **payload spread. Present only for dream
# writes; None for conversation turns / memory-store calls.