Expand description
Bitemporal graph layer for Mnemo.
Inspired by Graphiti (repo,
paper). The model is the same:
every edge carries valid_from / valid_to (when the fact is
true in the world) plus recorded_at (when the system saw it),
so historical queries can ask “what did we believe at time T?”
without losing later corrections.
valid_from valid_to (None = still true)
^ ^
| fact validity |
+-----------------------+
|
+-- recorded_at (when we wrote the row)Today this crate ships:
- The
TemporalEdgetype and aGraphStoreasync trait. - A DuckDB-backed
DuckGraphStorethat createsgraph_nodesandgraph_edgestables on first use and supports the round-trip- bitemporal
as_ofwalk needed by retrieval.
- bitemporal
graph_expand— bounded BFS that respectsas_offiltering and a maximum depth.
The LLM-driven TemporalEdge::extract path is feature-gated under
graph-extract and currently returns an empty Vec. A real
extractor lands in v0.4.0 final once the prompt + ICL examples are
tuned.
Re-exports§
pub use crate::model::TemporalEdge;pub use crate::store::GraphStore;pub use crate::store::duckdb::DuckGraphStore;
Modules§
Functions§
- graph_
expand - Bounded BFS from
seedthat respects bitemporal validity atas_ofand a max walk depth.