feat: add Memory Gateway integration with async support for memory snapshots and user management

This commit is contained in:
2026-06-04 17:00:02 +08:00
parent 236ac19789
commit d93ca62990
13 changed files with 949 additions and 2 deletions

View File

@ -58,6 +58,17 @@ class MemoryService:
store.load_from_disk()
return capture_memory_snapshot(store)
async def capture_snapshot_for_run_async(
self,
*,
user_id: str | None = None,
session_id: str | None = None,
query: str | None = None,
) -> MemorySnapshot:
"""Async-compatible snapshot hook used by optional memory integrations."""
return self.capture_snapshot_for_run()
def get_snapshot(self) -> MemorySnapshot:
"""获取当前 run 应注入 system prompt 的 frozen snapshot。"""