Skip to content

Memthena v0.12.0

Choose a tag to compare

@w00ch3a w00ch3a released this 26 Oct 05:03
· 26 commits to main since this release

Memthena v0.12.0 (formerly LLM-Brain)

Released 2026-10-26.

One intelligence. Infinite possibilities.

LLM-Brain is now called Memthena. It is the same project and the same brain.
This release is much faster on large and network-shared vaults, bundles a small
embedding model, adds an opt-in review model, and brings nine new memory
features. No vault migration is needed: storage schema 3 and canonical OKF v0.2
are unchanged, and every new field is optional.

New name, nothing renamed on disk

  • memthena is a new command for the same CLI. llm-brain keeps working.
  • Every LLM_BRAIN_* setting can also be written as MEMTHENA_*. When both
    are set, MEMTHENA_* wins.
  • Unchanged: the llm-brain command, plugin ids, the Hermes provider id,
    release file names, the repository URL and the vault layout.
  • Error and warning lines now start with memthena: instead of llm-brain:.
    Exit codes are unchanged.

Faster, especially on a shared network drive

Synthetic 5,000-record vault, v0.11.0 vs v0.12.0 (warm):

Command Local disk, 0.11.0 Local disk, 0.12.0 Network drive (SMB), 0.11.0 Network drive (SMB), 0.12.0
index build 207.9 s 1.50 s over 1,500 s 5.70 s
brief 20.2 s 1.38 s 290.1 s 1.80 s
search 2.98 s 1.49 s 193.7 s about 2.8 s (3–7 s after an idle gap)
lint 35.5 s 0.43 s 149.8 s 0.73 s
doctor 306.5 s 0.61 s 667.1 s 1.07 s

Search output is identical to v0.11.0. Where the time went:

  • Index builds are batched.
  • Each machine keeps a local, stat-checked cache of record bytes outside the
    vault. It survives upgrades. MEMTHENA_CACHE=0 turns it off.
  • On macOS, search checks a whole folder with one bulk listing instead of one
    network round trip per file. Each record is still judged by its own size and
    timestamps, so hand edits are seen by the next search. MEMTHENA_BULK_STAT=0
    turns it off.
  • Locks record which machine holds them. A lock from another machine is only
    taken over after it has gone 5 minutes without a heartbeat, and a live one
    refreshes itself every 75 seconds.
  • The session-start hook shows the last good brief, marked as cached, if the
    live brief is slow.
  • An optional trust window, MEMTHENA_NAS_TRUST_SECONDS, is off by default.
    Any write made through Memthena ends it at once.

Models: both optional, both fail open

  • Embedder (bundled). lbembed-v2-int4 is a 4 MB pure-Python embedder.
    Set MEMTHENA_EMBED=1 to use it for hybrid search. Lexical search stays the
    default.
  • System One (opt-in). Set MEMTHENA_S1=1. It can only make a review
    outcome more cautious (AUTO to WAIT). It never promotes anything, and
    protected items never reach it. The base package includes a small linear
    model that only checks for duplicates.
  • System One 32m (optional download). A larger model that adds keep and
    relevance decisions, shipped as a separate release asset
    (llm-brain-0.12.0-system-one-32m.tar.gz, with a .sha256). Install it on
    each machine that wants it with memthena models install system-one-32m.
    It needs onnxruntime and tokenizers. If the model or its runtime is
    missing, System One falls back to the linear model. Check it with
    memthena models status, and remove it with
    memthena models remove system-one-32m.

OKF backfill (optional)

migrate okf-backfill adds the OKF v0.2 description: line to records that
lack one, and writes a generated index.md in each folder.

  • --check (the default) is read-only and prints counts.
  • --apply only adds text. It records an audit row and a manifest.
  • --undo ID restores the files byte for byte.
  • Restricted, secret and owner-only records never get a description, and
    search ranking ignores the field.
  • After a backfill, newly promoted records get a one-line description from
    their first sentence.

Nine new memory features

  1. Safer recall. Lines in recalled text that look like a speaker label
    are escaped in packs, so recalled memory can't pose as a new message
    (brain_role_labels_escaped).
  2. Recall after compaction (Hermes). The Hermes plugin re-injects a
    size-capped pack after a context compaction (post_compaction_reinject, on
    by default; post_compaction_budget_tokens, default 625). Older Hermes
    builds are unaffected.
  3. Retraction that finishes. A full retract also purges derived
    stores, and retract --finish re-checks one that didn't complete. retract --source drops one source and
    keeps the claim if another independent source still backs it.
  4. Index freshness in packs. Packs say how current the index is, for
    example "index as of audit seq N; M captures not yet indexed".
    LLM_BRAIN_PACK_FRESHNESS=0 turns the line off.
  5. Scoped preferences. An optional brain_applies_when (project, host or
    task) limits where a preference or constraint shows up. Scope fails open:
    a record is hidden only when the caller's host, task or project is known
    and different. A caller that doesn't say who it is, including the MCP
    server with no LLM_BRAIN_HOST, sees all memory.
  6. Raw-history baseline. eval run --strategies raw-bm25,raw-embed ranks
    the raw history with no memory pipeline, so reports show whether memory
    beats it.
  7. Doctor checks the audit log. doctor replays the audit log against
    records and the index without changing anything (--no-audit-replay to skip).
  8. Re-check before risky actions. pack build --action-risk high marks
    stale or single-source premises "re-verify before acting". Low, medium and
    unset packs are unchanged. The MCP brain_pack_build tool takes the same
    option.
  9. Personal eval kit. scripts/personal-eval.py scores a copy of a brain
    on the corrections and decisions it holds. It writes hashes and scores only
    and never writes to the source brain.

Upgrade notes

  • Upgrade every machine that shares a vault together. The writer format
    level is unchanged from 0.11, so 0.11 and 0.12 can share a vault. 0.10.x
    builds still refuse to write to a vault that 0.11 or later has written.
    0.9.x builds are not blocked by writer.format, so keep them off shared
    vaults.
  • Before an OKF backfill, run memthena migrate okf-backfill --check and
    read the counts. Upgrade every machine first: older builds index the new
    description: field, which shifts their search ranking. Keep the run id that
    --apply prints, so you can --undo it.
  • Restart Codex, Claude Code, Gemini CLI and Hermes after upgrading.
  • Nothing is renamed, so existing settings, scripts and plugin configuration
    keep working.

No vault migration.