Browse / General-purpose / agent_memory
agent_memory
reutermj
Exploring adding memory to coding agents
Open reutermj/agent_memory → Does not match the four rules.
Built for Claude Code
ships .claude CLAUDE.md and nothing for other agents.
In its own words
Persistent memory system for coding agents. Stores project context as git-mergeable markdown files that survive context clears and compaction.
Setup
Add to your MODULE.bazel as a dev dependency:
Then run the init command to scaffold the memory system in your project:
.agent-memory/directory withdecisions/,patterns/,context/subdirectories.agent-memory/context/ -memory-system.mdseed memory describing how the system works.claude/settings.jsonwith a SessionStart hook that loads memories on every sessionCLAUDE.mdone-liner pointing agents to the memory system
How it works
Memory files are markdown with YAML frontmatter:
On every Claude Code session start, resume, clear, or compaction, the load-memory binary reads all priority: always files from .agent-memory/ and injects their content into the agent's context window via a SessionStart hook.
Files with priority: reference are stored on disk but not automatically loaded — agents read them on demand when relevant.
Naming convention
Files use the format YYYYMMDD-short-description.md. The date prefix provides chronological ordering and prevents merge conflicts across branches.
Adding memories
Agents create new memory files as they learn about the project. The seed memory file created during init describes the conventions to follow.
The whole README. Open the repo ↗
Read from the repository's git tree on 2026-08-17.