iai-personal-memory-engine  by CodeAbra

AI coding assistant memory engine for persistent, local recall

Created 2 months ago
334 stars

Top 81.9% on SourcePulse

GitHubView on GitHub
Project Summary

This project addresses the common issue of AI coding assistants lacking persistent memory, causing them to forget context across sessions. It offers a fully local, ambient memory system for MCP-compatible AI hosts, enabling assistants to retain user-specific information and adapt over time, thereby enhancing productivity and reducing repetitive interactions. The target audience includes developers and power users of AI coding assistants who require a more integrated and context-aware experience.

How It Works

The system operates as a local server implementing the MCP protocol, capturing every turn of a conversation verbatim. It organizes this data into a personal memory map using custom-built components: a storage engine (Hippo), a community-detection algorithm (MOSAIC), and a hyperdimensional memory substrate (Lilli HD), all powered by a Rust core. This bespoke architecture prioritizes performance and relevance for a single user's memory, contrasting with off-the-shelf solutions. Memory is tiered into Episodic, Semantic, and Procedural data, encrypted at rest, and consolidated during idle periods. Recall is fast, LLM-free, and combines semantic similarity, graph-link strength, and recency.

Quick Start & Requirements

  • Primary install: Clone the repository, set up a Python virtual environment, and run pip install . to build the native Rust engine. Navigate to mcp-wrapper, run npm install && npm run build, then install the daemon with iai-mcp daemon install and hooks with iai-mcp capture-hooks install.
  • Prerequisites: macOS (Apple Silicon tested), Python 3.11 or 3.12, Node.js 18+, a Rust toolchain, and an MCP-compatible CLI host (e.g., Claude Code, Codex CLI). Requires ~500 MB disk space.
  • Links: GitHub repository (implied), BENCHMARKS.md (mentioned).
  • Note: Windows and Linux are not currently supported due to the macOS-specific native engine.

Highlighted Details

  • Claims to be the "best-benchmarked open-source memory system for AI coding assistants."
  • Features custom-built core components: Hippo storage engine, MOSAIC community detection, Lilli HD hyperdimensional substrate, and a Rust native engine.
  • Longitudinal memory benchmarks show strong performance in retaining facts post-contradiction (Rescue@10: 1.000) and across sessions (Personal-fact drift: 0.9933).
  • Session-start context injection stays within typical token budgets (avg. 1,629 tokens).
  • Data is fully local, encrypted at rest (AES-256-GCM), with no API keys or telemetry.

Maintenance & Community

This project is maintained by a single author. Contributions are welcomed via issues and pull requests. No specific community channels (e.g., Discord, Slack) are listed.

Licensing & Compatibility

The project is licensed under the MIT license, allowing for broad compatibility, including commercial use and linking within closed-source applications. It integrates with any MCP-compatible CLI host via a standard protocol.

Limitations & Caveats

The native engine and core components are macOS-only; Linux/Windows support requires community contributions. The system is English-only by design, translating incoming assistant responses to English for storage. There is no cross-machine synchronization, meaning memory data resides solely on the local machine. Initial recall quality is mediocre for the first ~10 sessions until sufficient data is consolidated. Recall latency at scale (10k records) exceeds the target of <100 ms.

Health Check
Last Commit

6 days ago

Responsiveness

Inactive

Pull Requests (30d)
48
Issues (30d)
4
Star History
198 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.