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

Method stats

src/knowledge/graph.py:74–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 return n
73
74 def stats(self) -> dict[str, int]:
75 by_type: dict[str, int] = {}
76 for ent in self.entities.values():
77 by_type[ent.type] = by_type.get(ent.type, 0) + 1
78 return {"total": len(self.entities), **by_type}
79
80 def top(self, limit: int = 20) -> list[Entity]:
81 return sorted(self.entities.values(), key=lambda e: (-e.count, -e.last_seen, e.name))[:limit]

Callers 5

test_clearFunction · 0.95
_do_knowledgeMethod · 0.80

Calls 1

getMethod · 0.45

Tested by 4

test_clearFunction · 0.76