Trust-anchor consensus
Stable in docs/STATUS.md. Mnemosyne is alpha, on the 3.6.x line, and the
API can still change within 3.x.
When two memories disagree, something has to say which one stands. Mnemosyne uses a fixed rule based on where each memory came from. No model judges the winner.
Trust scores
Every fact has an attribution. A fact written locally has one of four
values, and each maps to a trust score
(packages/core/src/conflict/decide.ts):
| Attribution | Trust | Meaning |
|---|---|---|
objective_fact | 100 | Recorded as an objective fact |
user_stated | 90 | The user said it |
user_belief | 60 | The user believes it |
inferred | 40 | Derived by the agent or by a rule |
| anything else | 20 | Unknown, or received from another server |
The federation package keeps a longer ladder for attributions that arrive from
other servers (packages/federation/src/trust.ts): codebase_verified 100,
user_stated 90, user_confirmed 85, api_response 80, document_extracted
70, agent_observed 60, agent_inferred 40, llm_generated 30 and
federation_received 20.
The rule
Four steps, in order. The first one that separates the two memories decides.
| Step | Compares | Confidence of the verdict |
|---|---|---|
| 1 | Trust score: higher wins | 0.9 |
| 2 | validFrom: more recent wins | 0.7 |
| 3 | Worth, when the gap is above 0.2: higher wins | 0.6 |
| 4 | Nothing separates them | 0, undecided |
Only a verdict with a confidence above 0.7 counts as decisive. In practice that is step 1 alone: a difference in trust. Recency and worth produce a verdict that still goes to review.
On a local write
Finding a contradiction is not rule-based. When a fact is written, similar facts are found by embedding, and an LLM classifies each pair as duplicate, contradiction or compatible. Without an LLM this classification is deferred.
For each contradiction the rule runs and returns supersede, reject or
review. The verdict is a recommendation. Nothing is archived
automatically: the pair is stored as a conflicts_with relation with the
verdict attached, and the response to POST /remember lists it:
{
"conflict": {
"judgmentRequired": true,
"candidates": [
{
"id": "...",
"subject": "fleet",
"statement": "The Larkspur Robotics warehouse fleet runs firmware 4.1.",
"action": "supersede",
"relationId": "..."
}
]
}
}You or the agent resolve it:
# Unresolved pairs
curl "http://localhost:3939/conflicts?limit=5" \
-H "Authorization: Bearer mns_live_..."
# Resolve one
curl -X POST http://localhost:3939/conflicts/RELATION_ID/resolve \
-H "Authorization: Bearer mns_live_..." \
-H "Content-Type: application/json" \
-d '{"action": "supersede_b"}'action | Effect |
|---|---|
supersede_a | Forgets fact A and turns the relation into supersedes |
supersede_b | Forgets fact B and turns the relation into supersedes |
keep_both | Marks the pair as not in conflict |
merge | Forgets both and creates a new fact from mergedStatement |
In a pair, fact A is the newly written fact and fact B the one already stored.
From MCP, memory_judge takes action (list or resolve), relationId,
resolution (the four values above) and mergedStatement.
Between servers
During a federation sync with no explicit
strategy, the same four steps decide between the local version and the
incoming one, and a decisive verdict is applied. An incoming memory always
counts as federation_received, trust 20, whatever the peer claims.
When the same memory has versions from several peers, a weighted vote settles
it (packages/federation/src/federatedConsensus.ts). Each vote weighs trust
score × worth × freshness × the local trust weight of the peer, where freshness
decays over 30 days. A version wins with more than 66% of the total weight.
Otherwise the result is contested and goes to human review.