agent-memory is a repository memory system for developers and coding agents.
The current model is no longer just “generate some markdown.” It has three active jobs:
- capture durable memory state
- maintain that memory through history and recall
- retrieve that memory through query
The system has four persistent pieces:
state.jsonThe current canonical bundlehistory/events.jsonlAppend-only memory inputs from tool runs and imported sessionshistory/checkpoints/Snapshots of canonical bundles after meaningful writessources.jsonThe registry of external history inputsconfig.jsonThe project-level recall defaults and policy surface
docs/agent-memory/*.md remains the readable projection layer, but it is no longer the source of truth.
The first version of agent-memory solved initialization. It did not solve long-term memory maintenance.
Over time, real projects need more than one good snapshot. They need a loop:
- capture new signals
- keep history
- consolidate what matters
- retrieve it later
- audit drift and backlog
That is the purpose of the current architecture.
initDestructive bootstrap into the current schemaupdateRefresh the active bundle from current repository evidencerecallConsolidate unrecalled history into the active bundlestatusInspect backlog, source health, and checkpoint drift before actingqueryAnswer a question from bundle, history, and checkpointsaddRegister an external session sourcesyncBring external sessions into the history layerautomateRun local automation for import-sync and recall maintenanceintegrateConnect Claude Code and Codex toagent-memorymcpExposeagent-memoryas a local stdio MCP servervalidateAudit the whole system, not just the current bundle
- canonical state first
- append-only history
- readable projections
- deliberate consolidation instead of silent drift
- configurable recall with explicit operator control
- retrieval with citations, not opaque answers
- explicit breaking changes over partial compatibility hacks
This schema is intentionally breaking.
There is no migration path.
Old repositories must not be migrated in place. Re-run:
npx agent-memory initto rebuild into the current system.