Show HN

Agent memory systems
store the wrong thing.
They store text.

Agents need to store beliefs. This sounds like a minor distinction. It isn't. If your agent records "Alice works at Google" on Monday and "Alice joined OpenAI" on Friday, a text memory stores two chunks. A belief system stores one belief in a contradicted state — explicitly, queryably, with the full evidence trail intact.

March 2026 MnemeBrain Research 48 tasks · 8 categories · 100% on contradiction detection
show hn mnemebrain-lite benchmark
python — belief contradiction in 8 lines
# Monday — first evidence item arrives brain.believe("Alice works at Google") → TruthState: TRUE confidence: 0.82 # Friday — attacking evidence arrives brain.believe("Alice joined OpenAI") → TruthState: BOTH confidence: 0.52 ← contradiction is explicit. no information lost. brain.explain("Alice works at Google") → supporting_count: 1 attacking_count: 1 → truth_state: BOTH → provenance: [msg_001 · Monday] [msg_047 · Friday]

RAG retrieves documents.
Agents need to maintain beliefs.

The dominant paradigm for agent memory is retrieval: store text chunks as embeddings, retrieve by similarity. This works well for static knowledge bases and document search. It breaks down the moment your agent operates over time and the world keeps changing.

The core problem is that retrieval is not memory. A vector store tells you what is relevant. It cannot tell you what is true, or whether two retrieved items are in tension with each other. You can patch around this with graph overlays, timestamp metadata, or post-retrieval LLM reasoning. But once you add conflict edges, provenance tracking, and belief revision, you are no longer relying on retrieval alone. You are building a belief system. The boundary between those two architectures is real.

"The question is not whether you cross the boundary between retrieval and belief. It is whether you cross it deliberately or accidentally."

Real memory systems — including human cognition — need to represent four epistemic states. These are the four values of Belnap's four-valued logic, developed in 1977 for exactly this class of problem.

TRUE
All evidence supports the belief. Agent acts with confidence.
FALSE
All evidence attacks the belief. Agent acts against it.
BOTH
Supporting and attacking evidence coexist. Contradiction is explicit. Agent investigates.
NEITHER
No evidence in either direction. Genuinely unknown — distinct from FALSE.

In classical logic, A ∧ ¬A collapses the system: one contradiction can make every proposition derivable. Belnap's paraconsistent logic avoids this — contradictions are represented explicitly as BOTH, allowing the system to reason without logical explosion. This is not a theoretical concern. When we evaluated common agent memory architectures on contradiction-heavy tasks, retrieval-based systems consistently failed to surface explicit conflict states. The issue was not poor tuning; it was the absence of any mechanism to compute or maintain truth states over time.

Beliefs as the atomic
memory unit

MnemeBrain treats beliefs as the atomic memory unit. Rather than storing documents or messages, it stores structured belief objects, each carrying an EvidenceLedger — a list of evidence items with polarity (SUPPORTS or ATTACKS), weight, source reference, and timestamp. The TruthState is computed as a pure function over the ledger at query time.

Python SDK — mnemebrain
from mnemebrain import Brain

brain = Brain()

# Monday — first evidence item arrives
brain.believe("Alice works at Google")
# → TruthState: TRUE, confidence: 0.82

# Friday — attacking evidence arrives
brain.believe("Alice joined OpenAI")
# → TruthState: BOTH, confidence: 0.52
# The contradiction is explicit. No information was lost.

trace = brain.explain("Alice works at Google")
# → supporting_count: 1, attacking_count: 1
# → truth_state: BOTH
# → full provenance: which messages, which timestamps

When the agent queries this belief, it gets back BOTH and 0.52 confidence — a signal to reason carefully rather than act on stale data. The contradiction is not silently resolved; it is handed to the agent as a first-class fact.

Beyond the core belief layer, the full architecture adds: working memory (a context-scoped cache separate from long-term storage), a copy-on-write sandbox for counterfactual reasoning without polluting canonical state, AGM minimal-change revision so contradictions trigger the smallest possible update rather than an arbitrary overwrite, persistent goal and policy memory across sessions, and a consolidation daemon that compresses episodic records into generalised semantic beliefs using HippoRAG retrieval and pattern separation.

At that point the architecture begins to resemble ACT-R — not by imitation, but by converging on the same cognitive memory distinctions.

MnemeBrain is already being used in long-running coding agents and assistants that operate across weeks of sessions. Typical belief lookup latency is <5ms on a local Kuzu store with ~100k beliefs. The system integrates with LangGraph, OpenClaw, and Claude Code via MCP.

What retrieval gets wrong
in production agents

These are not contrived examples. They are the class of problem that appears in any agent operating over a timeline longer than a single session.

Medical agent
Session 3: no known allergies.
Session 14: penicillin reaction mentioned.
RAG: returns whichever session chunk ranks higher for the query. Contradiction resolved silently by embedding distance.
Belief system: returns BOTH. Flags conflict. Surfaces both evidence items before the agent acts.
Coding agent
Week 2: PostgreSQL chosen.
Week 8: DynamoDB migration begins.
RAG: serves whichever chunk matches "database" better. Agent gives confident advice about a superseded decision.
Belief system: ATTACKS edge created. Confidence drops. Agent surfaces the revision history before recommending.

The issue is not that retrieval is bad at what it does. It is that retrieval was chosen as the memory primitive for agents that need something retrieval cannot represent. A flat text store does not have the representational capacity to encode epistemic state — only content.

These are 1980s ideas that
became viable in 2025

Most of the components here have names in the AI literature. Truth Maintenance Systems (Doyle 1979, de Kleer 1986) stored beliefs with justification graphs in exactly the structure we use. AGM revision theory (Alchourrón, Gärdenfors, Makinson 1985) is the formal foundation for our revision policies. Belnap's four-valued logic is forty-eight years old. The cognitive memory layers map directly onto ACT-R (Anderson 1983).

These ideas were not forgotten because they were wrong. They were sidelined when the field moved toward neural methods, because symbolic belief systems required laborious hand-engineering to extract structured knowledge from raw text. That extraction step was the bottleneck. What LLMs change is that structured belief extraction is now something you can prompt for. That removes the main friction that made these architectures expensive to operate, and it reopens the question of whether they were actually right all along.

MnemeBrain is one answer to that question: a belief-first memory layer that brings TMS + Belnap logic + AGM revision to LLM agents. Not a revolution — a reconnection to ideas that cognitive scientists and AI researchers spent decades validating, now viable because the extraction problem is finally tractable.

This is part of a broader pattern. LLM agent stacks now have a strong neural layer: perception, language, generation. What they still largely lack is a symbolic layer for structured belief state, and a proper memory layer for persistence, revision, and consolidation over time. Architectures like belief memory, knowledge graphs, and world models are reappearing for the same reason: the field solved perception and is now rediscovering that it also needs the other two layers.

BMB: 48 tasks, 8 categories,
zero LLM calls in scoring

The Belief Maintenance Benchmark covers 48 tasks across 8 categories with approximately 100 structural checks, plus a separate task-level evaluation suite (mnemebrain-task-eval) for downstream agent correctness. All evaluation is deterministic, computed against structural assertions about truth states, evidence counts, and confidence values — no LLM judge, no prompt variation.

The benchmark is capability-aware: a system is scored only on tasks it declares support for. A system that only implements store and query scores 0% on sandbox tasks — the correct and expected result. This design separates "missing capability" from "wrong answer."

System Overall Contradiction Revision Evidence Decay Explain Sandbox Consolidation
MnemeBrain (full) 100% ✓ ✓ ✓ ✓ ✓ ✓ ✓
MnemeBrain Lite 93% ✓ ✓ ✓ ✓ ✓ — —
Structured Memory 36% — — ✓ — ✓ — —
Mem0 (real API) 29% — — — — ✓ — —
OpenAI RAG (real API) 0% — — — — — — —
RAG Baseline 0% — — — — — — —
LangChain Buffer 0% — — — — — — —

RAG systems scoring 0% on contradiction detection is not a surprising result — it is the expected result, and that is the point. Most agent frameworks default to retrieval as their memory layer without asking whether retrieval is the right primitive for a job that requires belief state. The benchmark does not score RAG on its own terms; it scores what happens when you deploy RAG for episodic state management over time. The gap between what the architecture can represent and what the task requires is the finding.

The benchmark is open-source and the adapter interface is published so any system — MemGPT, Zep, Graphiti, ChromaDB — can be evaluated and added to the leaderboard. View the live leaderboard →

Honest limitations

Known open problems
01
Belief extraction from raw text — turning "I might switch jobs next year" into a structured belief with appropriate confidence, correct entity references, and calibrated polarity is a separate hard problem. LLMs make this tractable; it is not solved here.
02
Belief identity — recognising that "Alice is at OpenAI," "she joined OpenAI last month," and "Alice left Google" all refer to the same underlying proposition is harder still. Entity resolution and coreference are real open problems.
03
Evidence weight calibration — the benchmark tests the memory engine given well-formed inputs. Calibrating evidence weights from messy, real-world sources requires additional work for production deployments.

The questions we expect
in the comments

01 Is the benchmark fair if you designed it?
The benchmark, scenarios, and adapter interface are all published. Any system can be evaluated. We welcome submissions and independently run evaluations. The adapter interface is a standard ABC with nine methods — implementing it for any memory system takes a few hours. We specifically want systems that beat us to submit.
02 Can't the LLM just handle contradictions itself?
The LLM can reason about contradictions — if both sides of the contradiction fit in the context window simultaneously. Over long agent sessions, they won't. And an LLM reasoning about a contradiction is doing unstructured reasoning against text; it cannot query contradiction state, trace evidence provenance, or produce a deterministic, auditable explanation. The belief layer externalises state that should be external.
03 Why not a knowledge graph?
Knowledge graphs store entities and relations but not evidence, not polarity, not confidence, not temporal decay, not epistemic state. They are excellent for factual web-of-knowledge retrieval. They cannot tell you that two facts are in BOTH-state tension without additional machinery — at which point you have added the belief layer anyway. A belief graph is a knowledge graph plus an evidence ledger plus revision semantics.
04 Can't you just add this to a vector store with metadata?
You can add timestamps and tags. You cannot add truth state computation, ATTACKS edges, Belnap logic, or minimal AGM revision without rebuilding the retrieval layer around a belief model. The metadata approach gets you timestamped chunks; it does not get you an epistemic state machine. The difference is architectural, not a configuration choice.