MuninnDB

MuninnDB Documentation

MuninnDB is the world's first cognitive database. Instead of storing rows or documents, it stores engrams — memory traces that score by recency and frequency, learn associations, and trigger notifications when they become relevant.

What is MuninnDB?

Traditional databases are passive: you query them, they respond. They store data without any concept of time, relevance, or learning. Every record sits in your database with equal weight whether it was created yesterday or three years ago.

MuninnDB is different at the storage engine level. It implements three cognitive primitives that make memory behavior emerge from the database itself:

  • Recency — MuninnDB computes a priority score at query time based on how recently and how often a memory was accessed. Nothing is ever deleted — fresh, frequently-recalled memories surface first; old, unused ones score lower but remain available.
  • Hebbian Learning — When two engrams are retrieved together repeatedly, their association strengthens automatically. "Neurons that fire together, wire together" — implemented as database math.
  • Semantic Triggers — Subscribe to a context string. MuninnDB pushes a notification when a matching memory becomes relevant. No polling required.

These aren't application-layer features. They're built into how the storage engine reads and writes data. Every ACTIVATE query is both a retrieval and a learning event.

Key Concepts

  • Engram — The fundamental unit of storage. A concept, content, confidence score, relevance score, and weighted associations to other engrams.
  • ACTIVATE — The primary query type. Provide a context string, get back the N most cognitively relevant engrams.
  • Vault — A namespace for engrams. Each AI agent or user typically gets their own vault.
  • Confidence — A Bayesian posterior (0.0–1.0) tracking how reliable an engram is. Updated by reinforcements and contradictions.
  • Relevance — A confidence gate (0.0–1.0). Temporal priority is computed at query time from AccessCount and LastAccess — not a stored decay score.

Protocols

MuninnDB exposes four interfaces:

  • MBP (Muninn Binary Protocol) — TCP on port 8474. Fastest, lowest latency. Use for production agents.
  • REST — Port 8475. HTTP/JSON. Easy integration, good for testing.
  • gRPC — Port 8477. Standard Protobuf interface. Good for polyglot teams.
  • MCP — Port 8750. Model Context Protocol for Claude, Cursor, Windsurf, and VS Code.

License

MuninnDB is licensed under BSL 1.1. It's free for individuals, hobbyists, researchers, open-source projects, small organizations (<50 employees and <$5M revenue), and all internal use. Commercial hosted/SaaS offerings require a separate license. The code becomes Apache 2.0 on February 26, 2030. Source: github.com/scrypster/muninndb. No cloud account required. Run it anywhere.

← Previous Next →