
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 分