ai-memory
A self-hosted long-term memory system for AI coding agent CLIs. It captures sessions into a git-backed Markdown wiki, shares project context across agents and machines, and supports typed handoffs between different harnesses.
Visit akitaonrails/ai-memoryOverview
ai-memory is a self-contained, self-hosted solution for long-term memory across AI coding agent CLIs. It captures lifecycle observations, consolidates session summaries into a project wiki of ordinary Markdown files, and lets the next agent retrieve context or continue from a typed handoff across supported harnesses and machines.
Key Features
- Shared memory across more than twenty coding agent harnesses, with typed claim-once handoffs between agents.
- A git-backed Markdown wiki is the source of truth, while the database is a derived index that can be rebuilt from the files.
- Lifecycle hooks capture prompts, tool calls, and session boundaries silently, with a typed privacy boundary before storage.
- Cross-project profiles carry working habits into new repositories, and server-hosted memory follows users across machines and teams.
- The default path uses zero LLM calls for capture, search, handoffs, and aging operations such as decay, compaction, deduplication, and contradiction flagging.
- Optional LLM consolidation, vector search, and dream-style rewrites are off by default and never delete source versions.
Use Cases
- Continue work after switching from one coding agent to another in the same project directory.
- Share project knowledge across a team using one server while keeping personal handoffs personal.
- Resume project memory from a different machine through a self-hosted server.
- Bootstrap memory for an existing project that already has a long history.
Getting Started
- On Linux or macOS, run the install.sh release script, then run ai-memory setup.
- On Windows PowerShell, run the install.ps1 release script, then run ai-memory setup.
- Wire agents with install-mcp and install-hooks, or start harnesses with ai-memory run for automatic wiring and session continuity.
- Restart the agents and ask what they remember about the project to verify recall.
Deployment & Requirements
- The product ships as one self-contained binary, with Linux, macOS, and NixOS module support and Windows via WSL2.
- Native Windows is listed as experimental in the support matrix.
- Docker or Podman deployment is supported, and the published Docker image includes linux/amd64 and linux/arm64 variants.
- The NixOS module requires git as a runtime dependency and provides a hardened systemd service.
- For LAN or WAN binds, place TLS in front of the service; loopback binds may omit secrets and tolerate a missing environment file.
Before You Adopt
- License: MIT. Review its terms before using, modifying, or distributing the project.
- Native Windows support is marked experimental.
- The Docker quick-start can start without a bearer token.
- NixOS settings are rendered into a world-readable store path, so API keys should not be placed there.