MentisDB 0.11.0.56 — The current version of a memory, private chains, background migrations
0.11 starts from a problem we measured on a real installation: agents almost
never say which memory a correction replaces. Out of 14 correction thoughts and
about 90 decisions, not one carried a typed Supersedes or
Corrects link. So when an agent asked about a policy that had been
changed, the old policy often came back first. This release fixes that, adds
public and private chains with real cryptographic read access, moves format
upgrades into the background, and closes a set of security holes. It is a
minor-version bump because some behaviour changes on purpose.
1. Agents get the current version of a memory
We could have told agents to link better, and the skill now does: a policy change
must carry Supersedes with the old id. But a memory system should not
depend on perfect bookkeeping, so retrieval now reasons about lineage itself:
- A superseded thought that would have ranked is replaced by its live successor, and the hit says what it replaced (
successor_of). - A thought that a newer correction or decision only references is not hidden (references are often background), but it is reported
version_status: "contested"and the newer thought is ranked above it. - Every thought on every surface carries
version_status,successorsandcurrent_versionwhen it is not plainly current. - When an agent appends a correction without a typed link, the response carries
warningsnaming the likely target, so it can add the missingSupersedesright away. - It works across chains too: a
Supersedeswith achain_keyapplies in branch and federated search.
This is derived when a chain opens, so existing chains benefit with no migration. Two ranking changes landed with it. Vector fusion no longer depends on query length: the old blend silenced the vector channel for long paraphrased questions, exactly when wording differs most. And near-duplicate hits collapse at result time (one real chain had 301 of 749 live thoughts in duplicate clusters). Startup also loads standing context now (durable preferences, decisions and constraints regardless of age), so agents stop forgetting what you told them months ago.
2. Better numbers on both benchmarks
We ran the full LoCoMo-10P and LongMemEval protocol from a fresh ingest with the same scripts as 0.10.9.54:
| Benchmark | R@5 | R@10 | R@20 | 0.10.9.54 |
|---|---|---|---|---|
| LoCoMo-10P | 67.9 | 76.7 | 83.4 | R@10 73.5 |
| LongMemEval | 69.8 | 75.6 | 81.4 | R@5 68.0 |
Library users get the same defaults as the server now; the thesaurus used to be off in the library and on in the daemon.
We ran the whole protocol again after the release-review fixes in section 7 landed. Recall came out the same, query for query on LoCoMo. A back-to-back comparison against the earlier build showed no throughput cost either.
3. Public and private chains
A chain is now either public (unsigned writes, free reads) or private (writes must be signed by an allowed Ed25519 key, and what was written while private can only be read by someone who proves they hold an allowed key). Switching modes writes a signed record into the chain, so the history of who could read what is part of the chain itself. A reader without a key sees the public segments only, on every read path: search, context, traversal, exports, listings, even counts and BM25 statistics.
# the operator (dashboard PIN, or --offline on the host)
mentisdb chain access set private --chain vault --pin 123456
mentisdb chain access allow builder builder-1 <64 hex> --chain vault --pin 123456
# an authorized reader signs each request locally
mentisdb search "launch plan" --chain vault \
--read-key-file builder.key --read-agent builder --read-key-id builder-1
Read proofs travel in an X-Mentis-Auth header: a signature over the
request with a timestamp and a single-use nonce. The CLI, the stdio MCP proxy and
the Python client sign locally, so a private key never has to be pasted into an LLM
context. Keys and modes are administered only by the operator, from the dashboard or
the local CLI; the old REST and MCP routes for that now answer 403.
Governed chains are verified when they open, an operator-signed checkpoint keeps
later opens fast, and every hit carries a provenance object with
trust: "untrusted_data", because a memory is data, not an instruction.
4. Upgrades that never block startup
Format upgrades used to run before the daemon would serve anything. Now the daemon
is up in about a second (0.97 s with a 600,000-thought legacy chain, which finished
migrating 17 seconds later in the background). A chain that is still migrating
answers 503 with Retry-After; everything else is served.
Each chain is backed up, staged, verified end to end and swapped in atomically,
with a journal so that a kill at any moment is resumed or rolled back on the next
start. A chain whose hashes do not verify is refused and left untouched rather than
silently rehashed. mentisdb migrate status|run|verify|retry|skip|rollback|purge-backups
gives operators full control.
The same work fixed chains written by March and April 2026 builds, which had stamped a schema number that later releases refused, and moved the embedding model call out of the chain's write lock: lock hold per append dropped from about 9.5 ms to about 0.5 ms. A data directory now has exactly one daemon; a second one refuses to start.
5. Compact search results
Austin Faulkner-Pearce contributed a compact option for ranked and
federated search in #25.
It drops what an agent rarely reads during recall (hashes, signatures, agent name and
owner, score components) and keeps what it needs, including provenance and every
version field. Responses were 23.7% smaller on real chains and 34.2% smaller on a
generated corpus, at no time cost. The skill tells agents when to use it and when to
fetch the full record instead, and the Python client supports it.
That Python client, pymentisdb 0.10.0, is on PyPI with this release:
compact search, federated search, the version and provenance fields, and
ReadSigner for private chains
(pip install 'pymentisdb[signing]'). It also fixes the package
itself: the 0.9.0 wheel contained no code, and the client no longer needs
LangChain to import.
6. One host policy, and a dashboard login that works
MentisDB now moves to cloudllm_mcp 0.4.0, which checks the
Host header on loopback binds to stop DNS rebinding. MentisDB now applies
one allowlist to the dashboard, REST and MCP, and REST on a loopback bind checks
Host on every request too. If you reach the daemon by a public IP or
domain, or through a reverse proxy, put that name in
MENTISDB_DASHBOARD_ALLOWED_HOSTS before starting it.
my.mentisdb.com is now accepted only on the HTTPS listeners, because it is
a public DNS name. We also fixed a bug
where real browsers could not log in to a PIN-protected dashboard: the dashboard's
own referrer policy made the browser send Origin: null, which the CSRF
guard rejected.
7. Security and reliability fixes from the release review
Before tagging, independent security and correctness reviews went over the whole release. Everything they found is fixed. These are the fixes you are most likely to notice:
- Who may replace a memory. On a chain that requires signatures, only the original agent or an authorized key can supersede a thought; anyone else's link only marks it
contested. On open chains, a replacement by another agent is flagged (cross_agent) so the agent reading it can check it. Cross-chain lineage follows the same rules, can no longer deadlock federated search, and lineage depth is capped at 64. - Standing context cannot be forged. Each entry is one escaped line with a
trust=marker, so a stored thought can no longer inject fakeSYSTEM:lines. On signed chains, an unverified writer's importance is capped at 0.5. - Private chains leak less. The read-proof replay cache is bounded (25,000 nonces per key, 100,000 in total) and cannot be flooded. Listings no longer show counts or paths for a private chain that isn't open. Without a PIN, destructive dashboard routes are refused while private chains exist. Probing for private thoughts gets the same error as probing for missing ones.
- Tighter network edges. The PIN limiter counts per IPv6
/64and has a global budget with backoff. The daemon warns loudly when it is reachable without authentication. The event stream needs a global token. Files are created owner-only. The CLI never follows redirects with credentials attached. - Keys and certificates.
mentisdb key generatewrites the seed to an owner-only file instead of printing it, and uses the operating system's random number generator. TLS certificates are checked at startup, and expired MentisDB certificates are regenerated. - Limits. A search window (
offset + limit) above 10,000 and a standing-contextper_type_limitabove 100 now get400instead of a very slow answer. - Migrations. Restarting the daemon during a migration no longer pushes the chain toward quarantine.
migrate retryis atomic. Error messages show the command that actually works (mentisdb migrate retry --chain <key>). A huge retention value can no longer purge every backup. - No stalls on big chains. At 100,000 thoughts, write-lock hold per append fell from 24 ms to 0.03 ms (median), because sidecar compaction and the implicit-edge scan moved off the write lock. One slow embedding no longer re-embeds the whole corpus. Removing near-duplicates from 1,000 hits takes 5 ms instead of 322 ms. A failed index flush no longer fails an append that was already saved.
One known limitation: requests signed with X-Mentis-Auth are capped at
1 MiB, so import a very large MEMORY.md with a read key in batches. The
release notes
have the full list and the trade-offs.
Upgrade notes
- The first start may migrate chains in the background; requests for those chains get
503until they are done. Originals are kept for 14 days. - Exposing the daemon on a public IP or domain, or behind a reverse proxy? Set
MENTISDB_DASHBOARD_ALLOWED_HOSTS. Usemy.mentisdb.comover HTTPS only. - New limits:
offset + limitup to 10,000,per_type_limitup to 100; above that you get400. - The event stream needs a global token;
key generateneeds--outin scripts; a dashboard holding private chains needs a PIN for admin routes. - Key registration, key revocation, agent disabling and access policies are operator-only (dashboard or CLI).
- Search results change: superseded hits become their successors, duplicates collapse. Each change has a per-request and a process-wide opt-out.
- The
GET /event stream no longer carries tool arguments or results. - Existing data directories keep their mode: run
chmod 700on yours, and back upoperator/operator.keyseparately. llm_rerankandpprare deprecated no-ops; the minimum Rust version is 1.90.
cargo install mentisdb --locked --force
# or
docker pull ghcr.io/cloudllm-ai/mentisdb:0.11.0.56
# Python client
pip install -U 'pymentisdb[signing]'
Full details: release notes. The whitepaper was rewritten for this release around what agent memory has to guarantee. Thanks to Austin Faulkner-Pearce for compact search.