Three meaningful additions bundled in one release. Server app version bumps from 0.7.0 to 0.8.0; package version 2.11.3 → 2.12.0.
Phase 3 — Structured Facts Table + Three-State Confidence
The gap this closes: Mnemo today treats every memory as text+tags retrieved by FTS5 or vector similarity. That's the right tool for fuzzy recall over prose. It's the wrong tool for key-value lookups ("what is X's location?") that should update in place rather than accumulate as parallel memory chunks.
What ships:
- New SQLite store at
~/.agentb/facts.sqlite(shared global, WAL mode, schema auto-creates on connect) factstable — composite PK(entity, attribute), one current value per pairfact_historytable — append-only audit log of every change- Three-state confidence (
verified > high_probability > false) with promotion ladder enforcement - Six new HTTP routes (
/facts/{e}/{a},/facts?filters,POST /facts,POST /facts/demote,/facts/history,/facts/contradictions) - Four new MCP bridge tools (
mnemo_fact_get/mnemo_fact_query/mnemo_fact_save/mnemo_fact_demote) - Evidence source prefix convention (
memory:<id>,commit:<sha>,statement:<who>, etc.) - 23 unit tests covering the full promotion-ladder semantics
Dreamer Stage 0.5 — automated fact extraction: nightly Dreamer cron calls the LLM with a strict conservative-only-direct-statements prompt to extract (entity, attribute, value) triples from new memories and POST them to /facts with confidence='high_probability'. Auto-capture entries are filtered before extraction (they're tool-call logs, not stated facts).
Contradiction notification: when extraction conflicts with an existing verified fact, the spec's promotion ladder correctly rejects the overwrite — but silent rejection means contradictions pile up. v2.12.0 batches all per-run conflicts and posts at end of Dreamer run to two optional channels:
- Bus message via HTTP (requires
MNEMO_DREAM_BUS_URL+MNEMO_DREAM_BUS_FROM+MNEMO_DREAM_BUS_TARGETSenv vars) - Discord webhook (
MNEMO_DREAM_DISCORD_WEBHOOKenv var)
Both opt-in, both gracefully skip when unset. One batched message per cron run, never per-contradiction.
Stage 0.5 adds ~1 LLM call per agent per night, doubling per-night dream cost from $0.0013 to $0.003.
Embedding hosted fallback (Google Matryoshka)
GoogleEmbedding.embed() now honors extra.output_dimensionality, enabling a fully working hosted fallback for the local Ollama embedding primary. Google's gemini-embedding-001 outputs 3072 dims natively; Matryoshka truncation coerces to the locked sqlite-vec store width (768) without dim-guard trips. See agentb.yaml.example for the config shape. Closes the "if Ollama dies, every Mnemo recall 500s" gap.
Dreamer pipeline rehab
mnemo-dream.py had been silently dark for a week due to three cascading failures (token explosion, env file gap during v2.10.0 cutover, path mismatch). v2.12.0 fixes all three:
- Path migration: harvest walks
~/.agentb/agents/<agent>/memory/(current layout). Agent auto-discovery enumerates the directory at runtime;MNEMO_DREAM_AGENTSenv var pins a specific list when needed. - Two-stage map-reduce synthesis: per-agent partial summaries first, then joint cross-agent rollup. Per-call token usage bounded; 1M context limit never approached.
Upgrade notes
pip install --upgrade mnemo-cortexand restart the server. Schema auto-creates; no migration step.- New env vars (all optional):
MNEMO_DREAM_BUS_URL/MNEMO_DREAM_BUS_FROM/MNEMO_DREAM_BUS_TARGETS— contradiction-to-bus notificationMNEMO_DREAM_DISCORD_WEBHOOK— contradiction-to-Discord notificationDREAM_SKIP_FACTS— set to1to disable Stage 0.5 (debug)
- See
agentb.yaml.examplefor the full v0.8.0 config shape including the new embedding fallback pattern. - See
CHANGELOG.mdv2.12.0 section for full detail.