Skip to main content

Module query

Module query 

Source
Expand description

Graph traversal and querying utilities.

Two layers:

  1. Free functions (e.g. recall_recent, walk_from, find_patterns) — take GraphStore plus parameters such as agent_id where filtering applies.
  2. GraphQuery — returned by SqliteGraphStore::query; holds agent_id and offers SQL-backed filters (episodes, lineage, by_tag, subgraph_edges, GraphQuery::read_runtime_state, …).

Serialized node JSON uses top-level agent_id and nested node_type fields (e.g. $.node_type.outcome); edge rows use SQLite columns from_id, to_id, label (see crate::snapshot::SnapshotEdge for the export/import naming source_id / target_id / edge_type).

Structs§

GraphQuery
Builder-style queries scoped to one agent_id (matches json_extract(payload, '$.agent_id')).

Functions§

count_by_topic_cluster
find_high_confidence_facts
Find semantic facts with confidence above a threshold
find_patterns
Find procedural patterns by name prefix
find_strong_traits
Find persona traits sorted by strength
recall_by_procedure_type
recall_by_topic_cluster
recall_contradictions
recall_delta_by_relevance
recall_episodes_by_conversation
recall_episodes_with_signal
recall_flagged_episodes
recall_low_success_procedures
recall_recent
Recall recent episodes, optionally filtered by tool usage
recall_strength_history
recall_task_scoped_episodes
Task-scoped episodic recall:
walk_from
Walk the graph from a starting node, following edges with a specific label