About this project

ai-memory provides persistent memory for AI coding agents, enabling handoffs between different agent vendors. It supports 20+ harnesses including Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Grok, Devin, Kimi, and Kiro. Key capabilities: - Cross-agent memory: Quit one agent mid-task and resume in another with context preserved — where you left off, what failed, what is still open. Handoffs are a typed, claim-once protocol. - Cross-machine sync: Memory lives on a self-hosted server, so projects resume across devices. - Team sharing: One server serves multiple users with per-person attribution, multi-user auth, and an audit log. Knowledge is shared per project; personal handoffs stay personal. - Markdown as source of truth: Memory is stored as git-backed .md files — grepable, editable in Obsidian, rsyncable. The SQLite database is a derived index that can be rebuilt from the files. - Automatic capture: Lifecycle hooks record prompts, tool calls, and session boundaries, sanitized at a typed privacy boundary before storage. Observations are consolidated into readable wiki pages at session end. - Zero LLM by default: Capture, search, and handoffs work without any API key. LLM consolidation and vector search are opt-in additions. - Retrieval: FTS5 full-text search, entity matching, graph-neighbor RRF, optional vector RRF, bounded source-authority adjustment, and raw-observation fallback for non-global searches. - Single Rust binary: Self-contained, with purge commands, a measured write ceiling (~700/s), and an audit log of every mutation. Supported platforms: Linux, macOS, Windows via WSL2 (native Windows experimental). Installation options include AUR packages for Arch Linux, Docker/Podman with amd64 and arm64 images, and prebuilt native binaries. Optional LLM providers include Anthropic, OpenAI (including OAuth), GitHub Copilot, Gemini, OpenCode, and OpenAI-compatible endpoints (Ollama, LM Studio, vLLM). Optional embedding providers include OpenAI, Voyage, Gemini, and keyless OpenAI-compatible endpoints. The server exposes an MCP/HTTP interface and an optional read-only web UI with a JSON API under /api/v1. Security features include loopback-only default binding, bearer token auth for LAN exposure, per-user accounts with password sessions and API keys, OIDC device auth for hooks, and TLS via reverse proxy. Per-repository capture rules can exclude paths or operate in allowlist mode. The data directory contains a git-versioned wiki, immutable sanitized transcript segments, SQLite indexes, reserved model storage, and rolling logs.