One email each morning — yesterday's AI, sortedGet it in your inbox

METAL LAB

akitaonrails/ai-memory

3,349+606 todayRust

A shared memory server so switching AI coding agents doesn't wipe out your project context

ai-memory is a Rust tool that lets you quit Claude Code mid-task and continue the same work in a different agent like OpenAI Codex, in the same directory, without re-explaining the architecture, failed approaches, or open questions. It hooks into each agent's session start/end lifecycle to capture sanitized observations, then compiles them into a summary page that gets handed off to whichever agent starts next. Everything is stored as plain markdown in a git repo rather than a vector database, so it's grep-able, viewable in Obsidian, and backup-able with rsync.

What it does

  1. It installs MCP configuration and lifecycle hooks into agents such as Claude Code, Codex, Cursor, Gemini CLI, and Devin CLI, capturing sanitized prompt and tool-use observations as each session runs.
  2. When a session ends, those observations are compiled into a coherent summary wiki page, and the next session automatically receives a 'where you left off' handoff block.
  3. Data is isolated per project under UUID-keyed paths, and search combines FTS5 full-text search with entity (noun) matching and graph-neighbor lookup, with optional LLM summarization and vector search.
  4. It's installed via CLI commands like install-mcp and install-hooks, and the server can run locally or on a home server so multiple machines and agents share the same memory store.
  5. The system works without any LLM using rule-based summarization and search alone, or you can plug in providers like Anthropic, OpenAI, or Gemini for richer consolidation.

Why it matters

Developers who bounce between multiple AI coding tools currently pay a real cost re-explaining project background, failed attempts, and open questions every time they switch — this tool preserves that context in a vendor-neutral form, cutting the switching cost. Its markdown-plus-git storage also means it slots into existing workflows without requiring new infrastructure.

Terms in this repo

  • MCP · a standardized protocol that lets AI agents connect to external tools and data
  • lifecycle hooks · connection points that auto-trigger at specific moments in an agent's run, like session start or end
  • FTS5 · SQLite's built-in full-text search engine
  • handoff · a summary passed from one session to the next describing where work was left off
  • RRF · a method for merging rankings from multiple search results into one combined order

Repository description (English)

Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors

Open on GitHub

Trending repos

All repos →

Latest from METAL LAB