CLI-first persistent memory for AI coding sessions with direct Obsidian note writing and local fallback storage.
Project description
agent-mem
CLI-first persistent memory for AI coding sessions.
agent-mem saves structured session summaries either directly into an Obsidian vault as normal Markdown notes or into a local fallback store inside the project. It is designed to reduce context bloat, preserve decisions, and make recall usable even when IDE or MCP automation is unreliable.
Install
pip install easy-agent-mem
Optional MCP support:
pip install "easy-agent-mem[mcp]"
What It Does
- connects to an Obsidian vault during setup
- writes Obsidian-friendly
.mdnotes directly into the vault - creates graph-friendly wiki-links and YAML frontmatter
- keeps a local
.agent-memory/memory.mdfallback when Obsidian is not configured - provides CLI commands to save and recall context without depending on IDE prompt rules
Quick Start
agent-mem init
During init:
- if you provide an Obsidian vault path, notes are written to:
<vault>/Memory/Agent-Mem/
- if you skip the vault path, memory is stored locally in:
.agent-memory/memory.md
After setup:
agent-mem summarize --summary "## Goal
Ship the release.
## Key decisions
- Use Obsidian as primary storage.
## Open tasks
- Publish 0.4.0"
Then recall it later:
agent-mem recall "release status"
Obsidian Mode
When connected to Obsidian, agent-mem writes real Markdown notes directly into your vault. You do not need a plugin. Obsidian sees the notes automatically because they live inside the vault folder.
Current layout:
<vault>/
Memory/
Agent-Mem/
Index.md
project-name-YYYY-MM-DD_HH-MM-session.md
Session notes include:
- YAML frontmatter
- wiki-links like
[[project-name]] - file links like
[[File - src/agent_mem/memory.py]] - task links like
[[Task - publish 0.4.0]]
Commands
agent-mem init
agent-mem summarize --summary "..."
agent-mem summarize --summary-file session.md
cat summary.md | agent-mem summarize --stdin
agent-mem recall "auth decisions"
agent-mem status
agent-mem setup-vscode
agent-mem print-mcp-json
agent-mem serve
IDE Usage
The core product works without MCP.
Recommended flow:
- run
agent-mem init - add
AGENT-MEM-RULES.mdto your IDE custom instructions - use
agent-mem summarizeto save milestones - use
agent-mem recallto reload context
If you want MCP integration, install the optional extra and use:
agent-mem setup-vscode
Status
agent-mem is intentionally simple:
- Obsidian is just a Markdown vault
- the CLI writes notes directly
- fallback mode stays fully usable without Obsidian
The design goal is reliable context preservation first, deeper automation second.
Links
License
MIT
Project details
Release history Release notifications | RSS feed
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 easy_agent_mem-0.4.1.tar.gz.
File metadata
- Download URL: easy_agent_mem-0.4.1.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
456c2f5f8ff3dc68418f5e0fedbee9a921c6c26518ba70e692ed011b1713bd1a
|
|
| MD5 |
c3588eb1029fb7a2333423a227922d71
|
|
| BLAKE2b-256 |
0dc71922ca7f0523ca2ccca1440bc97c542ab69ed0019e9ec01f2b6bfad5bf0c
|
File details
Details for the file easy_agent_mem-0.4.1-py3-none-any.whl.
File metadata
- Download URL: easy_agent_mem-0.4.1-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3e616a9c07087b2a8335ac881d071e00e81d71599318aa345f455d2200e247
|
|
| MD5 |
c7460f51151e4fa252b62392314180d0
|
|
| BLAKE2b-256 |
df4c0b23e1d6e6f84bfd2c7041f5c7dfeaa59295691545860912194b52aad0d2
|