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.
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.
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.
Session 14: penicillin reaction mentioned.
Week 8: DynamoDB migration begins.
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 →
the extraction pipeline, or the "why did the field abandon these ideas in the 1980s" question in the comments.