
agentmem
io.github.ThezenmonsterPublished by GitHub account Thezenmonsterv0.2.5Updated Oct 24, 2026
Governed memory for coding agents. Trust lifecycle, conflict detection, health scoring.
Overview
Local memory server for coding agents that stores typed project memories with trust states, conflict and staleness detection, and health scoring.
- What you can do
- Add, update, delete and list typed memories (setting, bug, decision, procedure, context, feedback, session) scoped per project
- Search and recall memories, with recall packed into a token budget and ranked by relevance, trust status, provenance and recency
- Govern memories by promoting, deprecating and superseding entries through a hypothesis to active to validated lifecycle
- Save and load session state so an agent can resume where the last session stopped
- Check memory health, conflicts and stale entries
- When to use it
- Useful when a coding assistant keeps repeating old mistakes or mixing outdated rules with current ones across sessions, and you want a local, file-based memory that tracks which notes are still trustworthy.
- Requirements
- Runs as a local stdio process installed from the PyPI package quilmem with the mcp extra; Python is required. No API keys, accounts or cloud services are needed. The database is a local SQLite file, configured with a database path and project name in the client config.
Installation
In SourceWeft
- Open agentmem in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
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
Source: README.md at commit f0b4961
Tools
0Version history
1- v0.2.5LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts