A Datalog engine for LLM agent memory: stratified rules, provenance-tracked facts, incremental derivation, and an MCP server that lets your harness use it as a shared brain.
A Datalog engine for LLM agent memory. This repo contains the engine (Rust crate, MCP server, REPL, agent skill) plus the design document (datalog-context-engine-design.md, with an honest status log of what shipped).
The thesis: an agent's memory should be a deductive database — the agent builds a verifiable model of what it knows and mechanically reasons over how that knowledge changes, rather than "remembering better" than a vector store. Base facts are asserted at the ingestion boundary (LLM extraction); rules derive closures, temporal projections, contradiction candidates, and relevance diffusion; every fact carries provenance back to its source episodes; and each conversation turn updates derived views incrementally instead of re-deriving them (or worse, re-reasoning them in-context).
Design element Status ------ Runtime-parsed, stratified Datalog (interpreter, not proc-macro) ✅ Negation-as-absence with negative-cycle rejection ✅ Seminaive fixpoint with per-epoch delta maintenance ✅ Bi-temporal facts via validfrom/validto/assertedat columns + now() ✅ Semiring annotations: confidence (product t-norm) × provenance (set union) ✅ Annotation merge on re-derivation (max conf, union prov, deduped supports) ✅ why() proof trees with cycle protection ✅ Additive arithmetic in comparisons (D = Dm + 1) with linear solving ✅ Scoped negative deltas: retraction recomputes only transitive dependents ✅ ask() — read-only datalog query surface for agents ✅ Magic-sets demand evaluation (askdeep): point queries without full fixpoint ✅ Per-position secondary indexes; row-id lookups; WAM-st
From the project README.
Add the radar badge to your README — it shows your project was picked up by MCP Radar and links to this page:
[](https://mcp.liqiwa.com/s/JordyZomer--lemmalog.html)
Self-hosted shared memory for AI agents: vaults of people, facts and decisions your agents recall over MCP or REST, with semantic, keyword and graph search.
amkkoussay/MersadMIRSAD (مِرصاد) — a shared, living memory hub for AI agents: bi-temporal facts, first-class decisions, owner-resolved conflicts, and a live graph view. Local-first
Codrihub/memoraSecond brain for your AI: a self-hosted memory vault your AI agents read and write over MCP. Install with npm, Docker or one command.
itsmemac/AgentCairnShared, persistent project memory for AI coding agents. An MCP server and dashboard backed by Neo4j, so any agent on any machine starts from a briefing instead of re-reading your repo.
rwnalds/engramSelf-hosted MCP server + dashboard giving Claude Code, Cursor & Hermes agents shared long-term memory over a git-backed markdown vault. Agent-native, Obsidian-compatible second brain — markdown RAG, n
xiazhuo123456789/mind-sea-memory记忆星海 Mind Sea — 给任何 AI 机器人的跨会话长期记忆层(零依赖 Node · 3D 记忆星海可视化 · MCP 一键接入 DSH · 防自污染/纠错降权/永久规则/到期提醒)
The top new MCP servers of the week, every Monday. No spam, unsubscribe anytime.