# PROJECTMEM: A Local-First, Event-Sourced Memory and Judgment Layer for AI Coding Agents

arXiv: https://arxiv.org/abs/2606.12329 · HTML: https://mlsanity.com/paper/2606.12329/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use.
- Builds on 26 of its 34 references that are in the map.
- First posted on arXiv 10 Jun 2026.

## Placed in

- LLM agents and tool use / [Software engineering coding agents](https://mlsanity.com/agents/software-engineering-coding-agents/)

## Builds on (most cited first, 26 of 26)

- [Reflexion: Language Agents with Verbal Reinforcement Learning](https://mlsanity.com/paper/2303.11366/) (2023)
- [Generative Agents: Interactive Simulacra of Human Behavior](https://mlsanity.com/paper/2304.03442/) (2023)
- [MemGPT: Towards LLMs as Operating Systems](https://mlsanity.com/paper/2310.08560/) (2023)
- [A-MEM: Agentic Memory for LLM Agents](https://mlsanity.com/paper/2502.12110/) (2025)
- [Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory](https://mlsanity.com/paper/2504.19413/) (2025)
- [MemoryBank: Enhancing Large Language Models with Long-Term Memory](https://mlsanity.com/paper/2305.10250/) (2023)
- [Cognitive Architectures for Language Agents](https://mlsanity.com/paper/2309.02427/) (2023)
- [Zep: A Temporal Knowledge Graph Architecture for Agent Memory](https://mlsanity.com/paper/2501.13956/) (2025)
- [Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directions](https://mlsanity.com/paper/2503.23278/) (2025)
- [Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions](https://mlsanity.com/paper/2507.05257/) (2025)
- [Where LLM Agents Fail and How They can Learn From Failures](https://mlsanity.com/paper/2509.25370/) (2025)
- [LlamaFirewall: An open source guardrail system for building secure AI agents](https://mlsanity.com/paper/2505.03574/) (2025)
- [AGrail: A Lifelong Agent Guardrail with Effective and Adaptive Safety Detection](https://mlsanity.com/paper/2502.11448/) (2025)
- [ToolSafe: Enhancing Tool Invocation Safety of LLM-based agents via Proactive Step-level Guardrail and Feedback](https://mlsanity.com/paper/2601.10156/) (2026)
- [STALE: Can LLM Agents Know When Their Memories Are No Longer Valid?](https://mlsanity.com/paper/2605.06527/) (2026)
- [AI Agentic Programming: A Survey of Techniques, Challenges, and Opportunities](https://mlsanity.com/paper/2508.11126/) (2025)
- [MemMachine: A Ground-Truth-Preserving Memory System for Personalized AI Agents](https://mlsanity.com/paper/2604.04853/) (2026)
- [Beyond the Context Window: A Cost-Performance Analysis of Fact-Based Memory vs. Long-Context LLMs for Persistent Agents](https://mlsanity.com/paper/2603.04814/) (2026)
- [Where Do AI Coding Agents Fail? An Empirical Study of Failed Agentic Pull Requests in GitHub](https://mlsanity.com/paper/2601.15195/) (2026)
- [Large Language Models for Software Engineering: A Reproducibility Crisis](https://mlsanity.com/paper/2512.00651/) (2025)
- [TOKI: A Bitemporal Operator Algebra for Contradiction Resolution in LLM-Agent Persistent Memory](https://mlsanity.com/paper/2606.06240/) (2026)
- [Meta-Policy Reflexion: Reusable Reflective Memory and Rule Admissibility for Resource-Efficient LLM Agent](https://mlsanity.com/paper/2509.03990/) (2025)
- [Memanto: Typed Semantic Memory with Information-Theoretic Retrieval for Long-Horizon Agents](https://mlsanity.com/paper/2604.22085/) (2026)
- [Codified Context: Infrastructure for AI Agents in a Complex Codebase](https://mlsanity.com/paper/2602.20478/) (2026)
- [ESAA: Event Sourcing for Autonomous Agents in LLM-Based Software Engineering](https://mlsanity.com/paper/2602.23193/) (2026)
- [MemCog: From Memory-as-Tool to Memory-as-Cognition in Conversational Agents](https://mlsanity.com/paper/2605.28046/) (2026)

## Built on by (most cited first, 3 of 3)

- [SuperLocalMemory 4.0: The Governed Memory Operating System for AI Agents](https://mlsanity.com/paper/2608.08253/) (2026)
- [Delivery, Not Storage: Cue-Anchored Working Memory as a Harness Property for Coding Agents](https://mlsanity.com/paper/2607.20972/) (2026)
- [Parsing the Stream: A Live Trace Model for Long-Horizon Agents and Their Observers](https://mlsanity.com/paper/2609.01466/) (2026)

## Abstract (arXiv)

AI coding agents often lose project-specific rationale across sessions and may repeat approaches that previously failed. The bottleneck is often not model capability but missing coding agent memory: a durable record of what was decided, tried, and ruled out. We present projectmem, an open-source, local-first memory and judgment layer for AI coding agents, which records development as an append-only, plain-text log of typed events (issues, attempts, fixes, decisions, and notes) and deterministically projects it into compact summaries served through the Model Context Protocol (MCP). When invoked before an edit, a file-scoped advisory precheck returns recorded failures, open issues, and churn for the target file, a design point we call Memory-as-Governance. We evaluate feasibility through an author-run, six-month self-study on two machines, a controlled latency benchmark, and client-compatibility tests. The study contains 3,228 unique events from 27 projects; 56% are issue-lifecycle events, and 86 of 427 distinct issues closed by a recorded fix had at least one failed attempt before the first fix in event-log order. These histories are candidates for later warnings, not evidence that warnings prevented failures. On a synthetic repository, the median analysis time for a 1,500-event log decreased from 42.0 seconds to 79.3 milliseconds, while git subprocesses per check decreased from 1,500 to two and the tested warning output was preserved. The results establish the feasibility of persistent project memory for AI coding agents and motivate a controlled repeat-failure benchmark for measuring whether coding-agent memory prevents repeated failures. Source code is available at https://github.com/riponcm/projectmem.
