easy-agent-mem
This MCP server lets an AI coding agent save, query, validate, share, and resume project memory across sessions.
Load saved memory for a project/session with
query_memory.Save durable summaries to Obsidian or fallback memory with
summarize_to_obsidian.List visible recent legacy sessions without exposing private sessions.
Check whether the current session has loaded memory via
session_status.Retrieve task context with citations, constraints, freshness, changed files, and token budget.
Record sourced decisions, constraints, blockers, and evidence files.
Check decisions against changed or missing evidence.
Record and retrieve review findings, fixes, verification results, dismissals, and failed approaches.
Explicitly share a visible private record across linked worktrees/sessions.
Get a durable session handoff handle to resume private memory in a new connection.
Uses Obsidian-native storage and export, generating Markdown knowledge docs with wiki-links and YAML frontmatter and building project knowledge graphs under agent-mem-output/.
agent-mem

Automatic context compression and persistent memory for AI coding agents.
agent-mem saves coding decisions, constraints and session context so you can continue work across chats. Search previous decisions, check whether their supporting files have changed, and carry relevant context into your next session.
MCP and skill listings
Agensi is in review. MCP Market has separate server and skill submissions in its free queue. mcp.tc is waiting for human review. Pending links open the creator dashboard, submission forms, or status receipt; they are not approved listing pages.
All listings, approval checks and platform links. Status labels were checked on 4 November 2026 and are updated manually.
Related MCP server: coster
Why Use agent-mem
Preserve critical context between chats and sessions
Reduce token waste from repeating project history
Keep technical decisions and blockers traceable
Generate a searchable Obsidian-native knowledge graph from code + memory
Core Features
Save decisions, constraints and blockers with their sources and supporting files
Check saved decisions for changed or missing evidence
Retrieve relevant context with citations and a token budget
Keep memory separate across repositories, branches, worktrees and sessions
Resume sessions with durable handoffs and explicitly share selected records
Track review findings, fixes, verification results and failed approaches
Export structured memory to Markdown or Obsidian
Smart
watchmode with file + git + idle detectionOne-paste handoff prompts (Groq-powered, optional)
Cross-IDE context migration (
agent-mem migrate) for Cursor, Claude (VS Code), and OpenCodeObsidian-first storage with wiki-links and YAML frontmatter
Local fallback mode (
.agent-memory/) when Obsidian is not configuredgraphcommand builds project knowledge docs from code + memory + chat contextCall graph extraction — tracks which functions call which across the codebase
Multi-language extraction — Python (AST) + TypeScript/JavaScript (tree-sitter, optional)
MCP session gate — warns agents that skip
query_memorybefore summarizingClaude Code enforcement hook —
UserPromptSubmithook auto-injects memory context every promptBenchmark command —
graph benchmarkmeasures extraction Precision/Recall/F1 against ground truthTerminal UI —
agent-mem tuiopens an interactive status/memory/benchmark dashboardIncremental graph parse cache for faster rebuilds on unchanged files
Installation
pip install easy-agent-mem
# Install 0.8.0 from GitHub
pip install "git+https://github.com/atharvavdeo/agent-mem.git@v0.8.0"Optional extras:
pip install 'easy-agent-mem[tui]' # terminal UI (agent-mem tui)
pip install 'easy-agent-mem[multilang]' # TypeScript/JavaScript extraction via tree-sitter
pip install 'easy-agent-mem[mcp]' # MCP server support
pip install 'easy-agent-mem[context] @ git+https://github.com/atharvavdeo/agent-mem.git@v0.8.0' # token countingQuick Start
agent-mem init
agent-mem configure-groq # optional for enrich/watch handoff generation
agent-mem migrate --dry-run cursor .
agent-mem watch # start automatic handoff modeAfter initialization, use agent-mem status to verify storage mode, graph output readiness, and Groq configuration status.
How To Use (Practical Flows)
1) First-Time Setup
agent-mem init
agent-mem status
agent-mem setup-vscode # optional if you want .vscode/mcp.json generated directly
agent-mem configure-groq # optional, enables watch handoff and graph enrich2) Import Context From Other IDE Chats
agent-mem migrate --dry-run cursor .
agent-mem migrate --full cursor claude .3) Generate Project Knowledge Graph
agent-mem graph build --compact
agent-mem graph build --compact --enrich4) Automated Handoff Watcher
agent-mem watch --dry-run --once
agent-mem watch5) MCP / IDE Integration Helpers
agent-mem print-mcp-json
agent-mem serve --force-stdio # only for debugging MCP startup manuallyKnowledge Graph (agent-mem graph)
Generate Obsidian-native docs into agent-mem-output/:
agent-mem graph buildUse optional flags:
agent-mem graph build --compact
agent-mem graph build --enrich
agent-mem graph build --compact --enrich
agent-mem graph build --exclude-file-pattern "tests/*" --exclude-file-pattern "**/migrations/*.py"Graph Flags
Flag | Description |
| Trims long concept/function lists, keeps dashboard/report complete, and writes full lists to |
| Adds inferred concepts/relationships via Groq; deterministic graph output is still generated if enrichment fails |
| Excludes files by glob pattern; repeatable and useful for tests/generated/vendor paths |
Migration (agent-mem migrate)
Bring context from other IDE chat stores into your current project memory.
What It Does
Extracts recognizable chat sessions from Cursor, Claude (VS Code), and OpenCode
Compresses extracted context into agent-mem structured summary format
In
--fullmode, saves summary to memory and generates a one-paste handoff promptWrites portable markdown backups under
.agent-memory/migrations/Supports safe simulation with
--dry-run
Examples
agent-mem migrate
agent-mem migrate cursor .
agent-mem migrate --extract-only cursor claude .
agent-mem migrate --full cursor claude .
agent-mem migrate --dry-run cursor .
agent-mem migrate --full cursor .
agent-mem migrate --dry-run --full cursor claude opencode .Modes
--extract-only: extract + backup only (default for direct CLI usage)--full: extract + save summary to memory + generate handoff + backup--dry-run: no file writes, prints preview summary/handoff output
Commands Overview
Setup and Configuration
Command | Description | Example |
| Interactive first-time setup for storage + IDE instruction files + MCP config hints |
|
| Re-run instruction + MCP config setup for current project |
|
| Write |
|
| Print MCP JSON block for manual paste into IDE config |
|
| Save Groq API key and optional model |
|
| Show storage mode, graph readiness, and Groq status |
|
Memory and Continuity
Command | Description | Example |
| Save a structured session summary into memory |
|
| Update compact active handoff context file |
|
| Print starter block for a fresh follow-up chat |
|
| Search saved memory for relevant context |
|
| Save a decision, constraint or blocker from JSON |
|
| List private and explicitly shared records |
|
| Find decisions affected by changed files |
|
| Retrieve relevant context with citations and a token budget |
|
| Save the current session checkpoint |
|
| Resume a saved session in a new chat |
|
| Share a selected record across linked worktrees |
|
| Export session memory to Markdown |
|
| Record a finding, dismissal, fix, verification or failed approach |
|
| Retrieve review history and failed approaches |
|
Migration
Command | Description | Example |
| Extract and convert IDE chat history into summaries/handoff/backups |
|
Graph
Command | Description | Example |
| Generate knowledge graph notes and dashboard |
|
| Measure extraction Precision/Recall/F1 against fixture ground truth |
|
Terminal UI
Command | Description | Example |
| Open interactive terminal dashboard (Status / Memory / Benchmark tabs) |
|
Watch Mode and Handoff Automation
Command | Description | Example |
| Monitor repo activity and generate handoff prompts automatically |
|
| Trigger one immediate handoff generation without waiting for file events |
|
MCP Server
Command | Description | Example |
| Start MCP stdio server (normally launched by IDE, not by hand) |
|
Storage Modes
Obsidian Mode
If Obsidian is configured, notes are written under:
Memory/Agent-Mem/for session and active context notesagent-mem-output/for graph notes
Local Fallback Mode
If Obsidian is unavailable, memory is written to:
.agent-memory/active.md.agent-memory/memory.md.agent-memory/engineering/for structured session records
Set AGENT_MEM_STORAGE_DIR to use a different local directory for structured memory.
What's Fixed in 0.8.0
Change | Use case |
Separate MCP connection state | Keep simultaneous agent sessions independent |
Durable session handles | Reconnect to the same saved session after restarting |
Evidence freshness checks | Review decisions when their supporting files change |
Latest review-result tracking | Show a newer failure instead of an outdated passing result |
Scoped session exports | Keep exports from different branches and sessions separate |
Atomic memory writes | Preserve saved context across interrupted writes |
Improved path handling | Preserve file paths containing spaces in summaries and handoffs |
Credential redaction | Remove configured secrets from stored context |
Project Links
PyPI: easy-agent-mem
GitHub: atharvavdeo/agent-mem
License
MIT
Available Tools
11 toolscheck_decisionsC
Flag changed or missing evidence without rewriting decisions.
Inputs: changed_files (required), session_id.
get_review_memoryC
Retrieve findings, dismissals, fixes and failed approaches without promoting them to proof.
Inputs: goal, session_id.
get_session_handoffC
Return the durable session handle needed to resume private memory in a new connection.
Inputs: goal, session_id.
get_task_contextC
Get whole-record context with citations, constraints, freshness and explicit budget overflow.
Inputs: goal (required), changed_files (required), session_id, token_budget.
list_recent_sessionsC
List legacy notes and summaries visible to this caller; never other private sessions.
Inputs: project_name (required), count, session_id. Returns: result
query_memoryB
Load saved memory before work. Explicit session IDs enable durable scoped continuity.
Inputs: query (required), project_name (required), session_id. Returns: result
record_decisionC
Save a sourced decision/constraint/blocker. Sharing and supersession are explicit.
Inputs: text (required), source (required), evidence_files (required), kind, +5 more.
record_review_outcomeC
Record review/failure evidence. Commands are stored data; verification is caller-reported.
Inputs: kind (required), text (required), source (required), evidence_files (required), +10 more.
session_statusC
Check the memory-loaded state of this session only.
Inputs: session_id. Returns: result
summarize_to_obsidianC
Save a durable summary. MCP/explicit sessions are isolated; direct legacy calls keep Markdown behavior.
Inputs: summary (required), project_name (required), session_id. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have clearly distinct scopes: retrieval (query_memory, get_task_context, get_review_memory, get_session_handoff), writing (record_decision, record_review_outcome, summarize_to_obsidian), and session inspection (session_status, list_recent_sessions). There is some adjacency among the three retrieval tools and between session_status and get_session_handoff, but the descriptions give enough signals (citations/budget vs. raw memory vs. review findings vs. session handle) to pick correctly.
Predominantly consistent verb_noun snake_case (record_decision, query_memory, get_review_memory, check_decisions, list_recent_sessions). Minor deviations exist: session_status is a bare noun phrase with no verb, and summarize_to_obsidian adds a preposition plus a backend-specific name, which is less predictable than the rest.
Eleven tools is well within a healthy range and each maps to a concrete memory-lifecycle action (record, query, verify, share, summarize, handoff, inspect session). No redundant near-duplicates bloat the surface.
Core read/write paths for decisions, review evidence, sharing, summaries, and session handoff are covered. However, there is no explicit delete/forget/prune or supersede operation for a memory system where stale or private data must be removed, and check_decisions flags problems without any tool to resolve them, leaving dead ends.
Maintenance
Related MCP Connectors
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
Private-by-default, local-first memory/context/task orchestrator for MCP apps and agents.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenancePersistent memory MCP server that remembers decisions and context across coding sessions, automatically logging and surfacing relevant knowledge as you work.12 npmMIT
- AlicenseNot gradedqualityCmaintenanceMCP server that provides offline-first, persistent memory for AI coding assistants. It captures project decisions and conventions into a local SQLite database and syncs them to tool-specific memory files like CLAUDE.md and AGENTS.md.4 npmMIT
- AlicenseAqualityBmaintenanceSession memory for AI coding agents. Records decisions, dead ends and assumptions as they happen, makes them greppable, and tells you when what you wrote stops being true. MCP server for Claude Code.111Apache 2.0
- AlicenseNot gradedqualityAmaintenanceProvides a local stdio MCP server that gives AI coding agents a typed, temporal, evidence-backed memory on embedded SQLite, letting them record decisions and constraints, ask why something happened, navigate memory by time, trace proof paths between refs, and export or supersede stored state without rewriting it. It also exposes read-only ChronoLoom view tools so a person and their agent can steer the same multidimensional memory view by semantic intent rather than raw coordinates.Apache 2.0