MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / load

Method load

src/knowledge/graph.py:113–118  ·  view source on GitHub ↗
(cls, path: Path | None = None)

Source from the content-addressed store, hash-verified

111
112 @classmethod
113 def load(cls, path: Path | None = None) -> "KnowledgeGraph":
114 p = path or default_graph_path()
115 try:
116 return cls.from_dict(json.loads(p.read_text(encoding="utf-8")))
117 except Exception: # noqa: BLE001 - missing/corrupt → empty graph
118 return cls()

Callers

nothing calls this directly

Calls 2

default_graph_pathFunction · 0.85
from_dictMethod · 0.45

Tested by

no test coverage detected