[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-95915":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":17,"hasPages":17,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":14,"starSnapshotCount":14,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},95915,"agent-memory","tigerless-labs\u002Fagent-memory","tigerless-labs",null,"Python",455,27,6,1,0,294,4.34,false,"main",[],"2026-09-21 02:04:29","\u003Cdiv align=\"center\">\n\n### agent-memory: the long-term memory runtime for AI agents\n\n\u003Ca href=\"docs\u002Fdesign\u002Findex.md\">Design\u003C\u002Fa> · \u003Ca href=\"CLAUDE.md\">Invariants\u003C\u002Fa> · \u003Ca href=\"experiments\u002Fresults\u002Findex.md\">Experiments\u003C\u002Fa> · \u003Ca href=\"docs\u002Ftesting.md\">Testing\u003C\u002Fa> · \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Ftigerless-labs\u002Fagent-memory\u002Fissues\">Issues\u003C\u002Fa>\n\n![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fversion-0.1.0-369eff?labelColor=black&style=flat-square)\n![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.12+-ffcb47?labelColor=black&style=flat-square)\n![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fhosts-Claude%20Code%2C%20Codex%20CLI-ff80eb?labelColor=black&style=flat-square)\n![](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdependencies-zero%20API%20keys-c4f042?labelColor=black&style=flat-square)\n\n\u003C\u002Fdiv>\n\n***\n\n## What is agent-memory\n\nagent-memory is a local-first, agent-agnostic long-term memory runtime. Memories are plain\nmarkdown files in one store — the single source of truth — and the SQLite index beside them is\na cache you can delete at any time. Writes are triggered at conversation boundaries, not at the\nagent's discretion; an independent sleep-time Manage pass then consolidates, ages, and forgets\nby value, while nothing it touches is destroyed. Claude Code, Codex CLI, and any agent that can\nrun a shell command share the same store.\n\n## Why agent-memory\n\n- **Files are the truth; every index is a rebuildable cache.** `rm -rf .index\u002F && mem rebuild`\n  loses zero knowledge — enforced by a test, not promised in a doc. Your memory stays greppable,\n  git-able, and portable off this system. → [Storage](docs\u002Fdesign\u002Fdomains\u002Fstorage.md) ·\n  [ADR-001](docs\u002Fdesign\u002Fdecisions\u002Fadr-001-file-truth.md)\n- **A real Manage layer, on its own clock.** Sleep-time consolidation with authority tiers:\n  an unattended pass may add and update, deletion only ever arrives as a proposal you confirm.\n  Every competitor either has no M, or buries it in the write path. →\n  [Manage](docs\u002Fdesign\u002Fdomains\u002Fmanage.md)\n- **Updating never destroys.** Supersede leaves the chain intact, `recall --as-of` answers as of\n  a date, and `archive\u002F` keeps the raw material append-only — so \"missed by the distiller\" never\n  means \"lost by the system\". → [Storage](docs\u002Fdesign\u002Fdomains\u002Fstorage.md)\n- **No LLM client inside the library.** Zero keys to install and no billing surface: judgement is\n  borrowed from the host agent's own CLI, which keeps every write visible in your transcript. →\n  [ADR-002](docs\u002Fdesign\u002Fdecisions\u002Fadr-002-no-llm-in-core.md)\n- **Three read tracks, so a miss on one is not a miss.** Deterministic `MEMORY.md` injection at\n  session start, BM25 recall with progressive disclosure, and the plain directory tree reachable\n  with `ls` and `grep`. → [Recall](docs\u002Fdesign\u002Fdomains\u002Frecall.md)\n- **One write path, one answer per door.** Agent writes and Manage rewrites both go through\n  validate → hash-diff → reindex, and CLI, MCP, and hooks carry zero algorithm between them. →\n  [Architecture](docs\u002Fdesign\u002Farchitecture\u002Foverview.md)\n\nThe store is the whole data model:\n\n```\n$AGENT_MEMORY_STORE\u002F\n├── MEMORY.md            root index, one line per memory — the only resident injection\n├── user\u002F project\u002F reference\u002F experience\u002F    four type domains; new memories land flat\n│   └── \u003Ctopic>\u002F         topic directories are not preset; Manage clusters them into being\n├── archive\u002F             append-only, out of the retrieval surface by default\n│   ├── provenance\u002F      distillation evidence, kept forever\n│   ├── retired\u002F         demoted and evicted entries\n│   └── sessions\u002F        full trace copies, in case the host prunes its own\n├── dream-reports\u002F       one per sleep: what moved, what was proposed, evidence pointers\n├── .index\u002F              fully rebuildable: content-hash manifest, FTS5, access log\n└── .state\u002F              runtime state that is not: distillation watermark, write lock\n```\n\nOne memory is one file, because the file boundary is the invalidation atom: supersede, weight,\nand recall all operate on whole files. Frontmatter carries the stable name, a one-sentence\nabstract, status, timestamps, links, weight, and provenance; the body is free markdown.\n\n## Proof it works\n\nMeasured on LongMemEval-S with a bounded haystack, 120 episodes, `claude -p` (Haiku 4.5) as\nhost, one calibrated Sonnet 5 judge, two exam replays per arm. Protocol, every known difference\nbetween the arms, and the noise floor that decides what counts as a result are in\n[docs\u002Fexperiments.md](docs\u002Fexperiments.md); the full ledger is\n[experiments\u002Fresults\u002F](experiments\u002Fresults\u002Findex.md).\n\n| arm | pooled accuracy | paired vs agent-memory |\n|---|---|---|\n| agent-memory W2 | **127\u002F240 = 52.9%** | — |\n| [MemCore](experiments\u002Fresults\u002Fp10-memcore.md) W2 | 86\u002F240 = 35.8% | +37\u002F−17, p=0.009 · +35\u002F−14, p=0.004 |\n| no memory | 7\u002F120 = 5.8% | +61\u002F−4 · +60\u002F−4, p\u003C0.001 |\n\nAbsolute numbers are not comparable to published LongMemEval scores — the haystack is bounded\nto 12 sessions per episode, which makes this a write-strategy study rather than a corpus-size\none. The system-to-system row differs in write and read together, so it is an end-to-end\ncomparison and licenses no attribution to either half.\n\n**One store, three hosts** ([P1](experiments\u002Fresults\u002Fp1-generality.md)): all 9 ordered\nwriter\u002Freader pairs across Claude Code, Codex CLI, and Hermes pass — what one host's shell\nwrites, another's finds, specifics intact. Pooled net contribution over no memory:\n2\u002F36 → 13\u002F36, p=0.0074.\n\n## Quick start\n\nRequires Python 3.12 or higher and [uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F).\n\n```bash\nuv sync --all-packages\nexport AGENT_MEMORY_STORE=~\u002Fagent-memory-store\nuv run mem init\n```\n\nWrite one memory, find it again, then throw the index away and prove nothing was lost:\n\n```bash\nuv run mem record --domain project --type decision \\\n  --abstract \"Markdown files are the single source of truth\" \\\n  --body \"Indexes are rebuildable caches.\"\nuv run mem --json recall \"source of truth\"\nrm -rf $AGENT_MEMORY_STORE\u002F.index && uv run mem rebuild\n```\n\n## Wire it into your agent\n\n```bash\nuv run mem setup --host claude-code   # or: --host codex\n```\n\n`setup` probes the host, appends the `mem-hook` command to its own hook dialect, and leaves the\nrest of the settings alone — SessionStart injects, Stop and SessionEnd distil, PreCompact\nevicts. Agents that speak MCP get the same core calls through `mem-mcp` (`memory_recall`,\n`memory_read`, `memory_record`, `memory_correct`, `memory_feedback`, `memory_proposals`,\n`memory_decide`). Anything that can run a shell command needs neither: the CLI is the universal\nfallback. → [CLI](docs\u002Fdesign\u002Fapi\u002Fcli.md) · [MCP](docs\u002Fdesign\u002Fapi\u002Fmcp.md) ·\n[Hooks](docs\u002Fdesign\u002Fapi\u002Fhooks.md)\n\n## Let it sleep\n\n```bash\nuv run mem sleep --reason host   # consolidate; T0 applies, T1 files a proposal\nuv run mem proposals             # what is waiting on you\nuv run mem decide \u003Cid> --accept\n```\n\nManage borrows its reasoning from the host CLI you point it at, writes a dream report for the\npass, and cannot delete anything unattended. → [Manage](docs\u002Fdesign\u002Fdomains\u002Fmanage.md)\n\n## Develop\n\n```bash\nuv run pytest -q && uv run ruff check . && uv run mypy\n```\n\nThe task lifecycle, the invariants a change must not break, and the docs to read before\ntouching an area are in [CLAUDE.md](CLAUDE.md).\n","agent-memory 是一个面向 AI 代理的本地优先、代理无关的长期记忆运行时系统。它以纯 Markdown 文件为唯一可信源，辅以可随时重建的 SQLite 索引；通过独立于代理的定时 Manage 进程实现记忆的自动归档、老化与价值驱动的遗忘（需人工确认删除）；支持确定性会话注入、BM25 检索和原生文件系统访问三种召回路径，且不集成任何 LLM 客户端，无需 API 密钥。适用于需要可审计、可版本控制、离线可用且具备强数据主权保障的 AI 代理记忆管理场景，如本地开发环境中的 Claude Code、Codex CLI 等 CLI 类智能代理。",2,"2026-09-06 02:30:05","CREATED_QUERY"]