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.
# Ollama (local, no key required)
MUNINN_OLLAMA_URL=ollama://localhost:11434/nomic-embed-text muninn start
# OpenAI
MUNINN_OPENAI_KEY=sk-... muninn start
# Voyage AI
MUNINN_VOYAGE_KEY=pa-... muninn start 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.
# Anthropic (recommended)
MUNINN_ENRICH_URL=anthropic://claude-haiku-4-5-20251001
MUNINN_ANTHROPIC_KEY=sk-ant-... muninn start
# OpenAI
MUNINN_ENRICH_URL=openai://gpt-4o-mini
MUNINN_ENRICH_API_KEY=sk-... muninn start
# Ollama (local, no key)
MUNINN_ENRICH_URL=ollama://localhost:11434/llama3.2 muninn start
# Enrichment runs asynchronously and does not block memory writes. OpenAI example
provider: openai
model: gpt-4o-mini
api_key: ${OPENAI_API_KEY}