Open-source — pip install mnemebrain

Memory architecture may matter
more than model size.

A 7B model with the right memory architecture can outperform a 70B baseline on multi-hop QA.
Mnemebrain is the infrastructure that makes that possible.

AI memory that turns experiences into beliefs — with full provenance.

Long-running agents accumulate thousands of episodes. Without consolidation, memory grows forever and retrieval becomes noisy. Mnemebrain compresses experience into beliefs — without losing evidence. Not a better vector store. A new memory primitive.

Memory lifecycle
episode stored
cluster formed + coherence checked
semantic belief extracted — provenance preserved
conflict detected → rehydrate → reconsolidate
Live consolidation
ep 1User ordered vegetarian pasta at dinner
ep 2User asked for vegan curry, skipped meat option
ep 3User requested meat-free options at restaurant
consolidation daemon
"user prefers vegetarian meals"
confidence:0.86
extraction:predicate_structure
consolidated_from:[ep_1, ep_2, ep_3]
→ explain() returns the three source episodes
The full loop
brain.believe("User ordered vegetarian pasta")
brain.believe("User asked for vegan curry")
brain.believe("User requested meat-free options")
# Consolidation runs automatically
brain.ask("What food does the user prefer?")
 
belief:      "user prefers vegetarian meals"
confidence:  0.86
derived_from: [ep_1, ep_2, ep_3]
Without vs. with Mnemebrain

The same conversation.
A fundamentally different result.

Without Mnemebrain
Do I like Italian food?
Yes, you like Italian food.
I told you last week I stopped eating carbs.
I apologize for the confusion. I've updated that.
Why did you think that in the first place?
I don't have enough context to answer that.
With Mnemebrain
Do I like Italian food?
belief: "user likes Italian food"
confidence: 0.82
evidence: conv_12, conv_17
I stopped eating carbs last week.
// revise() triggered
belief: "Italian (excl. low-carb)"
confidence: 0.82 → 0.61
new_evidence: conv_21
Why did you think that originally?
// explain() output
supported_by: conv_12 // "love this pasta place"
attacked_by: conv_21 // "stopped eating carbs"
truth_state: JUSTIFIED → BOTH
The difference: one agent forgets and contradicts itself. The other tracks beliefs as structured claims with evidence, revises confidence when new information conflicts, and explains its reasoning through structural traces — not generated prose.
The problem

Every memory system
forces a bad tradeoff.

Vector stores / RAG
Keep every episode forever → noisy retrieval, stale context, unbounded growth
LLM summarization
Summarize aggressively → provenance lost, contradictions flattened, nothing auditable
Fine-tuning
Bake knowledge into weights → slow, expensive, opaque, no revision path

The right abstraction is neither. It is belief consolidation: compress repeated episodes into durable beliefs while keeping the evidence trail intact. Memory that compresses. Provenance preserved.

The core primitive

From episodes
to beliefs.

Three vegetarian food interactions. What other systems do with them — and what Mnemebrain does.

Other systems
t=0dUser ordered vegetarian pasta at dinner
t=3dUser asked for vegan curry, skipped meat
t=7dUser requested meat-free options at restaurant
What happens next
Keep all 3 forever → retrieval noisier every week
Summarize to "user likes food" → provenance gone
Overwrite old episodes → history disappears silently
No path to an auditable, revisable belief.
Mnemebrain
ep_1User ordered vegetarian pasta at dinner
ep_2User asked for vegan curry, skipped meat
ep_3User requested meat-free options at restaurant
consolidation daemon
"user prefers vegetarian meals"
confidence:0.86
tier:semantic
extraction_method:predicate_structure
consolidated_from:[ep_1, ep_2, ep_3]
→ explain() · returns source episodes + extraction method

Source episodes are soft-archived, never hard-deleted. If a conflict arises later, they are rehydrated for a fresh consolidation cycle.

How explain() works

Not a generated summary.
A structural trace.

Most systems fake explainability by generating text. Mnemebrain explanations are structural — graph traversals, not prose.

Calling explain() on a semantic belief walks back through the belief graph: the claim, its extraction method, the confidence formula, and the exact source episodes that were consolidated to produce it.

When new evidence conflicts with the semantic belief, the system does not simply retract it. Source episodes are rehydrated, the new evidence is added, and the consolidation cycle runs again. Epistemic lineage is never lost.

The audit trail is the architecture — not something bolted on top of it.
# Explain a semantic belief
brain.explain(semantic_id)
 
claim:            "user prefers vegetarian meals"
tier:             semantic
confidence:       0.86
extraction_method: predicate_structure
consolidated_from:
  ep_1  // "ordered vegetarian pasta"
  ep_2  // "asked for vegan curry"
  ep_3  // "requested meat-free options"
# New evidence arrives later:
brain.believe("user ordered steak last night")
 
# Semantic conflict triggered:
action:     rehydrate_and_re_extract
rehydrated: [ep_1, ep_2, ep_3]
status:     reconsolidating...
Architecture

Grounded in neuroscience,
built for production.

01 — Belief Graph

Structured claims

→ Agent always knows why it believes something

Each claim is a node in a directed justification DAG with evidence, confidence, TruthState, and provenance. Not a plain fact — a belief with causal history and a revision path.

Biological: Associative cortex
03 — HippoRAG Retrieval

Multi-hop graph search

→ Contextually relevant, not just lexically similar

Local PageRank over a bounded subgraph — spreading activation through justification chains, not cosine ranking across the full embedding space. Auto-selects between vector and graph mode based on KG coverage.

Biological: Dentate gyrus indexing

Full architecture spec: belief revision (AGM), reconsolidation scheduler, GoalNodes, PolicyNodes, pattern separation, multi-agent CRDT replication. Read the full spec →

Belief Memory Benchmark (BMB)

Belief memory lets small models
behave like larger ones.

On knowledge tasks that require memory across sessions, a 7B model with Mnemebrain outperforms a 70B baseline. Architecture compounds what scale cannot.

System Knowledge tasks Multi-hop QA
7B model (baseline) 41% 33%
7B + RAG 49% 38%
70B model (baseline) 55% 47%
7B + Mnemebrain 63% 58%

Belief Memory Benchmark (BMB) v1 — multi-session knowledge retention tasks. Results reflect belief consolidation enabled with default Phase 5A settings.

A 7B model with Mnemebrain outperforms the 70B baseline on multi-hop QA. Architecture compounds what parameter count cannot.
+25pp
improvement over
70B baseline (multi-hop QA)
+22pp
improvement over
RAG (knowledge tasks)
Quickstart

Three lines to belief memory.

01
Install via pip. Zero compiled dependencies. Works with any LLM backend — OpenAI, Anthropic, local models via Ollama.
02
Call brain.believe() to store episodic beliefs. The consolidation daemon runs in the background, clustering episodes and extracting semantic beliefs automatically.
03
Call brain.ask() to query beliefs. Call brain.explain() to get the full provenance chain. Call brain.revise() when new evidence conflicts.
04
Run brain.consolidate() to force a consolidation pass. Useful in batch pipelines or after ingesting a corpus. Or just let the daemon handle it.
# pip install mnemebrain
from mnemebrain import MnemeBrain
 
brain = MnemeBrain()
 
# Store episodes
brain.believe("User ordered vegetarian pasta")
brain.believe("User asked for vegan curry")
brain.believe("User requested meat-free options")
 
# Consolidation daemon auto-extracts:
# "user prefers vegetarian meals" (conf: 0.86)
# Query
result = brain.ask("What food does the user prefer?")
 
# Explain
trace = brain.explain(result.belief_id)
# trace.consolidated_from = [ep_1, ep_2, ep_3]
# Later: new evidence conflicts
brain.believe("User ordered steak last night")
# → automatic reconsolidation triggered

Compress memory.
Keep the evidence trail.

Open-source Python SDK. No sales call required. Star us on GitHub or pip install to get started.

Star on GitHub pip install mnemebrain