akitaonrails/ai-memory: Solution for long term memory for agent coding CLIs and to facilitate handoff between diff

6 phút đọc

akitaonrails/ai-memory: Solution for long term memory for agent coding CLIs and to facilitate handoff between diff – Repository akitaonrails/ai-memory. Mô tả: Solution for long term memory for agent coding CLIs and to facilitate handoff between different agent vendors. 8877 stars, 617 forks, ngôn ngữ chính Rust, cập nhật 2026-10-06.

1. Repository làm gì?

Long-term memory for AI coding agents. Quit Claude Code mid-task, start OpenAI Codex in the same directory, continue without re-explaining the architecture, the failed approaches, or the open questions.

Your coding agent already has a memory feature. Claude Code takes its own notes, Cursor remembers some things, and every platform is adding more. All of them share the same walls: the notes live on one machine, belong to one agent, and vanish from view the moment you switch tools — or teammates.

ai-memory is what's on the other side of those walls.

It follows you across agents. Twenty-plus harnesses — Claude Code, Codex, Cursor, Gemini CLI, OpenCode, Grok, Devin, Kimi, Kiro, and more — feed one shared memory. Quit Claude Code mid-task, open Codex in the same directory, and the next agent picks up a real handoff: where you left off, what failed, what's still open. Handoffs are a protocol here, not a convention — typed, owned, claimed exactly once.

It follows you across projects. A small profile of how you usually work — your package manager, test layout, architecture habits — reaches every new repository at session start, so you stop re-explaining yourself. It is a default below each repository's rules file, on by default for a single user and opt-in, private per person, on a shared server. See docs/cross-project-profile.md.

It follows you across machines. Memory lives in a server you run — on the same laptop, a homelab box, or wherever — so the project you left on the desktop is the project you resume on the laptop. Same knowledge, same open questions.

2. Dữ liệu và cấu trúc đáng chú ý

It works for a team. Point everyone at one server and what one person's sessions learn, everyone's agents can retrieve. Knowledge is shared per project; personal handoffs stay personal. Multi-user auth, per-person attribution, and an audit log are built in — not a paid tier.

Your memory is plain markdown. The source of truth is a git-backed wiki of ordinary .md files: grep it, open it in Obsidian, edit it by hand, rsync it. The database is a derived index that can always be rebuilt from the files. No vector store to babysit, nothing held hostage in a binary blob.

It captures the work itself, silently. Lifecycle hooks record what actually happened — prompts, tool calls, session boundaries — sanitized at a typed privacy boundary before anything is stored, then consolidated into readable pages. No "remember this" ceremony. And the default path uses zero LLM calls: capture, search, and handoffs all work with no API key at all.

It ages gracefully, without an LLM. Memory decays on a schedule you can tune per tier, and the memory you actually use decays slower — open a page, search it, or reach it through a link and it earns its keep. When episodic notes go cold they can be compacted down to their durable facts (file paths, error codes, decisions) instead of dropped, near-duplicates collapse into one, and likely contradictions get flagged — all with zero API calls. Nothing is hard-deleted: the original stays in git and the version chain (restore-page brings it back). Access-weighted retention is always on because it can only ever keep memory longer; the parts that rewrite or drop content (compaction, dedup, per-tier curves) stay off by default until you turn them on.

And it can dream, if you let it. Point it at an LLM and an opt-in background pass will, while you're idle, rewrite whole clusters of cold notes into single coherent pages — cancelling the moment you come back to work. It never deletes a source (the pre-merge versions stay reachable), it's off by default, and it's gated on a recall eval before it could ever become default behavior. The zero-LLM path above is what runs unless you ask for more.

It tells you the truth about itself. One self-contained binary. Purge commands that say exactly what "deleted" means. A measured write ceiling (~700/s) instead of a guessed one. An audit log of every mutation. Boring, in the way infrastructure should be.

Agents emit sanitized observations through lifecycle hooks as you work. At session end, observations become coherent markdown pages in the project's wiki (optionally LLM-written; useful even without). The next session — any agent, any machine — gets a bounded brief and can search everything: full-text, entities, links, and (optionally) vectors, fused into one ranking. Cross-agent handoffs carry the baton explicitly.

3. Khả năng ứng dụng và giới hạn

The full design, including the invariants that keep multi-user and multi-session use safe, is in docs/ARCHITECTURE.md.

Every row below is a first-party integration — MCP registration, lifecycle hooks, or both — kept honest by CI. The full matrix with per-agent notes and caveats is in docs/support-matrix.md.

Most agent-memory tools optimize one thing — extracting atomic facts per turn, a temporal knowledge graph, an agent-editable memory OS, or a hosted context API. ai-memory optimizes something different: a git-backed markdown wiki as the source of truth, with a derived index for retrieval, captured automatically from lifecycle hooks, shared across agents, machines, and people, and working with zero LLM calls by default. Here's what carries over from each, and what you gain:

The consistent theme: files you own (git-backed markdown), a zero-LLM default, one self-contained binary, cross-agent + cross-machine + team sharing, automatic lifecycle capture, and typed, claim-once handoffs. Opt-in features (LLM consolidation, vector search, the "dream" consolidation pass, belief-strength in ranking) stay opt-in — and the zero-LLM aging path (per-tier decay, extractive compaction, dedup, contradiction flagging, access-weighted retention) works with no API key at all.

Built on the shoulders of: the Karpathy LLM Wiki (compile-not-retrieve), agentmemory (this project is its Rust successor), basic-memory (markdown-on-disk truth), cognee (pipeline composition and triplet embeddings), Hermes Agent (the self-improvement loop), and A-MEM (Zettelkasten-style atomic notes).

The full, fair rundown — where each approach wins, where ai-memory differs, the published benchmark — is in How ai-memory compares.

For native Arch installs, use the AUR packages. They install /usr/bin/ai-memory, packaged hook sources, and both system-level and user-level systemd units.

Download the x86_64 or aarch64 RPM from the latest release, then install it:

Then follow the native Linux service instructions in docs/install.md.

Số liệu repository có thể thay đổi; nên mở liên kết nguồn để kiểm tra README, giấy phép và trạng thái phát hành.

Nguồn tham khảo: Xem bài gốc

📅 Âm: 4/10 · Canh Dần

📅 Lịch Âm Dương NsN

×
Hôm Nay · Thứ Năm
Âm Lịch: 4 Tháng 10
Năm Bính Ngọ
📌 Can Chi: Canh Dần
✨ Hoàng Đạo: Tý (23-1), Sửu (1-3), Thìn (7-9), Tỵ (9-11), Mùi (13-15), Tuất (19-21)
Vĩnh Phúc (Liên Bảo - Vĩnh Yên)
31°C
Nắng Đẹp
💧 83% | 💨 18 km/h
Hôm nay 32°
02/11 28°
03/11 30°
04/11 31°
05/11 31°