MemShelf is an external memory system for AI agents designed to store work experience as episodes, independent of the chat session context. Each episode captures decisions, rejected alternatives, and unresolved tasks, preventing data loss caused by automatic context window compression.
The system operates as a Git repository containing Markdown files. Episodes are structured with a YAML header and specific sections like digests and timelines. An index file serves as the primary reference for the agent, which fetches full details only when necessary.
By mid-September, the shelf contained 230 episodes. The system utilizes a validation process where an agent proposes an episode, a tool checks it against a contract, and the user commits the file. This workflow allows for pre-publication filtering of sensitive data using regex patterns.
MemShelf is model-agnostic, as demonstrated by tests with Claude Code and Gemini CLI 0.46, which both accessed the same Git-based state without requiring data export or format conversion. The system also supports maintenance tasks like rollups and manual purging to manage index size.





