/// Engram — a local-first memory substrate for accumulating intelligence. /// /// An engram is the physical trace of a memory in the brain — the actual encoded /// substrate. This crate provides the storage and retrieval primitives that model /// how biological memory works: not as query-and-retrieve, but as /// activation-and-propagation. /// /// # Quick Start /// /// ```rust,no_run /// use engram_core::{EngramDb, Node, Edge, NodeType, MemoryTier, RelationType}; /// use std::path::Path; /// /// let db = EngramDb::open(Path::new("/tmp/my-engram")).unwrap(); /// /// let node = Node::new( /// NodeType::Memory, /// vec![0.9, 0.1, 0.3, 0.7], /// b"The spreading activation model of memory".to_vec(), /// MemoryTier::Semantic, /// 0.9, /// ); /// let id = db.put_node(node).unwrap(); /// /// // Retrieve by spreading activation from a seed /// let results = db.activate(&[id], &[0.8, 0.2, 0.3, 0.6], 3, 10).unwrap(); /// for r in results { /// println!("{:.4} hops={} {:?}", r.activation_strength, r.hops, /// String::from_utf8_lossy(&r.node.content)); /// } /// ``` pub mod activation; pub mod db; pub mod error; pub mod graph; pub mod salience; pub mod storage; pub mod types; pub mod vector; // Re-export the public surface pub use db::EngramDb; pub use error::{EngramError, EngramResult}; pub use types::{ ActivatedNode, Edge, MemoryTier, Node, NodeType, RelationType, ScoredNode, now_ms, };