
Store and retrieve entities, relations and observations in a persistent local knowledge graph.

A built-in Model Context Protocol server that gives coding agents persistent, trust-ranked memory with lifecycle states, conflict and staleness detection, and health scoring, backed by a local SQLite database.
agentmem: governed shared memory MCP server is cataloged as an MCP server attributed to thezenmonster. A built-in Model Context Protocol server that gives coding agents persistent, trust-ranked memory with lifecycle states, conflict and staleness detection, and health scoring, backed by a local SQLite database. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for agentmem: governed shared memory MCP server are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes. The server uses a local SQLite database with no API keys, cloud service, or vector database required.
It runs an FTS5 search, scores candidates by relevance, trust status, provenance, recency, frequency, and confidence, then packs results into the token budget while excluding deprecated and superseded memories.
README.md · f0b496178c99 · Fetched 2026-11-13 10:39:22 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
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.
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.
pip install quilmem[mcp]
agentmem init --tool claude --project myapp
That's it. Restart your editor. Your agent now has 13 memory tools. Run memory_health to confirm.
Python-only?
pip install quilmemworks without the MCP extra. See the Python API below.
from agentmem import Memory
mem = Memory()
# Store typed memories
mem.add(type="bug", title="loudnorm undoes SFX levels",
content="Never apply loudnorm to final mix. It re-normalizes everything.",
status="validated")
mem.add(type="decision", title="Use per-line atempo",
content="Bake speed into per-line TTS. No global pass.",
status="active")
# Something you're not sure about yet
hypothesis = mem.add(type="decision", title="Maybe try 2-second gaps before CTA",
content="Hypothesis from last session. Needs testing.",
status="hypothesis")
# Search — validated and active memories rank highest.
# Deprecated and superseded memories are excluded automatically.
results = mem.search("audio mixing")
# Context-budgeted recall — fits the best memories into your token limit
context = mem.recall("building a narration track", max_tokens=2000)
# Lifecycle — promote what's proven, deprecate what's not
mem.promote(hypothesis.id) # hypothesis -> active -> validated
mem.deprecate(hypothesis.id, reason="Disproven by data")
# Supersede: replace an outdated memory with a newer one
replacement = mem.add(type="decision", title="Use 1-second gaps before CTA",
content="Confirmed by A/B test.", status="active")
mem.supersede(hypothesis.id, replacement.id) # old points to replacement
# Health check — is your memory system trustworthy?
from agentmem import health_check
report = health_check(mem._conn)
# Health: 85/100 | Conflicts: 0 | Stale: 2 | Validated: 14
Other memory tools store things. agentmem knows what's still true.
| Mem0 | Letta | Mengram | agentmem | |
|---|---|---|---|---|
| Memory storage | Yes | Yes | Yes | Yes |
| Full-text search | Vector | Agent-driven | Knowledge graph | FTS5 |
| Memory lifecycle states | No | Partial | No | hypothesis -> active -> validated -> deprecated -> superseded |
| Conflict detection | No | No | Partial | Built-in |
| Staleness detection | No | No | No | Built-in |
| Health scoring | No | No | No | Built-in |
| Provenance tracking | No | No | No | source_path + source_hash |
| Trust-ranked recall | No | No | No | Validated > active > hypothesis |
| Human-readable source files | No | No | No | Canonical markdown |
| Local-first, zero infrastructure | No | Self-host option | Self-host option | Yes, always |
| MCP server | Separate | Separate | Yes | Built-in |
The core idea: every memory has a status that tracks how much you should trust it.
hypothesis New observation. Not yet confirmed. Lowest trust in recall.
|
active Default. Currently believed true. Normal trust.
|
validated Explicitly confirmed. Highest trust in recall.
deprecated Was true, no longer. Excluded from recall. Kept for history.
superseded Replaced by a newer memory. Points to replacement.
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.
from agentmem import detect_conflicts
conflicts = detect_conflicts(mem._conn)
# Found 2 conflict(s):
# !! [decision] "Always apply loudnorm to voice"
# vs [decision] "NEVER apply loudnorm to voice"
# Contradiction on shared topic (voice, loudnorm, audio)
agentmem finds memories that contradict each other:
critical (both active) vs warning (one deprecated)from agentmem import detect_stale
stale = detect_stale(mem._conn, stale_days=30)
# [decision] "Use atempo 0.90" — Source changed since import (hash mismatch)
# [bug] "Firewall blocks port" — Not updated in 45 days
Finds outdated memories by:
from agentmem import health_check
report = health_check(mem._conn)
print(f"Health: {report.health_score}/100")
print(f"Conflicts: {len(report.conflicts)}")
print(f"Stale: {len(report.stale)}")
Scores your memory system 0-100 based on: conflicts, stale percentage, orphaned references, deprecated weight, and whether you have any validated memories.
Sync canonical markdown files into the DB with source tracking:
# Each memory tracks where it came from
mem.add(type="bug", title="loudnorm lifts noise",
content="...",
source_path="/docs/errors.md",
source_section="Audio Bugs",
source_hash="a1b2c3d4e5f6")
The sync engine:
from agentmem import Memory
mem = Memory("./my-agent.db", project="frontend")
# CRUD
record = mem.add(type="decision", title="Use TypeScript", content="...")
mem.get(record.id)
mem.update(record.id, content="Updated reasoning.")
mem.delete(record.id)
mem.list(type="bug", limit=20)
# Search + recall
results = mem.search("typescript migration", type="decision")
context = mem.recall("setting up the build", max_tokens=3000)
# Governance
mem.promote(record.id) # hypothesis -> active -> validated
mem.deprecate(record.id, reason="No longer relevant")
replacement = mem.add(type="decision", title="Use v2 approach", content="...")
mem.supersede(record.id, replacement.id) # links old to replacement
# Session persistence
mem.save_session("Working on auth refactor. Blocked on token refresh.")
mem.load_session() # picks up where last instance left off
# Health
mem.stats()
# Get started in 30 seconds
agentmem init --tool claude --project myapp
# Check if everything's working
agentmem doctor
# Core
agentmem add --type bug --title "CSS grid issue" "Flexbox fallback needed"
agentmem search "grid layout"
agentmem recall "frontend styling" --tokens 2000
# Governance
agentmem promote <id>
agentmem deprecate <id> --reason "Fixed in v2.3"
agentmem health
agentmem conflicts
agentmem stale --days 14
# Import + sessions
agentmem import ./errors.md --type bug
agentmem save-session "Finished auth module, starting tests"
agentmem load-session
# MCP server
agentmem serve
Built-in Model Context Protocol server for Claude Code, Cursor, and any MCP client.
pip install quilmem[mcp]
Claude Code config (.claude/settings.json):
{
"mcpServers": {
"agentmem": {
"command": "agentmem",
"args": ["--db", "./memory.db", "--project", "myproject", "serve"],
"type": "stdio"
}
}
}
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.
Seven types that cover real agent workflows:
| Type | What it stores | Example |
|---|---|---|
setting | Configuration, parameters | "Voice speed: atempo 1.08" |
bug | Errors and their fixes | "loudnorm lifts noise floor" |
decision | Rules, policies, choices | "3rd-person narration banned" |
procedure | Workflows, pipelines | "TTS -> speed -> 48kHz -> mix" |
context | Background knowledge | "Project uses FFmpeg + Python 3.11" |
feedback | User corrections | "Always pick, don't ask" |
session | Current work state | "Working on auth. Blocked on tokens." |
recall() doesn't just find relevant memories. It finds the most trustworthy relevant memories:
relevance (25%) + trust status (20%) + provenance (20%) + recency (15%) + frequency (10%) + confidence (10%)frontend = Memory("./shared.db", project="frontend")
backend = Memory("./shared.db", project="backend")
frontend.search("bug") # Only frontend bugs
backend.search("bug") # Only backend bugs
This isn't theoretical. agentmem was built under production pressure over 2+ months of daily use:
.db file.MIT
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for agentmem: governed shared memory MCP server from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/agentmem)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

Organize problem solving into revisable, branching thought steps through an MCP tool.

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.