AgentMemory - alexherrero/agentm GitHub Wiki
Durable memory in a world of ephemeral context โ a file-based vault that working agents read and write, chat surfaces only read, and every session starts from.
AgentMemory is the harness's long-term memory: a plain-Markdown vault, synced through Google Drive, that outlives any single session or repo. It holds three kinds of thing โ your standing preferences and conventions, per-project state, and lessons learned along the way โ as one fact per file with YAML frontmatter, so a fresh session recalls what the last one knew without you re-explaining it.
The vault is a directory tree, not a database. Entries live under a few well-known regions, and access splits by who is asking:
| Region | Holds | Loaded |
|---|---|---|
standards/ (โช the legacy memory/_always-load/ pen) |
standing preferences, conventions, durable fixes | every session start |
Projects/<name>/ |
per-project goals, plans, progress | on demand, by project |
diagnostics/ |
health scorecards, dreaming reports, digests, dated audits | by the tooling, not the agent |
Machine state โ caches, cursors, orchestration state โ is not a vault region at all: it lives outside the vault in the engine state directory (~/.local/state/agentm/, its own git repo the runner commits), so the vault stays the knowledge surface both audiences read.
Access is asymmetric by surface: the filesystem working agents you run directly (Claude Code, Antigravity) read and write the vault following your entry conventions; chat surfaces (Claude.ai, Claude Desktop) read and suggest entries but never write. A read-only vault lint and a personal-notes link-discovery audit keep the corpus on-spec โ both surface fixes for you to apply, never editing an entry themselves.
- Device-Wide Substrate โ the vault is the device-wide store. Memory spans every project because it lives outside any one repo, on the machine, not in the tree.
- Orchestration and Auto-Detection โ the push/pull surfaces that read and write vault state at session start and phase boundaries.
- Phases โ phase state (PLAN, progress) is written to the vault, not held in the conversation; that is what lets one phase per session stay coherent.
Detail:
- AgentMemory context payload โ the block you paste into any agent surface to point it at the vault.
- Vault lint checks ยท Note relatedness signals โ the audit catalogs.
- Use AgentMemory in any agent ยท Audit the vault โ the how-to recipes.
Designs:
- MemoryVault โ the write-primitives โ recall โ reflection build, part by part.
- Agent Memory Evolution V1โV4 ยท Memory-OS Architecture (V5) โ where it came from and where it's going.
Architecture ยท Designs ยท Home