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

README.mdreutermj/agent_memory

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 with decisions/, patterns/, context/ subdirectories
  • .agent-memory/context/ -memory-system.md seed memory describing how the system works
  • .claude/settings.json with a SessionStart hook that loads memories on every session
  • CLAUDE.md one-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.