
agentmem
io.github.Thezenmonster由 GitHub 账号 Thezenmonster 发布v0.2.5更新于 Oct 24, 2026
Governed memory for coding agents. Trust lifecycle, conflict detection, health scoring.
概览
面向编码助手的本地记忆服务器,按类型保存项目记忆,带信任状态、冲突与过期检测以及健康评分。
- 可以做什么
- 新增、更新、删除和列出按项目隔离的类型化记忆(设置、缺陷、决策、流程、背景、反馈、会话)
- 搜索与召回记忆,召回结果按令牌预算打包,并按相关性、信任状态、来源与新旧程度排序
- 通过提升、弃用和取代操作管理记忆生命周期,从假设到生效再到已验证
- 保存和加载会话状态,让助手接着上次的进度继续
- 检查记忆健康度、冲突和过期条目
- 适用场景
- 适合编码助手在不同会话间反复犯同样的错误,或把过时规则与现行规则混在一起时使用,也适合希望用本地文件保存记忆并追踪哪些内容仍然可信的场景。
- 运行要求
- 以本地 stdio 进程运行,从 PyPI 包 quilmem 安装并带 mcp 附加组件,需要 Python 环境。无需 API 密钥、账号或云服务。数据存放在本地 SQLite 文件中,需在客户端配置里指定数据库路径和项目名称。
安装
在 SourceWeft 中
- 打开 控制台中的 agentmem,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
agentmem
Shared memory for Claude Code, Cursor, and Codex that knows what's still true. Save sessions, catch stale and conflicting rules, and stop your agent from repeating old mistakes.
[PyPI] [Python] [License: MIT] [Tests]
The Problem
Your AI coding assistant forgets everything between sessions. It repeats old mistakes. It can't tell current rules from outdated ones. Context compresses and recovery is painful.
Most memory tools solve storage. agentmem solves trust.
Get Started (Claude Code / Cursor / Codex)
That's it. Restart your editor. Your agent now has 13 memory tools. Run memory_health to confirm.
[agentmem demo: install, init, health check]
Python-only?
pip install quilmemworks without the MCP extra. See the Python API below.
60-Second Demo
What Makes This Different
Other memory tools store things. agentmem knows what's still true.
Truth Governance
The core idea: every memory has a status that tracks how much you should trust it.
Why this matters: Without governance, your agent's memory accumulates stale rules, contradictions, and outdated decisions. It doesn't know that the voice setting from January was overridden in March. It retrieves both and the LLM picks randomly. Governed memory solves this.
Conflict Detection
agentmem finds memories that contradict each other:
- Detects topic overlap (Jaccard similarity)
- Separates duplicates from contradictions
- Sentence-level negation matching (not just keyword scanning)
- Severity:
critical(both active) vswarning(one deprecated)
Staleness Detection
Finds outdated memories by:
- Age (not updated in N days)
- Source file missing (referenced file was deleted)
- Hash drift (source file content changed but memory wasn't updated)
Health Check
Scores your memory system 0-100 based on: conflicts, stale percentage, orphaned references, deprecated weight, and whether you have any validated memories.
Provenance-Aware Sync
Sync canonical markdown files into the DB with source tracking:
The sync engine:
- Same hash = skip (idempotent, re-running changes nothing)
- Different hash = update (source file changed)
- Section removed = deprecate (with reason)
- Section restored = resurrect (reactivates deprecated memory)
Three Interfaces
Python API
CLI
MCP Server
Built-in Model Context Protocol server for Claude Code, Cursor, and any MCP client.
Claude Code config (.claude/settings.json):
MCP tools: add_memory, search_memory, recall_memory, update_memory, delete_memory, list_memories, save_session, load_session, promote_memory, deprecate_memory, supersede_memory, memory_health, memory_conflicts
Tell your agent how to use memory: Copy the agent instructions into your CLAUDE.md, .cursorrules, or AGENTS.md. This teaches your agent the session protocol, trust hierarchy, and when to search vs add.
Typed Memory
Seven types that cover real agent workflows:
Trust-Ranked Recall
recall() doesn't just find relevant memories. It finds the most trustworthy relevant memories:
- FTS5 search returns candidates
- Each scored:
relevance (25%) + trust status (20%) + provenance (20%) + recency (15%) + frequency (10%) + confidence (10%) - Validated canonical memories rank above unprovenanced hypothesis memories
- Deprecated and superseded memories are excluded entirely
- Packed greedily into your token budget
Project Scoping
Battle-Tested
This isn't theoretical. agentmem was built under production pressure over 2+ months of daily use:
- 65+ YouTube Shorts produced with zero repeated production bugs
- 330+ memories governing voice generation, FFmpeg assembly, image prompting, upload workflows
- Every bug caught once, fixed once, never repeated
- Governance engine reduced conflicts from 1,848 false positives to 11 real findings
How It Works
- Storage: SQLite with WAL mode (concurrent reads, thread-safe)
- Search: FTS5 with porter stemming and unicode61 tokenizer
- Ranking: Composite score: text relevance + trust status + provenance + recency + frequency + confidence
- Governance: Status lifecycle, conflict detection, staleness detection, health scoring
- Sync: Provenance-aware with source hashing and resurrection
- Zero infrastructure: No API keys, no cloud, no vector DB. Just a
.dbfile.
License
MIT
来源:README.md,提交 f0b4961
工具
0版本历史
1- v0.2.5最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分