Expand description
Neo4j-backed implementations of the memory traits in
klieo_core::memory.
MemoryNeo4j::connect dials a Bolt endpoint, ensures schema
constraints + indices, and returns trait-object handles ready to
drop into klieo_core::AgentContext. Reach for
MemoryNeo4j::new only when you need a tuned Neo4jConfig
(custom max_connections, fetch_size, etc.) — see ADR-036.
§Example
use klieo_memory_neo4j::MemoryNeo4j;
async fn example() {
let mem = MemoryNeo4j::connect(
"bolt://127.0.0.1:7687",
"neo4j",
"secret",
)
.await
.unwrap();
let _ = mem;
}§Advanced wiring — tuned Neo4jConfig
use klieo_memory_neo4j::{MemoryNeo4j, Neo4jConfig};
async fn example() {
let cfg = Neo4jConfig::new("bolt://127.0.0.1:7687", "neo4j", "secret");
let mem = MemoryNeo4j::new(cfg).await.unwrap();
let _ = mem;
}§What’s implemented
| Trait | Module | Notes |
|---|---|---|
ShortTermMemory | short_term | (:Thread)-[:HAS_MESSAGE]->(:Message) ordered by seq. |
EpisodicMemory | episodic | (:Run)-[:RECORDED]->(:Episode) ordered by seq. |
LongTermMemory is intentionally not implemented here — see
klieo-memory-qdrant for vector recall.
Re-exports§
pub use connection::Neo4jConfig;pub use connection::Neo4jHandle;pub use short_term::Neo4jShortTerm;pub use episodic::Neo4jEpisodic;pub use factory::MemoryNeo4j;
Modules§
- connection
- Connection handle + schema bootstrap.
- episodic
Neo4jEpisodic—EpisodicMemoryover a Neo4j run/episode graph.- error
- Error mapping from
neo4rs::Errortoklieo_core::error::MemoryError. - factory
MemoryNeo4j— convenience factory bundling all Neo4j-backed memory traits in one struct.- short_
term Neo4jShortTerm—ShortTermMemoryover a Neo4j thread/message graph.