Expand description
§MenteDB: The Mind Database for AI Agents
MenteDB is a purpose-built database engine for AI agent memory. It’s a cognition preparation engine that pre-digests knowledge for single-pass transformer consumption.
§Core Concepts
- MemoryNode: The atomic unit of knowledge (embeddings, graph, temporal, attributes)
- MemoryEdge: Typed, weighted relationships between memories
- MemoryTier: Cognitive inspired storage hierarchy (working, episodic, semantic, procedural, archival)
- Context Assembly: Token budget aware context building that respects attention patterns
- MQL: Mente Query Language for memory retrieval and manipulation
§Quick Start
use mentedb::prelude::*;
use mentedb::MenteDb;
use std::path::Path;
let mut db = MenteDb::open(Path::new("./my-agent-memory")).unwrap();
// store, recall, relate, forget...
db.close().unwrap();§Feature Highlights
- Unified
process_turnpipeline: single call handles context retrieval, pain signals, episodic storage, write inference, action detection, sentiment, phantom tracking, trajectory, speculative caching, fact extraction, and auto-maintenance (decay / archival / consolidation) - Seven cognitive features: interference detection, pain signals, phantom tracking, speculative caching, stream monitoring, trajectory tracking, write inference
- HNSW vector index with hybrid search (vector + tags + temporal + salience)
- CSR/CSC knowledge graph with belief propagation
- Token budget aware context assembly with attention curve optimization
- MQL query language with vector, tag, temporal, and graph traversal support
- WAL based crash recovery with LZ4 compressed pages
§Repository
Source code: https://github.com/nambok/mentedb
Re-exports§
pub use mentedb_cognitive as cognitive;pub use mentedb_consolidation as consolidation;pub use mentedb_context as context;pub use mentedb_core as core;pub use mentedb_graph as graph;pub use mentedb_index as index;pub use mentedb_query as query;pub use mentedb_storage as storage;
Modules§
- enrichment
- Sleeptime enrichment pipeline (requires
enrichmentfeature). Sleeptime enrichment pipeline orchestrator. - prelude
- Commonly used types, re-exported for convenience.
- process_
turn - Unified process_turn orchestration.
Unified
process_turnorchestration.
Structs§
- Cognitive
Config - Configuration for the cognitive engine subsystems.
- Enrichment
Config - Configuration for sleeptime enrichment pipeline.
- Enrichment
Result - Result of running the enrichment pipeline.
- Entity
Link Resolution - A confirmed entity resolution from an external resolver (LLM).
- Entity
Link Result - Result of a single entity linking run.
- Entity
Separation - A pair of entity names that the LLM confirmed are DIFFERENT entities.
- MenteDb
- The unified database facade for MenteDB.
Constants§
- VERSION
- Engine version, derived from Cargo.toml at compile time.