projectmem
llms.txt850 starsChanged 58 days agoMITView on GitHub
projectmem is coding agent memory: a free, open-source (MIT), local-first memory and judgment layer for AI coding agents. It records what happened while building a project — issues, attempts, fixes, decisions and notes — as typed events in plain text, feeds that history back to the agent through a native MCP server, and warns at git commit time before you repeat an approach that already failed. Runs entirely on your machine: no cloud, no account, no telemetry. Install: pip install…
- Installs packages
The file
Files
# projectmem
> projectmem is **coding agent memory**: a free, open-source (MIT), local-first
> memory and judgment layer for AI coding agents. It records what happened while
> building a project — issues, attempts, fixes, decisions and notes — as typed
> events in plain text, feeds that history back to the agent through a native
> MCP server, and warns at git commit time before you repeat an approach that
> already failed. Runs entirely on your machine: no cloud, no account, no
> telemetry. Install: `pip install projectmem`
## What is coding agent memory?
Coding agent memory is a persistent record of what happened while building a
project — the issues hit, the approaches attempted, the fixes that worked and
the decisions made — stored so an AI coding agent can read it at the start of a
new session. Large language models are stateless, so without a memory layer
every session begins from zero: the agent re-reads the codebase to rebuild
context it already had, asks questions that were already answered, and proposes
approaches that already failed.
## How projectmem differs from chat-history memory
Most agent-memory tools store conversation history and retrieve semantically
similar passages. projectmem stores **typed events** — `issue`, `attempt`,
`fix`, `decision`, `note` — with outcomes attached. That structure is what makes
deterministic queries possible: "has this file failed before, and how?" is a
lookup, not a similarity search. It is also what enables the pre-commit warning,
built from the project's own recorded failures.
projectmem never deletes a memory. When git history moves past a recorded
decision, the memory is flagged as possibly stale and you confirm or supersede
it — as opposed to decay-based pruning or in-place fact rewriting.
## Core facts
- **License:** MIT
- **Language:** Python 3.10+
- **Install:** `pip install projectmem`
- **CLI:** `pjm` (alias: `projectmem`)
- **Storage:** `.projectmem/` inside your repository — append-only `events.jsonl`
plus distilled `summary.md`, `PROJECT_MAP.md`, `plan.md`
- **Cross-project store:** `~/.projectmem/global/` for library gotchas that carry
between repositories
- **MCP server:** 17 tools, verified end-to-end on Claude Desktop, Cursor,
Antigravity and Codex
- **Network use:** none, apart from an update check you turn on yourself
(`pjm doctor --online` or `--auto`). The MCP server is a stdio subprocess your
AI client spawns. The only optional server is `pjm dashboard --serve`, an ephemeral
local viewer.
- **Paper:** arXiv:2606.12329
## Getting started
```bash
pip install projectmem # 1. install (Python 3.10+)
cd your-project
pjm init # 2. creates .projectmem/, git hooks, and prints
# an MCP config with absolute paths filled in
# 3. paste that config into your AI client, then fully quit and reopen it
pjm brief # 4. one-screen status check
```
## Key commands
- `pjm init` — initialise memory in the current repository
- `pjm brief` — session-start briefing: warnings, stale memories, open issues, score
- `pjm show` — print the distilled summary
- `pjm precheck` — check staged files against failure history (runs from the git hook)
- `pjm score` — prevention score A+ to F, with hours and tokens saved
- `pjm search <query>` — search across all events
- `pjm dashboard` — cross-project view of every registered repository
- `pjm export --claude-md` — write memory into CLAUDE.md for agents without MCP
## MCP tools (17)
`get_instructions`, `get_summary`, `get_project_map`, `get_plan`, `get_context`,
`get_issue`, `get_score`, `get_global_gotchas`, `search_events`, `precheck_file`,
`list_projects`, `current_project`, `log_issue`, `record_attempt`, `record_fix`,
`add_decision`, `add_note`
## Common questions
**What is the best open source memory for AI coding agents?**
It depends on which memory your agent is missing. Code-structure tools map the
codebase, chat-memory tools such as mem0 store user and conversation facts, and
projectmem records engineering history — issues, attempts, fixes and decisions —
and warns before your agent repeats an approach that already failed in that
project. projectmem runs entirely locally.
**Does projectmem send my code anywhere?**
No. Memory is written to a plain directory in your repository. There is no
account, no telemetry and no cloud sync.
**How is this different from CLAUDE.md or .cursorrules?**
Those hold static rules — how to work in a repo. projectmem holds dynamic
history — what actually happened, including approaches that failed. They
complement each other, and `pjm export --claude-md` writes memory into CLAUDE.md
for agents without MCP support.
**Do I need to run a server or database?**
No. The MCP server is a stdio subprocess your AI client starts and stops.
**Which AI tools does it work with?**
Any MCP client. Claude Code, Claude Desktop, Cursor, Antigravity and Codex are
verified end-to-end. Agents without MCP can read the exported CLAUDE.md or
`.cursorrules` block.
**Does it work without MCP?**
Yes. `pjm export --claude-md` and `pjm wrap` inject memory as plain text for any
agent, and git hooks capture events with no AI involvement at all.
## Links
- Website: https://projectmem.dev
- Guide: https://projectmem.dev/guide
- FAQ: https://projectmem.dev/faq
- Full markdown corpus for crawlers: https://projectmem.dev/llms-full.txt
- Source: https://github.com/riponcm/projectmem
- Package: https://pypi.org/project/projectmem/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

