자동 중복 제거, 충돌 해결 및 Markdown 동기화 기능을 갖춘 로컬 우선 SQLite 저장소를 통해 AI agent에게 세션 간 메모리를 제공합니다.
다른 이름 slow-stack/mneme, mneme, mneme-memory
- 스타
- 223
- Tools
- —
- 다운로드, 30일
- —
- 최신 버전
- 0.1.1
- 마지막 커밋
- 2026년 11월 13일
- 라이선스
- MIT
Mneme Memory MCP란?
Mneme Memory은(는) MCP server입니다. 자동 중복 제거, 충돌 해결 및 Markdown 동기화 기능을 갖춘 로컬 우선 SQLite 저장소를 통해 AI agent에게 세션 간 메모리를 제공합니다.
프로젝트 README에서 생성된 요약
Mneme Memory MCP server 정보
Mneme Memory는 로컬 우선 SQLite 데이터베이스를 활용하여 AI agent에게 지속적인 세션 간 메모리를 제공합니다. DeepSeek Harness 또는 모든 MCP 호환 클라이언트를 사용하는 개발자를 위해 설계되었으며, 채팅 세션이 종료된 후에도 선호도, 프로젝트 세부 정보 및 과거 결정 사항이 유지되도록 합니다. 이 시스템은 자동 중복 제거, 충돌 해결 및 autoDream 프로세스를 통한 백그라운드 통합을 통해 정보를 관리합니다.
사용자는 memory_save, memory_search, memory_list, memory_get, memory_update, memory_delete를 포함한 도구 모음을 통해 메모리와 상호작용할 수 있습니다. 이 MCP server는 외부 API 키 없이도 완전히 오프라인에서 시맨틱 검색이 가능하도록 로컬 임베딩을 지원합니다. 또한 Markdown 동기화 기능을 유지하여 사용자가 메모리 파일을 수동으로 편집할 수 있게 하며, 사용자의 변경 사항이 머신 업데이트보다 우선하도록 보장합니다. 이 아키텍처는 모든 데이터를 로컬 기기에 유지하고, 서로 다른 agent 또는 워크스페이스 간의 메모리 유출을 방지하기 위해 스코프 격리를 제공함으로써 프라이버시를 최우선으로 합니다.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
Mneme Memory MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 Mneme Memory MCP 설치
$ claude mcp add mneme -- npx -y mneme-memoryCursor에 Mneme Memory MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-memory"
]
}
}
}VS Code에 Mneme Memory MCP 설치
.vscode/mcp.json
{
"servers": {
"mneme": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mneme-memory"
]
}
}
}Claude Desktop에 Mneme Memory MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-memory"
]
}
}
}Codex에 Mneme Memory MCP 설치
~/.codex/config.toml
[mcp_servers.mneme] command = "npx" args = ["-y", "mneme-memory"]
Gemini CLI에 Mneme Memory MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"mneme": {
"command": "npx",
"args": [
"-y",
"mneme-memory"
]
}
}
}구성
MNEME_TOKEN
| 이름 | 설명 | 유형 |
|---|---|---|
| MNEME_TOKEN | — |
자동 검사
2026년 11월 12일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능통과
- 오픈 소스 라이선스 (OSI)통과
- 최근 1년 내 커밋 또는 릴리스통과
- 패키지 이름이 인기 패키지와 유사하지 않음통과
- 원격 엔드포인트가 HTTPS 사용검사되지 않음
- 파괴적인 도구에 라벨 표시됨검사되지 않음
- 모델에 대한 숨겨진 지침 없음통과
- 패키지와 의존성에 심각한 보안 권고 없음통과
README
GitHub에서 보기🧬 给 LLM 装上会自我进化的记忆
dsh-mneme 是 DeepSeek Harness (DSH) 的跨会话记忆插件。它不只「存得下」,更「管得好」:后台自动去重合并、矛盾先冻结等你裁决、全程可回放审计、记忆只落在本机,还支持导出成人可读的 Markdown。
Mneme(Μνήμη)源自希腊记忆女神 Mnemosyne。她掌管记忆与梦境——正如
autoDream在后台默默巩固你的记忆库。
📰 最近更新
v0.14.0-beta.3 — 情绪页白屏修好了,档位被冻结覆盖也说得明白了(2026-11-12,预发布)
点开「情感」页整块面板变空白的回归修掉了。根因是一行 formatRelativeTime(it.lastSeen) 漏传 t,函数内部要拿它取文案,缺参就抛错;这行跑在 render 里,React 整棵树卸载,日志里什么都不留——所以看起来像「点了没反应」。v0.14.0-beta.1 与 beta.2 都带这个回归,只有库里存在带 lastSeen 的情绪边时才触发,因此不是每个人都会遇到。
另修一处「面板说的和实际做的不一致」:档位选 off 或 shadow、同时开着矛盾冻结时,判成矛盾的对会照旧停车进待审队列,档位选哪一档都不减少——而这条互斥关系此前只写在设置项提示语里,下拉旁边看不到。现在档位下方直接标一行「⚠ 冻结正在覆盖本档位」。判据与后端同源,不改默认值、不改语义;要停止新增仍须自己关掉矛盾冻结。
它解决什么问题
每次新开对话,AI 都像第一次认识你?
dsh-mneme 给 DeepSeek Harness 装上跨会话记忆。 你聊过的项目、提过的偏好、做过的决定,AI 都记得——即使关掉了窗口,下次打开还在。
| 场景 | 没装插件 | 装了插件 |
|---|---|---|
| 周一聊完项目需求,周三继续 | "能再描述一下你的项目吗?" | "你指的是上周提到的博客重构吗?当时你说想用 Astro。" |
| 告诉 AI 你的编码习惯 | 每轮都要重复交代 | 一次设定,长期生效 |
| 整理大量资料后关窗口 | 资料丢了 | 自动归档,随时检索找回 |
但 dsh-mneme 的可信之处,恰恰在你看不见的后台。下面这些,才是它和「一个会存东西的插件」的本质区别。
为什么可以信任它
- 🧾 可回放、可追责 — 每次自动整理都留一张「决策凭证」:输入快照 + 决策明细 + 结果哈希,同样的整理可复现回放,不默默吞错、不留无法追溯的改动。
- ⚖️ 矛盾先冻结,等你裁决(可关)— 两条记忆打架时,不擅自替你做主。可疑冲突会挂起待审,状态页冲突队列里并排对比、一键裁决(保留 A / 保留 B / 仅标记),确认后才生效。复杂判断,人永远在线。
- 🔐 记忆按 agent 与工作区隔离(可关)—
scopeEnabled开启后,每条记忆标注由哪个 agent、在哪个工作区写入;检索时本会话作用域优先(命中加权,他 scope 降权仍可见);strictScope再进一步——显式声明收窄到他者作用域的记忆在检索/注入里完全不可见(载体自动标注只降权,不硬挡)。多 Agent、多项目互不串台。 - 🌙 夜深人静才动手(可关)— 空闲时自动分层归档:常看的留在热区、久不用的压成摘要、陈旧的彻底归档。记忆库越用越精炼,不膨胀。
- 🧠 语义检索可以完全离线 — 把
embedProvider设为local后检索走本地 Embedding 与精排,不需要 API Key;没配嵌入时关键词 / BM25 检索照样能用。 - 📝 Markdown 双向同步 — 记忆就是本地
.md文件,随时打开编辑;人工改动会被优先尊重,不会被机器覆盖。 - 💾 删对话 ≠ 删记忆 — 记忆是跨会话的全局知识,清空聊天窗口,已保存的记忆仍在(v0.7.11 起不再与会话绑定)。
它和 Zep / Mem0 / Letta / Hindsight 比呢? 有一张逐项对照表——存储底座、检索、写入时抽取、离线巩固、冲突处理、遗忘、作用域、可审计性、多宿主、离线、许可证共 11 行,「—」不等于「差」:能力对比。
5 分钟上手
# 安装插件(最省事的一条:npm 包名)
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web
四种安装来源
DSH 的 设置 → 插件 → Add plugin 与 dsh plugin add 认四种写法,填进去的是什么就装什么。本仓库是个单仓多包:仓库根那份 package.json 只是仓库壳(private、不带 dsh 字段),真正可安装的插件本体在 dsh-mneme/。所以走 Git 或 tarball 时必须指到子目录,否则装到的是壳本身。
为什么仓库根要放一份装不了的壳?因为有些单仓多包探测器(比如 dshfind 的插件探测)只认仓库根的清单——没有它就会把本仓库判成「不可安装的插件包」,而这句判词与实际上能不能装无关。根清单
private+0.0.0+ 不带dsh字段,就是为了让这类工具能找到子包、同时绝不被当成插件本体安装或发布。
| 来源 | 填什么 | 备注 |
|---|---|---|
| npm 包名 | @modusensus/dsh-mneme |
推荐;可带版本 @0.9.0 |
| Git 仓库 | git+https://github.com/slow-stack/mneme.git#path:/dsh-mneme |
#path: 不可省。省掉装到的是仓库根那份壳(0.0.0、无 dsh 字段),宿主不会把它当插件 |
| tarball | C:\\path\\to\\modusensus-dsh-mneme-0.9.0.tgz |
在 dsh-mneme/ 里 npm pack 产出;pnpm pack 会因 bin 脚本 CRLF 失败 |
| 本地目录 | C:\\path\\to\\mneme\\dsh-mneme |
必须是绝对路径;相对路径会被宿主直接拒掉(a local path must be absolute) |
# 从源码装(本地目录,改完代码重启即生效)
git clone https://github.com/slow-stack/mneme.git
dsh plugin --profile web add "$(pwd)/mneme/dsh-mneme"
# 或者直接从 Git 装(不落源码,适合只要个能跑的版本)
dsh plugin --profile web add 'git+https://github.com/slow-stack/mneme.git#path:/dsh-mneme'
面板里那行「Install guide and examples」只演示了包名一种写法;上面四种都是实测通过的。Git 与 tarball 来源在安装时宿主会做一次仓库可达性检查(超时默认 5 秒)。
装完即可用。想在 5 分钟内看到它的价值:
- 聊:新开对话,跟 AI 聊几句关于你的偏好或手头项目(比如"我写代码更喜欢 4 空格缩进")。
- 等:关掉窗口,重开新对话。如果它还记得刚才的事,说明记忆已经写入。
- 可选:注入与后台整理装好就是开的,不用先动任何开关;想完全离线、开实体抽取或多会话隔离,再去「设置 → 记忆库设置」按需改(见快速配置)。注意实体抽取在 bundle 安装里本来就是开的、在手动安装里是关的——以设置页实际显示为准。
快速配置(可选)
| 需求 | 配置项 | 默认值 | 改法 |
|---|---|---|---|
| 完全离线运行 | embedProvider |
openai |
改为 local |
| 后台自动整理记忆 | autoDream |
true |
改为 false 可关 |
| 自动提取结构化实体 | entityExtractionEnabled |
false(bundle 安装为 true) |
手动安装改为 true;bundle 安装已是开,想关再改 |
| 多 Agent / 多项目记忆隔离 | scopeEnabled(需要更强隔离再加 strictScope,硬隔离只对显式声明生效) |
false |
改为 true |
以上均在 DSH 设置面板 → 记忆库设置 中修改。完整配置见 配置章节。
记忆库落点建议
记忆库默认在 ~/.dsh/memory,天然在宿主 profile 作用域之外;但真实落点由 memoryDir 配置决定。若把它指进 profile 作用域(形如 …/profiles/<名字>/…),宿主清理或迁移 profile 时记忆库会被连带带走(#218 末楼记录的实际事故)。插件启动时检测到这种落点会打一条告警——只提示、不搬库。安全做法:memoryDir 保持在 profile 之外(默认值即可);要迁移库 = 停止写入 → 复制整个目录 → 改配置指向新位置 → 重启。
怎么升级(设置不会丢)
升级只动代码,不动你的记忆和设置。
设置与记忆是同一个 SQLite 文件里的表(user_settings 与 memories 等),文件位置由 memoryDir 决定,默认在 ~/.dsh/memory——不在插件安装目录下。所以卸插件、装插件都不碰它。
升级就是覆盖安装,装完重启一次:
# --profile 后面写你当初安装它时用的那个名字,默认是 web
dsh plugin --profile web remove @modusensus/dsh-mneme
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web
上面是 npm 来源的装法;当初从 Git、tarball 或本地目录装的,按下同一种来源重装即可(见上方「四种安装来源」)。唯一要求是先 remove 再 add。 不用重装 DSH。重装 DSH 动的是 profile,是更大范围的改动,与插件版本无关。 也不要只
add不remove——宿主可能拿到缓存的旧副本,版本号没变就说明没换成。
这件事是实测过的,不是推断:用 v0.12.0 的代码建库、写入画像、规则、人格卡与四个功能开关,再换成本次发布的代码打开同一个库——四项全部原样读回。反向也测了:新代码写的库,v0.12.0 同样读得出来。所以升级与回退都不会把设置读丢。
唯一会让你丢数据的是把库指进 profile 作用域(形如 …/profiles/<名字>/…),宿主清理 profile 时会连带带走——见下面「记忆库落点建议」。
一图看懂记忆闭环
写入 ──► 质量过滤(无用信息先拦下)
│
▼
SQLite + 本地 Markdown 镜像
│(空闲时)
├─ autoDream :去重 / 合并 / 归档 / 修正 / 冲突冻结
└─ Sleep Mode :分层压缩 + 模式发现 + 关系补全(可关)
│
▼
召回(混合检索 + 精排)──► 注入会话上下文
🧭 M.O.:让「怎么做」也住进仓库(v0.9 beta,v0.13.0 起从面板下架)
状态(v0.13.0):这一组已从设置面板下架,界面上没有入口了。三个旗标(
actionPipelineEnabled/actionRunEnabled/actionNudgeEnabled)与/mo-run命令、座位注册逻辑都还在,语义零改动——想恢复界面,把那行加回FEATURE_GROUPS与FEATURE_FIRST_SCREEN即可。下面保留的是它的设计说明。
记忆库记得住为什么这么做,但记不住这件事到底怎么跑。工作流住在哪,决定了它能不能被改:住在记忆库里是一行没有 diff 的文字,住在会话里是一次性的提示词,住在人脑里改不动也不留痕。
所以 v0.9 把它们搬进项目仓库——一条工作流一个文件:
<项目>/.mneme/pipelines/<id>.json ← 项目层(能提交、能 diff、能 PR、能被 CI 读)
<插件包>/pipelines/<id>.json ← 全局层(兜底,今天包里没有这个目录,这是有意的)
分工是一句话:记忆是「为什么」,仓库是「怎么跑」,图是「看起来怎么样」。
- 护栏,不是轨道 — 图上必须留一扇合法的逃生门:agent 判断这条路这次不对时,按风险档决定「记账先走」还是「停下问人」。跳过 = 这次不用这一步(≥3 次提议删这一步);绕开 = 这条路整个不对(≥3 次提议重看这条路径)。两个指标分开数,混在一起两种提议都发不出来。
- 候选不进仓库 — 草稿住在
<memoryDir>/candidates/<项目键>/,只在本地。一天长十条死九条的东西进仓库就是垃圾。升格要同时满足「走过两次(至少一次成功)」且「写得出反事实」;够格之后系统只提议,提交与推送始终是人握着的那道门。 - 面板画的图和 agent 读的是同一份数据 — 只画不存,agent 就什么也读不到。节点状态(
refuted/trusted/stale/candidate)全部从运行记录推,不由作者写死;今天还没有运行记录落点,所以全体恒为candidate——这就是那个 beta 标签必须摆在脸上的原因。
默认关(actionPipelineEnabled)。设计取舍与踩过的坑见 docs/WORKFLOWS.md。
界面预览
面板内置中英双语,跟随你的 DSH 界面语言显示。以下为中文截图,英文版请切至文末 English 段落。
隐私承诺
- 记忆只落在本机:SQLite 存储 + 可手工编辑的 Markdown 镜像,不经过任何 mneme 服务器
- 记忆是 Markdown 文件,人类可读、可手工编辑
- 不需要 mneme 自己的 API Key;巩固与摘要走你已配置的宿主模型(
autoDream/autoSummarize默认开) - 想连巩固也完全离线:把宿主换成本地模型(并清空
dreamProvider/dreamModel与summarizeProvider/summarizeModel—— 配了这两组就绕过宿主直连,换宿主不会生效),或直接关掉autoDream/autoSummarize - 无遥测、无分析、无远程日志
用在其他 AI 工具里(MCP)
插件自带零依赖 stdio MCP server(独立 npm 包 mneme-memory,bin 名 mneme-mcp),任何 MCP 客户端都能挂载记忆六件套(memory_save / memory_search / memory_list / memory_get / memory_update / memory_delete)。
前置条件(一次性):
- DSH 在运行且插件已安装(MCP 数据面走插件的独立 API
127.0.0.1:8790) - 在 DSH 面板「设置 → 外部访问 API」生成 token
各客户端挂载(<你的token> 替换为上一步生成的值):
| 客户端 | 挂载方式 |
|---|---|
| Claude Code | 项目根 .mcp.json:{"mcpServers": {"mneme-memory": {"command": "mneme-mcp", "env": {"MNEME_TOKEN": "<你的token>"}}}} |
| Cursor | 设置 → MCP → Add Server,command 填 mneme-mcp,env 加 MNEME_TOKEN |
| Codex | ~/.codex/config.toml:[mcp_servers.mneme-memory] 段,command = "mneme-mcp",env = { MNEME_TOKEN = "<你的token>" } |
| Hermes | ~/.hermes/config.yaml 的 mcp_servers: 段:mneme-memory: {command: "mneme-mcp", env: {MNEME_TOKEN: "<你的token>"}},重启生效 |
| OpenCode | opencode.json:{"mcp": {"mneme-memory": {"type": "local", "command": ["mneme-mcp"], "environment": {"MNEME_TOKEN": "<你的token>"}}}} |
| OpenClaw | openclaw mcp add mneme-memory --command mneme-mcp --env MNEME_TOKEN=<你的token>,或 Control UI → Settings → MCP |
旧挂载兼容:已部署的
dsh-mneme-mcp+DSH_MNEME_TOKEN写法继续有效(bin 与 env 变量均保留,无需迁移)。未全局安装 npm 包时,把command换成npx并追加参数-p mneme-memory mneme-mcp(Claude Code/OpenCode 写进 args 数组,Codex 写args = ["-p", "mneme-memory", "mneme-mcp"])。配置细节与安全注意事项见完整文档。
不开 DSH 也能服务(独立服务 daemon)
dsh-mneme-serve 把记忆库跑成常驻数据面——DSH 关着,第三方集成(网页端桥接、脚本、自有面板)照样读写同一份记忆:token 与 DSH 面板/CLI 共用,路由与「外部访问 API」同源,端口被占直接报错(与 DSH 外部访问二选一)。第一期无 LLM(巩固/蒸馏仍属 DSH 宿主);检索默认 local 嵌入(首次启动自动取件模型,--embed off 可关)。
npm i -g @modusensus/dsh-mneme
dsh-mneme-serve # 默认 ~/.dsh/memory + 127.0.0.1:8790
社区适配器
社区项目把 mneme 接入更多平台——它们不是本仓库的一部分,兼容性由各自维护者跟进:
| 项目 | 平台 | 说明 |
|---|---|---|
| Mneme-Bridge | DeepSeek 网页端 | 浏览器扩展 + 本地服务:网页端会话蒸馏进 mneme 记忆库、DSH 侧记忆按话题回注,两侧共享同一份记忆。embedded(挂载 lib)与 remote(standalone API,不开 DSH 时配合上面的 daemon)双模式 |
想被收录?在 Discussions 开帖介绍你的项目,或直接提 PR 补充本表。
文档
| 文档 | 路径 |
|---|---|
| 插件完整文档(功能 / 安装 / 配置 / 架构) | dsh-mneme/README.md |
| stdio MCP server——Claude Code / Cursor 等任意 MCP 客户端接入记忆六件套 | dsh-mneme/README.md · MCP Server |
| 独立服务 daemon(不开 DSH 常驻数据面) | dsh-mneme/docs/DAEMON.md |
| 配置说明(全键参考) | dsh-mneme/docs/CONFIGURATION.md |
目录归属:哪个目录是什么(~/.dsh/memory ≠ ~/.dsh/mneme ≠ ~/.dsh-mneme) |
dsh-mneme/docs/DIRECTORIES.md |
| 蒸馏原文留存与记忆级溯源(#399) | dsh-mneme/docs/DISTILL.md |
记忆分享包:出包与收包(dsh-mneme share / receive / undo-share) |
dsh-mneme/docs/SHARE.md |
| 实体结构化设计 | dsh-mneme/docs/ENTITIES.md |
| 工作流(M.O.):本体住仓库、证据住记忆库 | dsh-mneme/docs/WORKFLOWS.md |
| 语义架构 | dsh-mneme/docs/SEMANTIC.md |
| 本地模型部署指南 | dsh-mneme/docs/LOCAL_MODEL.md |
| 与 Zep / Mem0 / Letta / Hindsight 的能力对比 | docs/COMPARISON.md |
| 版本历史 | dsh-mneme/CHANGELOG.md |
| 安全策略 | SECURITY.md |
| 行为守则(署名归人、按证据分配发言权) | CODE_OF_CONDUCT.md |
🗺️ 路线图
🧬 记忆基因 → 🛡️ 审计加固 → 💤 睡眠维护 → 🕸️ 召回融合与图谱 → ✨ 面板增强 → 🌡️ 自进化记忆 → 🔐 作用域隔离 → 🌐 生态(MCP / daemon)→ 🧭 M.O.(项目级工作流)
| 版本 | 主题 | 状态 |
|---|---|---|
| v0.3 | 记忆基因:实体 / 属性(带时间轴)/ 关系 | ✅ |
| v0.4 | Sleep Mode:空闲四阶段深度维护 | ✅ |
| v0.5 | 召回融合与记忆可视化:BM25 + 图谱 + 热记忆 | ✅ |
| v0.6 | 会话生命周期:删对话 ≠ 删记忆 | ✅ |
| v0.7 | 自进化记忆:热度衰减 + 睡眠双保护 + 桌面端工作台/功能开关 | ✅ |
| v0.8 | 作用域隔离(agent/workspace 双维隔离 + 检索加权 + opt-in 硬过滤)+ 冲突队列人工裁决 + 归属显式声明 + 生态化(stdio MCP server / 图召回轴 / 冷启动 / 注入截断与状态条 / 蒸馏可靠性 / 注入形态与 agent 主动整理接口 / 配置说明与 issue 模板) | ✅ 已发布(至 v0.8.16) |
| v0.9 | M.O.(Modus Operandi)beta:项目级工作流本体 + 候选分层与升格判据 + 面板清单/图同屏;设置面板按「新手之外」重划折叠线(#427);安全审计与供应链加固(声明式路由鉴权、OSV 阻断、发布签名);v0.9.1 补上写侧:执行窗口、运行账、归属候选、观察旁挂与脱节检出、步骤 assert/optional、沉淀链草稿挖掘、人格定义页(按 agent 多卡);v0.9.2 让看不见的失败显形:功能开关第三态「待重启」、作用域级可逆闸门(#471)、巩固 max_tokens 超上限自动降级(#478);v0.9.3 接通自动沉淀:按会话头 cwd 反查项目桶、挂 turn/end、冷却 10 分钟、单次预算 4 秒,只产提议不产草稿(#489),并修作用域反查自 v0.8.0 起静默降级(#487)、/nudge 写盘口漏拦 PATCH/DELETE、多帧 zstd 反证断言绑 Node 整块解语义(#490);v0.9.4 补上三条链的最后一环:agent 主动整理接口有了工具(memory_organize,organizeEnabled 默认关,关时模型根本看不到它)、画像可以从记忆提取草稿(profileExtractEnabled 默认关,只出草稿、采用是用户再点一次,手写的原文不被模型改写)、人格 default 卡不再无条件进「没建卡」的身份(#497,personaStrictAddressing 默认关),面板那段「注入生效文本」改成由后端单源渲染,另补蒸馏转录围栏与解析失败护栏(#494);v0.9.5 让记忆递得出去也收得回来:分享包 mneme.share/v1(只含活跃行、scope 与 home 前缀不进包、密钥/PII 整条不进、报告先于下载、3 MiB 水位、一条不合格整包拒、干跑为默认、按 share_external_id 幂等、整包退出走物删),「本机巩固不改写别人导入的原文」由单一谓词守在汇流口与九个行池,记忆溯源读出口 GET /memory/provenance(@z2Ace0107,409 与 503 两种「没有」分开),并修同标题重复入库(#505)、模式扫描窗口饿死(#515)、五处 prompt 未围栏(#501/#493)与 dream 合并护栏整类误拦(#521),面板加设置页分组目录(#518) |
✅ 已发布(v0.9.5) |
| v0.10 | 归因与闸门:蒸馏归因补上「运行」身份(distill_runs 窗口级 + memory_mints 行级,历史行不猜)、溯源补上反方向 ?sessionId=、会话级无痕闸门(sessionGateEnabled,判据只认宿主委派标记 + 有界记账)、防谄媚补到写入面(蒸馏与总览的立场 / 叙述纪律)、differentiate 改落账本不改正文(#533)、sleep 冲突相位输入侧预算与续排(#529)、面板「最近巩固」区分 organize 回执(#495)、面板首次有移动端与 481–519px 中间带断点(#542) |
✅ 已发布(v0.10.0) |
| v0.13 | 情绪终于有地方可放:「这一次很焦虑」与「你是个焦虑的人」在存储上不再一样——affective_context 关系类型带情绪词与归因;sleep 新增情感相位,按三个独立会话才升成稳定倾向,不足就降级不丢弃,降级与丢弃全部记账;同场合的边按会话合并而不是每轮重写。同版:日记本、M.O. 下架、面板几处修复 |
✅ 已发布(v0.13.0) |
| v0.12 | pin 显式化(pinned_memories 表 + memory_pin(取消钉选传 unpin: true),钉住的行在注入里优先占位,不再靠类型推断;pinnedInjectBudget 默认 0 = pin 池关闭)+ pin 池不再被向量路 poolSize 封顶挤出 + 「Agent 眼中的你」自动事实(profileFactsEnabled 默认关)+ 向量解析缓存跟工作集自适应(命中率 0% → 100%,单轮检索快 5.6 倍,存储换 Float32Array)+ 修 #579 地志工具错误路径与「读不到答成没匹配」+ 修 #590 严格寻址把「一张卡都没建」判成「没有这张卡」 |
✅ 已发布(v0.12.0) |
完整逐小版本说明见 CHANGELOG。
🧪 本地开发
cd dsh-mneme && npm install
npm test # 3401 个测试
npm run stress # 三轴线压测
npm run sync # src → lib 同步
🙏 致谢
autoDream 的理念溯源(理念借鉴、实现原创):
- Claude Code 的 Auto Dream(Anthropic,Memory 2.0):理念源头——会话间隙由后台子代理整理记忆文件(去重、修矛盾、清衰减)。
- Sleep-time Compute: Beyond Inference Scaling at Test-time(UC Berkeley & Letta,arXiv:2504.13171):Auto Dream「离线巩固」思想背后的学术脉络。
- cc-haha:早期实现思路的参照之一。
在上述工作之上,dsh-mneme 做了自己的工程发展:K-Means++ 聚类预分组、类型化决策清单(keep / merge / archive / conflict / update,及 sleep 侧 supersede / differentiate)与可回放的 sha256 摘要审计链(dream_runs / receipt_chain)。如有遗漏的灵感来源,欢迎提 issue 指出。
📚 相关研究
dsh-mneme 的机制设计与下列公开研究相互印证(以下引用均逐一核对过 arXiv 收录页;机制对应关系为我们自己的映射,非原论文观点):
- 在线写入 + 离线巩固:Dual-Layer Agentic Memory with Fast Write Routing and Slow Consolidation(arXiv:2608.22215)——与 autoDream 的「快写慢巩固」分工同构。
- 热度衰减与访问强化:FadeMem(arXiv:2601.18642)——heat 记忆热度模型(指数衰减 × 访问强化 × 重要性调制)的学术近亲。
- 冲突裁决与状态追踪:StateMemBench(arXiv:2608.19652)——记忆系统追踪演化状态的考卷;C1 冲突裁决(supersede 后不再引用旧值)以其为验收靶子。
- 何时该忘 / scope 门控:PersistBench(arXiv:2602.01146);呈现层缓解见 Structured Memory(arXiv:2608.08300)——scope 语义域门控的问题出处与零契约变更改法。
- 领域全景:Write–Manage–Read 综述(arXiv:2603.07670)——「写入 / 管理 / 读取」三段式与插件整体形状互证。
- 数月尺度的可靠性工程:Memory as Infrastructure(arXiv:2609.05510)——与 sha256 审计链、fail-safe 降级同属「记忆即基础设施」路线。
- 相邻系统(对照):Zep(时序知识图谱)、Mem0(生产级抽取式记忆)、Hindsight(retain / recall / reflect 三操作)走「写入时 LLM 抽取 + 向量/图检索」路线;dsh-mneme 的差异点在于:巩固由 LLM 参与但产物全程留痕可回放,冲突冻结待人工复核,记忆只落本机。
🧬 Give Your LLM a Memory That Evolves
dsh-mneme is a cross-session memory plugin for DeepSeek Harness (DSH). It does not just store your memories — it manages them: background deduplication and merging, conflicts frozen for your review, a fully replayable audit trail, memory kept on your machine, and export to human-readable Markdown.
Mneme (Μνήμη) comes from Mnemosyne, the Greek goddess of memory and dreams — just as
autoDreamquietly consolidates your memory store in the background.
📰 Recent updates
v0.14.0-beta.3 — the affective panel no longer goes blank, and an overridden tier now says so (2026-11-12, pre-release)
The regression that blanked the whole affective panel is fixed. One call to formatRelativeTime(it.lastSeen) was missing its t argument; the function reaches for that to look up a label, so it threw — and because the line runs inside render, React unmounted the entire tree and left nothing in the log. That is why it looked like "I clicked it and nothing happened". Both v0.14.0-beta.1 and beta.2 shipped this; it only triggers when the library holds an affective edge with lastSeen, so not every user hits it.
This release also fixes one case where the panel disagreed with behaviour: with the tier set to off or shadow and conflict freeze on, contradicting pairs still park in the pending queue no matter which tier is chosen — and that mutual exclusion was only documented in a settings hint, invisible from the dropdown itself. The tier row now shows "⚠ conflict freeze is overriding this tier". The condition is the same one the backend uses, defaults and semantics are untouched, and stopping new arrivals still requires turning conflict freeze off.
What problem does it solve
Every time you start a new chat, the AI acts like it's never met you?
dsh-mneme gives DeepSeek Harness cross-session memory. Projects you've discussed, preferences you've mentioned, decisions you've made — the AI remembers them even after you close the window.
| Scenario | Without plugin | With plugin |
|---|---|---|
| Continue a project discussion from Monday on Wednesday | "Can you describe your project again?" | "You mean the blog refactor from last week? You mentioned wanting to use Astro." |
| Tell the AI your coding habits | Repeat every session | Set once, remember forever |
| Close window after organizing research | Notes are lost | Auto-archived, retrievable anytime |
But what makes dsh-mneme trustworthy lives in the background you never see. These are the traits that set it apart from "a plugin that just saves things."
Why you can trust it
- 🧾 Replayable, accountable — every consolidation leaves a "decision receipt": input snapshot + decision detail + result hash. The same run reproduces the same outcome. No silent mis-merges, no untraceable changes.
- ⚖️ Conflicts freeze, you decide (opt-in) — when two memories contradict, it does not take sides for you. The suspected conflict is parked for review, compared side-by-side in the status-page conflict queue, and resolved with one click (keep A / keep B / mark reviewed). On hard judgments, a human stays in the loop.
- 🔐 Memories isolated by agent & workspace (opt-in) — with
scopeEnabled, every memory is stamped with which agent wrote it and in which workspace; retrieval favors the current scope (weighted hits, out-of-scope demoted but visible);strictScopegoes further — memories explicitly scoped to other agents/workspaces become invisible to search and injection (auto carrier labels are demoted only, never hard-blocked). Multiple agents and projects, zero cross-talk. - 🌙 It works while you sleep (opt-in) — idle time triggers tiered archiving: frequent memories stay hot, stale ones compress to summaries, old ones archive. The store stays lean as it grows.
- 🧠 Semantic search that can run fully offline — set
embedProvidertolocaland retrieval uses local embedding + reranking, no API key needed; without an embedder, keyword / BM25 retrieval still works. - 📝 Two-way Markdown sync — memories are local
.mdfiles you can open and edit; human edits are respected, never clobbered by the machine. - 💾 Delete the session ≠ delete the memory — memories are cross-session global knowledge; clearing a chat window keeps what was saved (unbound from sessions since v0.7.11).
How does it compare with Zep / Mem0 / Letta / Hindsight? There is a row-by-row table — storage, retrieval, write-time extraction, offline consolidation, conflicts, forgetting, scoping, auditability, multi-host, offline, license: 11 rows, and "—" does not mean "worse": capability comparison (Chinese).
5-minute quickstart
# Install the plugin (the easy path: npm package name)
dsh plugin --profile web add @modusensus/dsh-mneme
dsh web
Four install sources
Settings → Plugins → Add plugin and dsh plugin add accept four kinds of spec — whatever you paste is what gets installed. This repository is a multi-package repo: the package.json at the root is only a repo shell (private, no dsh field), while the installable plugin lives in dsh-mneme/. So Git and tarball specs must point at that subdirectory; otherwise you install the shell itself.
Why ship an uninstallable shell at the repo root? Because some multi-package detectors (dshfind's plugin probe, for one) only look at the root manifest — without it this repository is judged "not an installable plugin package," which says nothing about whether it actually installs. The root manifest is
private+0.0.0+ carries nodshfield precisely so such tools can find the real subpackage while it can never be installed or published as the plugin itself.
| Source | Paste this | Note |
|---|---|---|
| npm name | @modusensus/dsh-mneme |
Recommended; a version range works too (@0.9.0) |
| Git repo | git+https://github.com/slow-stack/mneme.git#path:/dsh-mneme |
#path: is not optional. Without it you get the root shell (0.0.0, no dsh field) — the host does not treat it as a plugin |
| tarball | C:\\path\\to\\modusensus-dsh-mneme-0.9.0.tgz |
Produced by npm pack inside dsh-mneme/; pnpm pack fails on the bin script's CRLF line endings |
| local directory | C:\\path\\to\\mneme\\dsh-mneme |
Must be absolute — a relative path is rejected outright (a local path must be absolute) |
Mneme Memory MCP 질문
Mneme Memory MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add mneme -- npx -y mneme-memory를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
Mneme Memory MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
데이터가 안전하게 보호되나요?
네, 메모리는 로컬 SQLite 데이터베이스에 저장되며 사용자의 기기에 Markdown 파일로 미러링됩니다. Mneme 서버를 거치지 않습니다.
검색 시 인터넷 연결이 필요한가요?
embedProvider를 local로 설정하면 로컬 임베딩과 리랭킹을 사용하여 완전히 오프라인 상태에서도 시맨틱 검색을 수행할 수 있습니다.