Persistent memory layer for AI coding agents (Cursor / VS Code). Auto-summarizes sessions to Markdown / Obsidian.
Project description
agent-mem
Persistent memory layer for AI coding agents (Cursor, VS Code + Claude Code, etc.)
Tired of repeating context every time you start a new chat?
agent-mem automatically maintains a clean project memory file so your agent always knows what happened before - without bloating the context window.
Features
- Simple local fallback:
.agent-memory/memory.md - Optional Obsidian vault support (with full graph view, backlinks, Canvas)
- Auto-generates strong agent instruction rules
- Zero extra models or API keys needed
- Works with any MCP-compatible IDE (Cursor, VS Code, etc.)
- Extremely lightweight
Installation
pip install easy-agent-mem
Quick Start
# 1. One-time setup
agent-mem init
# 2. (Recommended) Add the generated rules to your IDE
# - Cursor: Settings -> Custom Instructions
# - VS Code: Create CLAUDE.md or .claude/instructions.md in project root
During init you can:
- Provide an Obsidian vault path (optional)
- Or just press Enter to use the simple local
.agent-memory/memory.mdfallback
How It Works
-
agent-mem initcreates:AGENT-MEM-RULES.md(strong instructions for the agent).agent-memory/memory.md(or Obsidian notes)
-
Add the rules from
AGENT-MEM-RULES.mdto your IDE's custom instructions. -
From then on, your agent will:
- Read memory first in every new chat
- Summarize sessions when context gets long
- Keep a clean, persistent project history
Example Usage in Chat
Tell your agent:
"Summarize this session for memory"
It will create a clean summary and append it to memory. Then start a fresh chat - the agent will automatically load the latest memory.
Commands
agent-mem init # Setup (Obsidian optional)
agent-mem status # Show current config
agent-mem --help # Full help
Project 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.3.0.tar.gz.
File metadata
- Download URL: easy_agent_mem-0.3.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60b7bff3d12484e92c8b4e98cfd2cebfc6da3eb92e91caff2503482f5f811215
|
|
| MD5 |
e3810e786310e9d95579651818f4c4f3
|
|
| BLAKE2b-256 |
a8bc26bfb672c6e9ff84ce4042fb5b26d6b14dfb9e75c9592cd9b8d7501d83b7
|
File details
Details for the file easy_agent_mem-0.3.0-py3-none-any.whl.
File metadata
- Download URL: easy_agent_mem-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.2 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 |
c07162b32f23f26b1b869e6c7004a3794f4f8c48a657771918b39bda740191d1
|
|
| MD5 |
38fd1f4f4f56e85d4bf22d45d81d649f
|
|
| BLAKE2b-256 |
23571bf3d58fc1d5811723181e612916174093a5978781be6cc240e4ca30a762
|