MuninnDB

Plugins

MuninnDB's core engine has zero external dependencies and works without embeddings or LLMs. Plugins are optional layers that extend capability without breaking the core.

Plugin Architecture

Plugins use a 3-tier model:

  • Tier 1 — Write hooks: Called when an engram is stored. Used to generate embeddings or enrichment.
  • Tier 2 — Query hooks: Called during ACTIVATE. Used to inject vector candidates into Phase 2 of the retrieval pipeline (vector similarity scoring).
  • Tier 3 — Background: Retroactive enrichment — processes existing engrams asynchronously without blocking reads.

Plugins are additive: enabling them enhances retrieval quality but never breaks existing data or queries.

Embed Plugin

The Embed Plugin adds vector search (HNSW) to MuninnDB. When enabled, new engrams are automatically embedded on write and added to the HNSW index. The ACTIVATE pipeline's Phase 2 (vector candidates) gains an additional scoring source alongside BM25 and Hebbian weights.

Providers supported:

  • Anthropic — Uses Voyage AI embeddings via the Anthropic ecosystem. High quality, privacy-conscious.
  • OpenAI — text-embedding-3-small / text-embedding-3-large. Fast, widely used.
  • Ollama — Local, private, zero cost. Recommended for development.

Storage: Embeddings are quantized 4× (float32 → int8), reducing a 768-dim vector from 3KB to ~768 bytes. The original precision is preserved internally for similarity math.

muninndb.yaml — Enable embed plugin
plugins:
  embed:
    enabled: true
    provider: ollama          # or "anthropic" / "openai"
    model: nomic-embed-text   # Ollama model
    base_url: http://localhost:11434
    retroactive: true         # Embed existing engrams in background

Enrich Plugin

The Enrich Plugin uses an LLM to automatically generate summaries, extract named entities, and create typed relationships between engrams. This makes retrieval richer without requiring you to structure your content manually.

What it generates:

  • Concise summary (improves BM25 indexing)
  • Named entity extraction (people, places, dates)
  • Typed relationships to other engrams (SUPERSEDES, CONTRADICTS, RELATES_TO)
  • Suggested additional tags

Providers supported:

  • Anthropic — claude-haiku-4-5 / claude-sonnet-4-6. Excellent reasoning, strong at relationship extraction.
  • OpenAI — gpt-4o-mini / gpt-4o. Fast, widely used.
  • Ollama — Any local model. Private, zero cost, no internet required.
muninndb.yaml — Enable enrich plugin
plugins:
  enrich:
    enabled: true
    provider: anthropic          # or "openai" / "ollama"
    model: claude-haiku-4-5      # Fast + cost-effective for enrichment
    api_key: ${ANTHROPIC_API_KEY}
    retroactive: true

OpenAI example

provider: openai
model: gpt-4o-mini
api_key: ${OPENAI_API_KEY}
← Previous Next →