← all repositories
FuRongJun-1999/dsh-memory

A memory system that refuses to hallucinate, on purpose

LINGSHU is a long-term memory layer for MCP agents where every write, read, and forget is decided by deterministic rules instead of an LLM's mood.

dsh-memory
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

LINGSHU (灵枢) is a persistent-memory infrastructure for AI agents: conversations settle into a plain-Markdown cognitive graph, and any MCP-capable host — DSH, Claude Code, Codex CLI, CodeBuddy, ZCode — can mount it over stdio. It deliberately does not train or ship a model; it handles everything around one: how memories are stored, what justifies retrieval, how bad writes get caught, and how fixes leave an audit trail. Forgetting is never silent — it requires an explicit cg(op=forget) call.

The interesting bit

The core bet is “zero LLM in the judgment path”: what gets remembered, what gets recalled, and whether a write succeeded are all decided by deterministic rules, with success signaled only by a committed confirmation. The retrieval index is a derived artifact — the raw Markdown files are the source of truth, so you can open the whole memory in any text editor and audit it by hand.

Key highlights

  • Writes confirmed via committed — the system never pretends a write succeeded
  • Rust retrieval kernel with zero third-party dependencies; --serve mode supports multi-agent concurrency
  • Published benchmark (hive-memory-bench) claims 100% verbatim fidelity and 0.013–0.020s writes, versus 75.7–658.5s for LLM-based entries in the same table
  • Two independent third-party verifications of the self-reported numbers, per the README
  • The repo is actually a five-part platform: memory brain, Rust engine, swarm runtime, a Chinese-language compiler, and a hive concurrency engine — but you can use just the memory layer

Caveats

  • It’s infrastructure, not a product: you bring your own agent, and full evaluation requires a Rust toolchain and Node
  • The 0.9.9 release renamed tools (dropping the lingshu_ prefix), which silently breaks hardcoded calls; compatibility aliases exist since 0.9.12 but are scheduled for removal
  • The README itself flags known operational quirks — startup warnings, directory coupling, async disk writes — documented as “looks like a bug, actually a contract”

Verdict

Worth a look if you build agents and want auditable, reproducible memory instead of a vector database you have to trust. Skip it if you expected a turnkey product or anything resembling AGI — the authors explicitly disclaim both."}

Frequently asked

What is FuRongJun-1999/dsh-memory?
LINGSHU is a long-term memory layer for MCP agents where every write, read, and forget is decided by deterministic rules instead of an LLM's mood.
Is dsh-memory open source?
Yes — FuRongJun-1999/dsh-memory is open source, released under the MIT license.
What language is dsh-memory written in?
FuRongJun-1999/dsh-memory is primarily written in Python.
How popular is dsh-memory?
FuRongJun-1999/dsh-memory has 506 stars on GitHub.
Where can I find dsh-memory?
FuRongJun-1999/dsh-memory is on GitHub at https://github.com/FuRongJun-1999/dsh-memory.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.