tigerless-labs/agent-memory
Long-term memory runtime for AI agents — plain Markdown as the source of truth, local ranked retrieval, and an independent sleep-time Manage layer. Claude Code and Codex share one store. No API key.
What it solves
AI agents typically lose all information once a session ends. agent-memory provides a long-term memory runtime that allows any agent (not just coding agents) to persist knowledge across sessions. It solves the problem of choosing between a complex retrieval engine (which is often opaque) and a simple filesystem (which doesn't scale or rank results), by combining both into a single store.
How it works
The system uses Markdown files as the single source of truth for memories, stored in a structured directory. A local SQLite index (FTS5) acts as a rebuildable cache for fast, ranked retrieval.
Key mechanisms include:
- Multi-track Retrieval: It uses a combination of deterministic injection (via
MEMORY.md), BM25 recall over the index, and direct filesystem access (ls/grep). - Retrieve by Path: Instead of pasting full text into the agent's context, it returns a list of file paths and abstracts. The agent then reads only the specific depth it needs (e.g., outline, abstract, or full file).
- Automatic Writing: Distillation of memories is triggered at conversation boundaries rather than relying on the agent's manual judgment.
- Sleep-time Management: A separate "sleep" process handles consolidation and proposes deletions, which the user must confirm.
- Host Agnostic: It does not include its own LLM client; it borrows the reasoning capabilities of the host agent's CLI (e.g., Claude Code or Codex CLI).
Who it’s for
Developers building or using AI agents that need persistent, portable, and human-readable long-term memory that can be shared across different agent hosts.
Highlights
- Files-as-Truth: All memories are Markdown files; the index can be deleted and rebuilt without any data loss.
- Zero API Keys: The library requires no API keys or external billing because it uses the host agent's existing CLI.
- Ranked Local Retrieval: Combines vector search (via plugin) and BM25 for precise recall without network calls.
- Cross-Host Compatibility: A single memory store can be shared between different agents like Claude Code and Codex CLI.
Related
- Project
- Project
- Project
- Project