Expand description
Graph traversal helpers over the entities and relationships tables. Entity graph traversal (BFS over memory_entities + relations).
Queries the SQLite entity and relation tables to expand neighbourhood
sets used by the related and recall commands.
Functions§
- bfs_
with_ predecessors - BFS that also returns a predecessor map for path reconstruction.
- traverse_
from_ memories - Traverses the entity graph by BFS from seed memories.
- traverse_
from_ memories_ with_ hops - BFS graph traversal that also returns the hop distance for each reached memory.
- traverse_
from_ memories_ with_ hops_ capped - Extended variant that accepts an optional neighbour cap per hop.
Type Aliases§
- Entity
Depth Map - Depth map from BFS: entity_id → hop distance from seeds.
- Predecessor
Map - Predecessor map from BFS: entity_id → (parent_entity_id, relation_type, edge_weight).