Recall
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Recall
Contradiction-aware long-term memory for AI agents — on Relate.
Agents forget everything between sessions, and when they do remember, they remember confidently wrong. Recall gives an agent a memory that survives sessions, quotes the evidence behind every answer, notices when new information contradicts old, and can explain both what was true on a past date and what the agent believed on that date. All of it lives in one Relate graph — one file, no server, no signup.
Built for the Relate by Neo4j Hackathon. An agent's memory is a graph problem: facts are connected to the entities they describe, the episodes that prove them, and the facts they replace or contradict. Relate is an embedded graph database, so the memory travels inside the agent's application.
The problem
Three things go wrong with naive agent memory:
Stale facts. "Grace reviews releases" becomes false when Ada takes over — but the old fact lingers and the agent keeps acting on it.
Silent contradictions. Two teammates say two different things; a flat key-value memory stores both and answers with whichever is louder.
No evidence. A memory says "Priya lives in Berlin" with no way to ask why do you know that?
Recall treats memory as a graph of entities, episodes (evidence), and bi-temporal facts — and adds contradiction detection on top.
Related MCP server: memorygraph
What Recall does
Capability | What it means |
Provenance | Every fact points |
Supersession | A newer fact in the same slot closes the old one ( |
Contradiction detection | When a new fact shares entities with current facts but asserts a different claim in the same frame ("Priya lives in Paris" vs "…Berlin"), Recall writes a |
Resolution |
|
Hybrid recall | Vector search + full-text search fused by reciprocal rank inside one Cypher statement, then re-ranked by similarity, recency decay, reinforcement (access count) and importance. |
Bi-temporal timelines | Facts carry valid time and record time. |
Memory hygiene |
|
MCP server | Ten semantic tools ( |
Graph explorer |
|
How it uses Relate
Mode: single
.rlfile for a live memory (./memory.rl) — the memory is one portable artifact you can copy, back up withrelate clone, or hand to another agent. The demo store indata/is a directory store with the JSON codec so judges can read the graph as plain JSON (graph.json).Why this mode: an agent memory must survive restarts and travel with the agent. A single file (or a readable directory) does that with zero infrastructure. Relate runs in-process via the
relate-dbPython package — no server to deploy, which is exactly what a memory wants.What the graph models:
(:Entity)what memory is about,(:Episode)where it was learned,(:Fact)one bi-temporal statement with its embedding — wired together with[:ABOUT],[:FROM],[:MENTIONS],[:SUPERSEDES]and Recall's own[:CONTRADICTS]. The full model:src/recall/schema.py.
Relate features exercised
Cypher 25 for every read and write, with parameters (
$name) everywhere values appear — nothing interpolated into statements.Vector index +
SEARCHwithWITH [f.closedAt]pre-filtering, so closed facts are dropped inside the index beforeLIMITcounts to k.Full-text index +
SEARCH(BM25) over fact text.Hybrid search: vector and full-text fused by reciprocal rank in a
CALL () { … UNION ALL … }subquery — one statement, one round trip.vector(embedding, 256, FLOAT32)typed vectors that fail loudly on dimension mismatches.Constraints (
UNIQUEon entity key, episode id, fact id) and range indexes on slot, status and recorded time.Transactions (
autocommit=False) so a multi-statement write (episode + fact + supersessions + contradiction edges) is atomic.Read-only opens for recall-only consumers; persistent stores as a single file or a JSON-codec directory.
One writing open at a time respected via a dedicated store thread (the
relate-dbclient is thread-affine; MCP hosts call from worker threads).
Setup and run
Prerequisites: Python 3.10+, and (optional) the relate CLI
to inspect the store yourself.
git clone <this repo> && cd recall
python -m venv .venv && source .venv/bin/activate
pip install -e ".[mcp]"First result in 30 seconds — the scripted walkthrough:
recall demoUse it from the command line:
recall --db ./memory.rl remember "Ada reviews each relate release." \
--about Ada --about relate --slot relate/release-reviewer \
--kind tool_call --evidence "read_file CODEOWNERS: release/ @ada"
recall --db ./memory.rl recall "Who reviews relate releases?"
recall --db ./memory.rl why <fact-id>
recall --db ./memory.rl contradictions
recall --db ./memory.rl resolve <keep-id> <drop-id> --note "HR confirmed the move"
recall --db ./memory.rl timeline --slot relate/release-reviewer --on 2026-03-15
recall --db ./memory.rl stats
recall --db ./memory.rl explore --open # draw the memory graphGive an agent the memory — the MCP server, e.g. for Claude Code /
OpenCode / Cursor (mcp.json):
{
"mcpServers": {
"recall": {
"command": "recall",
"args": ["serve", "--db", "/path/to/memory.rl"]
}
}
}The agent gets ten tools: remember, remember_many, recall, why,
contradictions, resolve_contradiction, forget, timeline, stats,
graph.
Use it as a library:
from recall import Memory
mem = Memory("./memory.rl")
report = mem.remember(
"Priya lives in Berlin.",
slot="priya/relocation",
about=["Priya"],
evidence="Dan said Priya relocated last month.",
)
print(report["conflicts"]) # any contradicting facts, with scores
for hit in mem.recall("Where does Priya live?"):
print(hit["score"], hit["text"], hit["disputed"], hit["evidence"])Where the data lives
Path | What it is |
The committed demo store (directory, JSON codec) — the story the demo tells. | |
| The default live store, created on first write (single file). Not committed. |
Inspect the demo store with the Relate CLI (read-only):
relate --database ./data/demo-memory --read-only \
"MATCH (f:Fact)-[:FROM]->(ep:Episode) RETURN f.text AS fact, f.status AS status, ep.kind AS learnedFrom"rows[5]{fact,status,learnedFrom}:
Grace reviews each relate release.,superseded,message
Noor triages new relate issues on Mondays.,current,message
Ada reviews each relate release.,current,tool_call
Priya lives in Paris.,retracted,message
Priya lives in Berlin.,current,messageEvery state in that output is a story: superseded = a correction replaced it (and it is still here), retracted = a contradiction was settled against it (and it is still here), current = the agent can quote it — with its evidence.
The demo story
recall demo walks the canonical scenario (also what data/demo-memory
holds and what the demo video shows):
A session teaches the agent two facts.
A tool call corrects one — the old fact is superseded, not deleted.
Two teammates disagree — Recall flags a contradiction (score 0.50) and marks every affected answer
disputed.Recall answers questions with evidence and dispute flags.
A decision settles the conflict: one fact kept, one retracted, the reasoning recorded as an episode.
whyexplains the correction chain.timeline --on 2026-03-15shows what was true vs what was believed that day — the audit trail for "why did the agent ask Grace?".
Development
pip install -e ".[dev]"
pytest # 34 tests: unit, engine end-to-end, and MCP over stdiosrc/recall/
embed.py deterministic offline embeddings (pluggable: bring your own)
tokens.py claim/frame analysis — the contradiction heuristics
schema.py the graph schema on Relate
store.py thread-safe relate wrapper (one owner thread, one writer)
memory.py the engine: remember / recall / why / timeline / resolve
mcp_server.py the MCP server (10 tools)
explorer.py self-contained HTML graph explorer
demo.py the scripted walkthrough (and the video script)
cli.py the `recall` commandPlugging in a real embedding model. The default embedder is deterministic
feature hashing — offline, reproducible, and enough for the claim analysis
and demo. For production recall quality, pass any embedder with
dimensions and embed(text) -> list[float]:
mem = Memory("./memory.rl", embedder=MyModelEmbedder())The dimension count is fixed when a store is created and enforced afterwards.
Notes and limits
Contradiction detection is deterministic and lexical: same frame, different claim (or a negation flip). It is a strong signal for flagging — the final call is the agent's, via
resolve_contradiction.One process may write a store at a time (a Relate guarantee). Recall's MCP server owns its store; add
--read-onlyfor recall-only hosts.Slots group facts that answer the same question; give them explicitly for clean supersession. Without one, Recall derives a slot from the entity and claim words.
Credits
Relate by Neo4j — the embedded graph database that makes this possible. The data model follows Relate's agent-memory guide.
Built with AI assistance (agentic coding), as disclosed on Devpost.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Memory for AI agents that stays correct as facts change.
Long-term memory for AI agents: bitemporal fact ledger, contradiction detection, explainability.
Persistent memory for AI agents, for code, research and everyday life. Stale facts retire.
Long-term memory for AI agents: learns what is true about each person and answers with sources.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceGives AI agents persistent memory with bi-temporal tracking, automatically extracting entities from natural language and enabling time-travel queries to understand facts as they existed at any point in history.2-
- AlicenseAqualityDmaintenanceEnables AI agents to record, recall, correct, and forget evidence-backed factual claims with temporal history, while explaining whether remembered information is current, historical, or contested.5Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to store and retrieve typed facts with bi-temporal validity, supersede outdated information, and query what was true as of any past date.MIT
- AlicenseNot gradedqualityBmaintenanceProvides AI agents a shared long-term memory layer with evidence-backed, auditable claims, enabling persistent, explainable, and conflict-aware recall across sessions.18 PyPI8MIT