Skip to main content

Module knowledge

Module knowledge 

Source
Expand description

Knowledge graph — temporal entity-relationship graph.

Mirrors Python’s knowledge_graph.py. All stored in Turso (triples + entities tables).

Usage:

use aimem_core::{AimemDb, KnowledgeGraph};
let db = AimemDb::memory().await?;
let kg = KnowledgeGraph::new(db);
kg.add_triple("Max", "child_of", "Alice", Some("2015-04-01"), None).await?;
let facts = kg.query_entity("Max", None, "outgoing").await?;

Structs§

KnowledgeGraph