MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / load_agent

Method load_agent

methods/zep_agent.py:496–514  ·  view source on GitHub ↗

Load agent state.

(self, load_path: str)

Source from the content-addressed store, hash-verified

494 print(f"[Zep] Agent state saved to: {save_dir}")
495
496 def load_agent(self, load_path: str) -> bool:
497 """Load agent state."""
498 load_dir = Path(load_path)
499 if not load_dir.exists():
500 print(f"[Zep] Load path not found: {load_dir}")
501 return False
502
503 metadata_path = load_dir / "metadata.json"
504 if metadata_path.exists():
505 with open(metadata_path, "r") as f:
506 metadata = json.load(f)
507
508 self._current_user_id = metadata.get("user_id")
509 self._current_graph_id = metadata.get("graph_id")
510 self._current_thread_id = metadata.get("thread_id")
511 self._context_id = metadata.get("context_id")
512
513 print(f"[Zep] Agent state loaded from: {load_dir}")
514 return True
515
516 @property
517 def memory_count(self) -> int:

Callers

nothing calls this directly

Calls 3

existsMethod · 0.45
loadMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected