projectmem Coding Memory

Persistent local memory that warns coding agents before they repeat a failed approach.

Stars
★ 868
Last updated
20d ago
License
MIT
Primary language
Python

At a glance

How it runs
CLIMCP server
Works with
Universal · cross-platformCodex · Claude Code · Claude.ai
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
PythonGitAn MCP-compatible client for MCP modeShell / CLILocal filesystemMCP Server
Typical use
A developer who frequently starts fresh coding-agent sessions can preserve yesterday's failed debugging paths, confirmed fixes, and architectural choices instead of reconstructing them from source.
Not a fit if
  • Developers who want a GUI and no terminal or Git hooks
  • Teams unwilling to configure an absolute Python path and cold-restart clients
  • Teams needing cloud sync or memory shared across machines
Source review
74/100 · Some gaps

What does this agent do, and when should you use it?

projectmem is a local-first, event-sourced memory and judgment layer for AI coding agents, recording issues, attempts, fixes, decisions, and notes. Its components include a Python CLI, native MCP server, Git hooks, a file watcher, a project registry, and local project and workspace dashboards. Each repository keeps memory under .projectmem/: raw events go to events.jsonl, while tooling produces distilled summaries, issue files, and a project map for agents to read. Its pre-commit checks combine prior failures, file churn, unresolved issues, and potentially stale memories to warn before a mistake is repeated; older knowledge is flagged or superseded rather than silently erased. It fits developers who want the same project experience available to Claude Code, Claude Desktop, Cursor, Antigravity, Codex, or another MCP client without adopting a cloud account, telemetry service, or persistent database. Adoption still adds Python tooling, Git hooks, local memory artifacts, client configuration, and—in several clients—a full restart whenever the MCP setup changes.

After pjm init, projectmem creates .projectmem/, installs pre-commit warning, post-commit classification, and post-merge tracking hooks, builds the code structure, and starts its real-time watcher. Developers record typed events with pjm log, pjm attempt, pjm fix, pjm decision, and pjm note; pjm regenerate rebuilds summary.md from events.jsonl. MCP clients read context through operations such as get_instructions(), get_summary(), get_project_map(), get_plan(), get_issue(id), and search_events(query), then write experience back with log_issue, record_attempt, record_fix, add_decision, and add_note. Before an edit, an agent can call precheck_file(path); before a commit, pjm precheck surfaces known dead ends, high-churn files, unresolved issues, and file-linked decisions that may have become stale. pjm brief creates a session-opening briefing, pjm context and pjm wrap produce token-budgeted context, and pjm export --claude-md or --cursor serves assistants without MCP. pjm visualize produces a six-tab project dashboard, pjm dashboard aggregates registered repositories, and pjm map --build derives a code structure and Python import graph that can be overlaid with failure heat. Since version 0.3.0, one registry-backed MCP process can route calls across multiple projects, while --root provides a strict single-repository boundary.

  1. A developer who frequently starts fresh coding-agent sessions can preserve yesterday's failed debugging paths, confirmed fixes, and architectural choices instead of reconstructing them from source.
  2. An engineer maintaining many repositories can expose every registered project through one MCP configuration and select the destination with a project argument or active-project setting.
  3. A team worried about risky or repeatedly broken files can run pjm precheck before commits to review previous failures, churn, unresolved work, and stale decisions.
  4. A user of Copilot, plain Claude, or another assistant without MCP can export current decisions, gotchas, and a do-not-retry list into CLAUDE.md or .cursorrules.
  5. A project lead reviewing engineering history can use the local dashboards, case files, timeline, failure heat, and pjm score to inspect what was learned and the tool's estimated savings.
  6. A team that wants shared distilled knowledge but not a shared raw activity log can commit summaries, maps, instructions, and issue files while leaving events.jsonl ignored.

How do you install or deploy this agent?

Python, Git, and a shell are required. Install or upgrade the package:

pip install -U projectmem

Initialize it inside a repository:

cd your-project
pjm init

For older projects or upgrades from 0.1.x/0.2.x, scan for existing memory and register what is found:

pjm doctor
pjm doctor --fix

No account, cloud service, or API credential is required. Normal operation is documented as offline; network access occurs only when the user explicitly invokes pjm doctor --online, enables --auto, or clicks an update-check link in a dashboard.

How do you use this agent?

Begin by inspecting the session briefing and distilled memory:

pjm brief
pjm show

Record an issue, a failed attempt, and the confirmed fix:

pjm log "authentication callback returns an empty session"
pj m attempt "increase callback timeout" --failed

The second command above is not a valid source-documented alias because of the embedded space. Use the actual command:

pjm attempt "increase callback timeout" --failed
pjm fix "preserve the session cookie during callback"

Check historical risks before committing:

pjm precheck

Build structural data and open the local project dashboard:

pjm map --build
pjm visualize

To serve all registered repositories from one MCP process, add this to a supported client's configuration and replace the command with the absolute path to the machine's Python interpreter:

{
  "mcpServers": {
    "projectmem": {
      "command": "/absolute/path/to/python",
      "args": ["-m", "projectmem.mcp_server"]
    }
  }
}

Codex uses ~/.codex/config.toml instead:

[mcp_servers.projectmem]
command = "/absolute/path/to/python"
args = ["-m", "projectmem.mcp_server"]

Fully quit and reopen the client, then have the agent call get_instructions(), get_summary(), and get_project_map() at session start. It should call precheck_file(path) before editing and log issues, attempts, fixes, decisions, and notes as work proceeds. Add --root followed by an absolute repository path to the server arguments when a hard single-project boundary is preferred.

What are this agent's strengths and limitations?

Pros
  • It stores typed development events—issues, attempts, fixes, decisions, and notes—rather than relying solely on conversational transcripts.
  • The judgment layer can warn during pre-commit checks when a change revisits a failed approach or touches a high-churn file, making memory active in the workflow.
  • Storage uses ordinary local files with no account, telemetry, persistent database, or mandatory network access; update checking is opt-in.
  • One MCP server can address multiple registered repositories, while --root supports strict single-project isolation and every write reports its resolved destination.
  • Markdown export and pjm wrap provide documented paths for assistants that do not implement MCP.
  • Project and global dashboards combine event history, issue-to-fix chains, code structure, timelines, and failure heat for local review.
Limitations
  • Initialization installs three Git hooks and auto-starts a file watcher, adding behavior that developers and teams must understand and maintain.
  • Multi-project mode depends on a local registry and correct routing; a stale active project or bad client context can target the wrong repository, so users must inspect write confirmations.
  • MCP setup requires an absolute Python path, client-specific configuration, and a cold restart; Claude Desktop and Cursor cannot rely on cwd for project discovery.
  • The README is internally inconsistent about MCP tool count: several sections claim 17 tools, while the comparison table says 15 and the enumerated read/write lists total 15.
  • Token savings, debugging time saved, and dollar protection are project-generated estimates or ROI metrics; the supplied material does not establish a broadly reproducible independent benchmark.
  • Deep structural analysis is explicitly described for Python import resolution, with no evidence that other languages receive equivalent dependency-graph support.

How does this agent compare with similar options?

The project positions itself as a memory-plus-judgment layer and directly compares its design with claude-mem, agentmemory, mem0, and Letta (MemGPT). Its stated distinctions include typed development events, pre-commit failure warnings, stale-memory flagging without automatic deletion, history-preserving decision supersession, a plain-text events.jsonl store, local multi-project dashboards, and a separate editable plan.md. The README characterizes claude-mem as session capture, agentmemory as a memory engine that applies decay and pruning, mem0 as chat memory that rewrites facts on update, and Letta as an agent framework requiring a server and database. This is a project-authored capability snapshot dated June 2026, not a performance benchmark.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
projectmem Coding Memory This agent 74 · Some gaps CLIFree ★ 868 20d ago Python Codex · Claude Code · Claude.ai
Piia Engram 88 · Good CLIFree ★ 163 today Python Codex · Claude Code
Jev Review 81 · Good Agent plugin / skillFree + model costs ★ 245 1mo ago TypeScript Codex · Claude Code
ContextLattice Continuity Layer 65 · Some gaps CLIFreemium ★ 156 1mo ago Go Codex

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
74/ 100 5-point scale 3.7 / 5
This review covers the source as of Sep 07, 2026. The project has shipped 2 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 22/29
Reliability 8/14
Adaptability 15/18
Convention 16/18
Effectiveness 9/13
Verifiability 4/8
Why each dimension lost points
Trust22 / 29 · 3.8/5

Evidence shows a local-first design with no telemetry and the only network call being a user-opted update check; SECURITY.md tabulates where each file lives and lists six honest trade-offs (git hooks, background watcher, prompt-injection risk on memory files); full uninstall and hooks-uninstall paths exist; registry migration keeps a .bak. Deductions: pjm init auto-installs three git hooks and auto-starts a detached watcher process without per-action confirmation (opt-outs exist via --no-watch / hooks uninstall); dependencies are loosely pinned (>=) with no lockfile or audit evidence. No malware, covert exfiltration, or destructive defaults found.

Reliability8 / 14 · 2.9/5

Evidence shows tests covering path discovery, registry idempotency, and explicit reporting of unreadable configs ("unreadable" must not read as healthy); pjm doctor provides self-checks. Deductions: README contradicts itself on MCP tool count — 17 in one place, 15 twice, and SECURITY.md says 8 tools; pyproject declares 0.3.2 Production/Stable while still 0.x, and the changelog admits a fresh-install breakage (mcp 2.0 import failure) that shipped to all users for weeks, indicating weak release discipline.

Adaptability15 / 18 · 4.2/5

Evidence shows support for Claude Desktop/Code, Cursor, Antigravity, Codex plus a no-MCP CLAUDE.md export path; 0.3.x fixes Windows-specific bugs (fork, os.kill, MSIX AppContainer config paths) with targeted tests. Deductions: boundary description mixes in marketing ("Save up to 50%+ of AI tokens" with no supporting experiment); precheck trigger precision is asserted descriptively only — no static evidence the warning rate is controlled, though the audited snooze is a good detail.

Convention16 / 18 · 4.4/5

Evidence shows clear doc architecture (README/TUTORIAL/CHANGELOG/guide), install notes covering per-client differences and cold-start requirement; canonical command projectmem with pjm alias defined; a detailed per-version CHANGELOG crediting contributors; known limitations presented systematically as "Honest trade-offs" including prompt injection — rare among peers; complete MIT license file. Deductions: maintenance responsibility rests on one individual and one email with no governance or multi-maintainer evidence; examples lean on external links and there is no in-repo FAQ.

Effectiveness9 / 13 · 3.5/5

Evidence shows verifiable output design: dashboards marked snapshot vs live, tests proving the global view only reads and never mutates projects, precheck warnings naming the specific dead ends, JSON ROI output. Deductions: the core marginal-value claims (unique pre-commit warning, 50% token savings, provable ROI) are self-declarations with no benchmark data in the repo; the hidden maintenance cost of hooks + watcher + summary.md committed to git is not quantified.

Verifiability4 / 8 · 2.5/5

Evidence shows the README explicitly separating "design capabilities, not benchmark results" in the comparison footnotes and a changelog citing PR numbers and contributors. Deductions: key quantitative claims (50% token savings, 207-event dogfooding study, arXiv paper 2606.12329) are not traceable within the provided sources and the arXiv identifier format is suspect; negative claims about competitors (claude-mem telemetry default-on, etc.) have no in-repo evidence and are unverifiable third-party facts.

Risks and how to mitigate them
  • The README states MCP tool counts inconsistently (17, 15, and SECURITY.md says 8); verify against the actual running pjm-mcp before relying on it.
  • pjm init installs git hooks and auto-starts a background watcher by default; for sensitive repos use --no-watch and inspect .git/hooks after init.
  • summary.md and PROJECT_MAP.md are committed to git and read by AI agents — treat changes like code review for prompt-injection risk, and never log secrets into the event store.
  • Quantitative claims (50% token savings, provable ROI, the arXiv paper) are independently unverified; do not base adoption decisions on them.
  • Despite the Production/Stable classifier, this is a 0.x project with a past fresh-install breakage regression; pin your installed version.
  • Cross-project global memory (~/.projectmem/global/) shares content across repos; use pjm init --no-global for sensitive repositories.
Evidence confidence: Low Reviewed Sep 07, 2026 Reviewed revision 6ff46d05a249 New commits since this review; the score may not cover them
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.3.4 v0.3.4 — memory that stays small, and warnings you can trust
    Release notes excerpt
    Three community reports, three community fixes, and six more bugs found by checking them. Each report was reproduced end to end before it was fixed, and every fix was reviewed by someone other than its author. ```bash pip install -U projectmem ``` Then run pjm init once in each project. Older projects keep the AI_INSTRUCTIONS.md and git hooks of the release that created them; re-running init now refreshes both. Your previous instructions are kept as AI_INSTRUCTIONS.md.bak, and anything of yours outside projectmem's block in a hook is left untouched. Fixed …
    View on GitHub ↗
  2. v0.3.3 v0.3.3 — precheck stops getting slower, and Windows works end to end
    Release notes excerpt
    Six field reports closed, and the check that runs before every edit no longer gets slower as your project ages. Every fix below was found by running projectmem on the machine that reported it — Windows 11, and all four MCP clients — not by reading the code. Two of them were found only because a client launched the server from a directory we did not expect. ```bash pip install -U projectmem ``` Faster pjm precheck was taking 26 seconds on a 1,200-event project, and getting worse every week. …
    View on GitHub ↗
  3. v0.3.2 v0.3.2 — Windows watch support, and a doctor that tells the truth
    Release notes excerpt
    Windows works properly now — and pjm doctor stops saying green when it cannot see. ```bash pip install -U projectmem ``` Every fix below was found by running the thing on Windows, not by reading the code. The watcher works on Windows pjm watch --daemon crashed there with AttributeError: module 'os' has no attribute 'fork'. Daemonisation used the POSIX-only os.fork() and os.setsid(); it now spawns a detached worker with subprocess.Popen — DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP | CREATE_NO_WINDOW on Windows, start_new_session=True elsewhere. …
    View on GitHub ↗

FAQ

Does it require payment, an account, or API keys?
No. It is MIT-licensed and described as free for personal, commercial, and enterprise use; local operation requires no account or API credential.
Does project memory or source code leave the machine?
Not by default. Memory remains in local project and user-level directories with no telemetry. A network request is made only when the user explicitly enables an update check.
What information is normally shared through Git?
The default policy commits distilled files such as summary.md, PROJECT_MAP.md, AI_INSTRUCTIONS.md, and issues/, while ignoring raw events.jsonl and runtime files. Ignoring the entire .projectmem/ directory keeps all memory private.
Can it work with a coding assistant that has no MCP support?
Yes. pjm export --claude-md, pjm export --cursor, and pjm wrap <agent> can supply active decisions, gotchas, and failed approaches through files or injected context.
How does the shared server reduce wrong-project writes?
Routing checks a pinned --root, an explicit project, the client workspace root, the active project, and the working directory in that order, and refuses to guess when resolution is ambiguous. Every successful write echoes its destination; a pinned server can enforce a hard boundary.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents