Overview of MuninnDB Architecture
developMuninnDB is a purpose-built cognitive database delivered as a single Go binary. It uses Pebble for raw key-value storage but manages its own storage format (ERF), indexes, cognitive workers, and activation engine. It is designed to be dependency-free at runtime.
Interface Layer
MuninnDB exposes several protocols for interaction:
- MBP (Port 8474): Native binary protocol over TCP.
- REST API (Port 8475): JSON-based interface.
- Web UI (Port 8476): Includes health and metrics endpoints.
- gRPC (Port 8477): Protocol buffers over TCP.
- MCP (Port 8750): Model Context Protocol via JSON-RPC.
Core Components
- Plugin Layer (Optional): Includes
Embed(HNSW vectors) andEnrich(LLM semantic analysis). - Core Engine: Handles the write path, the 6-phase ACTIVATE pipeline, cognitive workers (Hebbian, contradiction, confidence, transition), and the semantic trigger system.
- Index Layer: Supports Inverted (BM25), HNSW (vector), Adjacency (association graph), and Secondary (state, tag, creator) indexes.
- Storage Layer: Uses ERF (Engram Record Format) with Pebble KV, organized into Hot (in-memory), Warm (on-disk), and Cold (compressed) tiers.