agents-memory
Local markdown memory & cross-agent context engine for AI coding assistants.
One persistent identity, shared across Claude Code, Cursor, Antigravity, and Zed.
Quickstart
1-Step Setup
pip install agents-memory && agents-memory sync --init
Scaffolds ~/.agents/memory/, autowires MCP configurations into your installed IDEs, and registers assistant skills.
[!TIP] 🤖 Agent-Driven Setup (Zero Friction):
Simply tell your coding agent: "Install and set up agents-memory for me."
The agent installs the package, asks your stack preferences once, fills yourUSER.mdprofile, and registers your repositories autonomously.
Source checkouts can also be installed and managed using vand.
Why .agents/memory?
The name agents-memory comes directly from its universal storage standard: .agents/memory.
- Global:
~/.agents/memory/stores your persistent identity, stack defaults, durable concepts, and project index. - Repository:
<repo>/.agents/memory/stores repo-specific facts, architecture ADRs, and staging inboxes.
While AI vendors fragment their configuration across proprietary stores, .agents/ provides a single, open, vendor-neutral filesystem hub for all agent configurations and shared intelligence.
agents-memory delivers this with a pure Markdown-first architecture:
- Local & Offline: Your identity and repo memory live in plain files (
~/.agents/memory/and<repo>/.agents/memory/). - Human-Readable & Git-Friendly: Edit with any text editor, diff with git, commit when you want.
- Universal MCP Server: Exposes memory tools (
search_memory,add_memory,get_project_memories,distill_batch,get_baton,set_baton,append_chronicle,session_snap,session_grep,search_hybrid,get_related,suggest_links,check_memory_freshness) to all modern agents. - Ranked Hybrid Retrieval: Exact-substring precision first with SQLite FTS5 fallback and bidirectional wikilink relation navigation.
- Autonomous Ingest & Distillation: Extracts durable rules and architecture decisions from session logs (OpenAI, Claude, Cursor, Copilot, Antigravity, Pi).
Architecture & Flow
┌─────────────────────────────────────────────────────────────┐
│ SESSION INGEST │
│ OpenAI Exports · Claude JSONL · Cursor · Antigravity · Pi │
└──────────────────────────────┬──────────────────────────────┘
│ ingest catalog / extract
▼
┌─────────────────────────────────────────────────────────────┐
│ STAGING INBOX │
│ Raw captured bullets & noise-filtered facts │
└──────────────────────────────┬──────────────────────────────┘
│ distill_batch / skill
▼
┌─────────────────────────────────────────────────────────────┐
│ LOCAL MEMORY STORE │
│ ~/.agents/memory/USER.md ~/.agents/memory/PROJECTS.md │
│ ~/.agents/memory/concepts/ <repo>/.agents/memory/ │
└──────────────┬───────────────────────────────┬──────────────┘
│ │
▼ ▼
┌─────────────────────────────┐ ┌─────────────────────────────┐
│ IDE INJECTION │ │ MCP SERVER & CLERK │
│ Cursor Rules · Zed Context │ │ search_memory · add_memory │
│ Antigravity AGENTS.md │ │ Universal Tool Integration │
└─────────────────────────────┘ └─────────────────────────────┘
CLI Reference
| Command | Purpose |
|---|---|
agents-memory sync |
Updates canonical AGENTS.md, host rules, and MCP registrations |
agents-memory sync --init |
First-time scaffolding, example creation, and host discovery |
agents-memory inventory |
Discovers unregistered local repositories across workspace roots |
agents-memory inventory --register SLUG PATH ROLE STACK |
Registers a new repository |
agents-memory ingest catalog |
Indexes local chat transcripts across all supported providers |
agents-memory ingest extract |
Runs heuristic filters to extract durable facts into staging |
agents-memory distill |
Inspects staging inbox for distillation |
agents-memory check |
Zero-AI mechanical store health checks (stubs, duplicates, leaks) |
agents-memory rebuild-index |
Rebuilds the disposable local SQLite FTS5 search index |
agents-memory serve |
Starts local interactive memory browser on localhost:8765 |
agents-memory web |
Exports static HTML documentation site for your memory store |
agents-memory consolidate |
Ensures no private state leaked into working repository |
MCP Tools Reference
| Tool | Parameters | Description |
|---|---|---|
search_memory |
query, project, limit |
Exact-substring precision first with ranked SQLite FTS5 fallback. |
add_memory |
fact, kind, name, project |
Proactively save durable facts, concepts, ADRs, or rules directly to memory. |
get_project_memories |
project, cwd |
Retrieve project-specific facts, architecture decisions, and active work files. |
get_staging_inbox |
None | Retrieve unreviewed captured bullets across user and project staging files. |
distill_batch |
items_json |
Batch promote durable facts to permanent files or discard throwaway noise. |
promote_bullet |
bullet, kind, name, project |
Promote a single staging bullet to permanent memory. |
get_baton |
project, cwd |
Read the active session baton handover note for context continuity. |
set_baton |
text, project, cwd |
Update the session baton handover note for the next agent session. |
append_chronicle |
beat, project, emoji, refs |
Record a major milestone or beat in the project's temporal chronicle. |
session_snap |
limit, project, cwd |
Snapshot recent user query history and active session baton. |
session_grep |
pattern, since, project |
Fast regex search across indexed session transcripts. |
session_tail |
session_id, limit |
Tail recent user interaction lines from session logs. |
search_hybrid |
query, limit |
Hybrid search combining SQLite FTS5 text rank with wikilink relations. |
get_related |
file_path, depth |
Traverse explicit wikilink relations, references, and backlinks. |
check_memory_freshness |
None | Mechanical audit of staging backlog and stale project batons. |
Supported Ecosystem
- Claude Code: Bound via symlink / canonical
AGENTS.mdand MCP server. - Google Antigravity: Integrated via
.gemini/configrules andagents-memoryMCP. - Cursor: Automatically injects rules and configures
.cursor/mcp.json. - Zed: Configures
context_serversand mirrors assistant skills. - VS Code / Copilot: Ingests session history from local state databases.
Also compatible with: Windsurf, Cline, Roo-Code, Aider, Continue.dev, OpenAI ChatGPT, Pi, Goose, and any MCP-compliant AI assistant.
Open ABI Specification
The formal, implementation-agnostic layout specification lives in abi/:
abi/WHY.md— Architecture decisions & why Markdown wins over RAG.abi/LAYOUT.md— Directory taxonomy and path contracts.abi/KINDS.md— Typed memory taxonomy (concepts,facts,decisions).abi/HYGIENE.md— Store hygiene doctrine, anti-bloat rules, and health checks.abi/MCP.md— Tool surface definitions and request/response specifications.abi/INGEST.md— Catalog, extract, and distillation pipeline.abi/INJECTION.md— Host rule injection mechanisms.
Testing & Verification
Run the comprehensive test suite and distillation benchmark:
python tests/run_all_tests.py
License
MIT License. See LICENSE for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agents_memory-1.0.2.tar.gz.
File metadata
- Download URL: agents_memory-1.0.2.tar.gz
- Upload date:
- Size: 118.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e46d0d7c9a08e51328ac6a9f4fb78b545bfa3b35e25e35a27dd2bffa890c8283
|
|
| MD5 |
2800c9e67b24421d1f88d08fc3c4335f
|
|
| BLAKE2b-256 |
16d63a45493eb7c72fea3231ac0cc042424a40605674df55e2b728efd23b70b0
|
File details
Details for the file agents_memory-1.0.2-py3-none-any.whl.
File metadata
- Download URL: agents_memory-1.0.2-py3-none-any.whl
- Upload date:
- Size: 115.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.10.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3ca0d65b14211216893a940d28457e853c4246d500be94274d7fc553e6fe3f1
|
|
| MD5 |
7a1a7de09b0a79b3862c64246c88334f
|
|
| BLAKE2b-256 |
7a080d742c5794567dbe80eaca801189030826c56b629e56b5e0183eef818076
|