tigerless-labs/agent-memory
Markdown-backed agent memory with ranked SQLite recall across hosts
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
agent-memory is a Python 3.12+ uv workspace. The root project depends on the core, CLI, and adapter packages; MCP, executor, harness, vector, and CJK features are exposed as extras. Each memory is a Markdown file under <type>/<group>/<name>.md, with schema fields, validity, links, and provenance in frontmatter. Session-start hooks inject MEMORY.md. Ranked recall runs locally over a rebuildable SQLite FTS5 projection with BM25 and optional reciprocal rank fusion (RRF) of vector results. Links live in files, not in a separate graph database.
At conversation boundaries, hooks copy the trace before distillation. The reasoner gets a narrow toolkit: recall, read, and submit_operations. Endpoint mode uses native function calling; headless host mode runs a separate process per batch by default and serves those tools over stdio MCP. Sleep runs on a separate schedule to consolidate the store. .index/ is disposable, whereas .state/ carries runtime state such as the distillation watermark and write lock.
Key Capabilities & Differentiators
Recall defaults to eight hits, each with a one-line abstract, path, anchor, and score. An agent can open just the outline or matching section, read the full file, or use mem trace for cited evidence. Integrations include Claude Code, Codex CLI, Hermes, and Muse Code; Muse native mode requires 1.4.4 or newer and caps a batch at eight model steps. Supersession preserves history for mem recall --as-of; sleep can add or update but can only propose deletion. Chinese text needs the cjk extra for jieba segmentation, with optional vectors such as BAAI/bge-small-zh-v1.5 for queries that share no terms.
In a bounded LongMemEval-S study, agent-memory scored 127/240 (52.9%) versus MemCore’s 86/240 (35.8%); the no-memory baseline was 7/120 (5.8%). The haystack was capped at 12 sessions per episode, so this is an end-to-end result, not a standard LongMemEval score or an isolated retrieval comparison. A separate interoperability check passed all nine ordered writer/reader pairings across Claude Code, Codex CLI, and Hermes.
Trade-offs & Limitations
Compared with plain Markdown plus grep, this adds ranked recall, unattended capture, and historical queries, but also introduces hooks, an index to sync, and scheduled maintenance to monitor. Compared with a vector-first or graph-backed memory system, stable paths make hits easier to inspect and migrate, while file links provide navigation without a separate graph engine. The default ASCII lexical path is inadequate for Chinese body text; CJK segmentation helps, but paraphrases without shared terms may need vectors. The MemCore result does not establish large-corpus scaling or show whether writing or retrieval drove the gain.
Local recall is not the same as an offline write pipeline. A hosted reasoner can receive session-derived content, and enabling raw review evidence can send cited historical messages. Full trace retention protects against missed distillation but increases storage and privacy obligations. In Codex, CLI recall can need explicit write access for the access log even when hooks already work; setup does not silently broaden the sandbox. Back up the store and its runtime state, not just the current memory files.
Hardware & Deployment Guide
Install from a checkout with Python 3.12+ and uv: uv sync --all-packages provides mem, mem-mcp, and mem-hook. There is no listed GitHub release or PyPI publication. Start with mem init; the default store is ~/agent-memory-store. Point each host at the same store using AGENT_MEMORY_STORE, then run mem setup --host ...; add --mcp if the host needs the MCP integration. mem doctor runs a minimal live reasoner check by default. --no-live can inspect configuration offline but does not certify readiness.
Default lexical recall is local and needs no provider key. Automated reasoning may use host credentials or a configured endpoint. mem cron install can schedule maintenance where the current user has a working crontab; use absolute store and binary paths, and keep environment-only secrets in a private mode-600 --env-file rather than in the crontab. Start sizing from retained traces, index size, and concurrent reasoner batches. If enabling vectors, measure indexing and query costs with the selected model before rolling it out.
.index/ can be rebuilt, but .state/ holds the write lock and distillation watermark.recall, read, and submit_operations.mem sleep consolidates separately from capture; deletion requires confirmation and recall --as-of resolves historical validity.cjk extra adds jieba segmentation; changing the tokenizer triggers a full index rebuild on the next sync.mem setup preserves unrelated settings, stops on conflicts, and checks readiness rather than treating a config write as success.Developers and teams sharing one local store across agent hosts who want inspectable memories, ranked recall, and scheduled consolidation.
You need a managed multi-tenant memory service, cannot retain raw transcripts, or require air-gapped automated distillation without a verified offline reasoner.
Quick Start & Installation
git clone https://github.com/tigerless-labs/agent-memory.git cd agent-memory uv sync --all-packages
Comparison vs. Top RAG, Data & Memory Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| agent-memory ★ | 4.1k | +218 | Python | MIT | Markdown-backed agent memory with ranked SQLite recall across hosts |
| EverOS | 14k | +41 | Python | Apache-2.0 | Local Markdown and indexes give AI agents portable long-term memory |
| crawl4ai | 88.5k | +408 | Python | Apache-2.0 | Async browser crawler that turns web pages into Markdown and JSON for RAG |
| markitdown | 199.7k | +909 | Python | MIT | Python library and CLI that turn mixed-format documents into Markdown for RAG in |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/tigerless-labs/agent-memory.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about agent-memory
How do Claude Code and Codex share memory?
mem setup for each host. The shared data is the Markdown store, not either host’s native memory. Use the CLI directly or pass --mcp during setup. A Codex store outside the workspace may need explicit writable access because CLI recall records accesses.Does it need a GPU, and what drives resource usage?
Can we self-host it commercially and keep session data private?
When is it a better fit than Markdown plus grep or MemCore?
grep if human-curated notes are enough. Choose agent-memory if you also need ranked recall, automated capture, and an auditable consolidation workflow. Its MemCore comparison covers write and read together in a bounded test; it is a reason to test on your own transcripts, not proof of better retrieval or large-corpus performance.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy