macOS / Linux
推荐入口。适合远程安装、更新和后续一键卸载。
curl -fsSL https://github.com/liuyang0508/agent-memory-hub/releases/latest/download/install.sh | shAgent Memory Hub 把上下文收束成本地文件系统
基于 Hopfield 式联想召回、可治理的遗忘曲线和证据门禁,让你的 AI Agent 工具共享同一份可信事实层
告别数据孤岛降低上下文噪音
Codex
Hermes
OpenHuman
OpenSquilla
Wukong
Aone CopilotMemoryItem Markdown长期事实源messages.jsonl原始对话证据write ledger写入来源账本file · URL · multimodal资源记录parsed text文本抽取/资源解析adapter · injection · recall运行证据账本LoopRun目标与验证闭环.index-dirty · FTS/vector待重放与派生索引Quick start
选择你熟悉的安装入口,把 CLI、本地后管和 Agent runtime 一次装好。所有路径都会回到同一个 ~/.agent-memory-hub/,先跑起来,再接入你的 AI Agent 工具。
推荐入口。适合远程安装、更新和后续一键卸载。
curl -fsSL https://github.com/liuyang0508/agent-memory-hub/releases/latest/download/install.sh | sh在 PowerShell 中执行,安装 Windows 侧 CLI 与本地后管入口。
powershell -ExecutionPolicy ByPass -c "irm https://github.com/liuyang0508/agent-memory-hub/releases/latest/download/install.ps1 | iex"适合习惯用 brew 管理桌面工具和命令行入口的 macOS 用户。
brew install --cask liuyang0508/agent-memory-hub/agent-memory-hub适合 Node 工具链用户,快速获得全局 memory 命令。
npm install -g agent-memory-hub打开 Web Admin,查看 Agent、运行证据、本机历史源和记忆草稿。
memory serve --port 8765 --open如果它对你造成了烦恼,可以用同一个远程入口卸载。
curl -fsSL https://github.com/liuyang0508/agent-memory-hub/releases/latest/download/install.sh | sh -s -- --uninstallCore capabilities
维护、召回、治理和评估不是四张孤立卡片。AMH 把每一次写入、检索、注入和验证落到本地路径,再让 Agent 在同一份事实层上继续工作。
从 evidence 到 MemoryItem,写入有来源、有类型、有成熟度。
FTS、向量、RRF、MMR 与联想召回共同生成 ContextPack。
遗忘曲线、冲突替换、敏感门禁和反馈账本挡住噪音。
doctor、benchmark、recall gap 和 task outcome 回到同一证据口径。
mem-*.md · fact / decision / episode / artifactL0raw evidence ledgerEvidencemessages.jsonl · original transcript sourceL1write source ledgerL1files · urls · multimodal recordsL2OCR · ASR · VLM · parsed textL2adapter-events · recall-gaps · task-outcomesLedgerLoopRun · checkpoint · completion evidenceLoopreplay queue · manual reviewRepairFTS · vectors · metadata · refs_graphIndexAgent 不再把所有历史都塞进 prompt。AMH 先沉淀来源,再用检索与门禁生成最小可用上下文;每一次召回失败、治理动作和任务结果都会回写账本,形成闭环。
conversation / resource / extraction -> WriteService -> items/mem-*.md带证据写入query -> FTS5 + vector -> RRF -> MMR / Hopfield-style associative recall -> ContextPack预算内召回ContextFirewall -> sensitivity / freshness / conflict / low-value filters -> prompt injection证据门禁adapter-events.jsonl + recall-gaps.jsonl + task-outcomes.jsonl -> evaluation report持续评估长期事实源可审计、可替换、可链接。
网页、仓库、文档和多模态材料像目录一样进入本地层。
能力说明和调用边界可被检索、复用和治理。
原始来源不混进长期记忆,评估和追溯有据可查。
Co-create
Agent Memory Hub 还不是“万能记忆答案”,它更像一套本地优先、证据优先的上下文基础设施。谢谢每一个真实工作流、失败案例、评测样本、adapter 证据和治理建议。它们会变成下一版更安静、更可靠的大脑。
让每一次沉淀,成为下一次出发。
Agent Memory Hub 把不同 Agent 和不同角色沉淀的可复用结论,整理成同一份本地可信事实层。原始对话先进 Evidence,长期知识写成 MemoryItem,召回候选经过 ContextFirewall,最后以可追溯的 ContextPack 分层注入。
curl -fsSL https://github.com/liuyang0508/agent-memory-hub/releases/latest/download/install.sh | shmemory doctor && memory adapter doctor codex --format jsonmemory search "README 维护 召回 叙事顺序" --context-firewall --format textWhy it matters
AMH 解决的不是“多存一份聊天记录”,而是把调研、产品、运营、客服、销售、研发和复盘里值得复用的结论放到同一层可信上下文。工具可以切换,事实、来源、有效期和注入边界不能丢。
Claude Code、Codex、Qoder、Cursor 等工具各有上下文边界。AMH 把可复用结论写成 MemoryItem,让下一棒 Agent 不再从零理解背景。
产品、运营、客服、销售、研发会留下不同粒度的事实。AMH 把客户背景、商品口径、技术边界和复盘结论放到同一事实层。
transcript 里混着噪声、隐私、过期状态和被否定过的建议。AMH 先保存 Evidence,再通过 WriteService 提炼长期记忆。
BM25、向量、RRF、decay、feedback、MMR、Hopfield 和图谱扩展只服务候选排序;能不能进入 prompt 由 ContextFirewall 和 ContextPack 决定。
Not a transcript warehouse
Brand assets
首屏负责讲清“多 Agent 共享第二大脑”和三步启动;品牌资产区负责留下稳定识别。完整 lockup 用于官网、分享页和技术材料;README 顶部只保留克制文本,避免压过快速试用和能力边界。
让每一次沉淀,成为下一次出发。
Shared memory for the next agent loop. 这句话作为品牌签名出现,不替代产品定位,也不抢首屏任务入口。
Domain story
商品上线不是单个研发任务。商品、交易、库存、支付、履约、售后、营销、客服和复盘都会产生长期上下文;这些上下文如果锁在各自 Agent 的会话里,下一棒就只能重新解释。AMH 把可复用结论写成 MemoryItem,让不同角色和不同 Agent 围绕同一份事实继续工作。
Real usage path
第一道门是 query signal:低信息轮次不查记忆。第二道门是召回排序:BM25、向量、RRF 和后处理只产出候选。第三道门是 ContextFirewall:只有通过时效、来源、反馈和预算检查的候选,才会被 ContextPack 装成 locator、overview 或 detail。
Capability map
UserPromptSubmit、Stop transcript ingest、conversation/resource/multimodal sidecar、harvest、WriteService、Markdown source of truth、pending replay、dirty index repair。
ResourceStore、resources/*.json、extractions/*.json、OCR/ASR/VLM/PDF 提取、resource promote-extraction、Obsidian/export;外部证据不绕过 WriteService。
items_meta、items_fts、items_vec、refs_graph、Memory Profile、hierarchy sidecar 都是 derived surface;坏了可以重建,不改写 Markdown truth。
query signal gate、SearchFilter、FTS5/BM25、vector、RRF、metadata phrase boost、optional rerank、decay、feedback value、status/handoff、runtime evidence、temporal/supersession。
ContextFirewall、duplicate cluster、cohort coverage、item cap、token budget、ContextPack locator/overview/detail、detail_uri、retrieve hint、injection cohort ledger。
feedback、drift、duplicates、review、maturity、conversation hot/warm/cold/frozen tiering、semantic proactive candidates、auto governance、evolve。
loop run、contract validate、verify、feedback、gate open/approve/reject、budget、checkpoint、artifact/outcome evidence;AMH 记录和验证 loop,不替代执行器。
MMR、Hopfield expansion、refs_graph expansion、cross-encoder rerank、Headroom-style compression 和 GraphRAG 类能力都要受 benchmark gate 控制。
CLI / MCP / SDK / Web Admin / hooks / adapter install / doctor / verify / install-verify / uninstall,入口不同,能力以 doctor 和 docs contract 为准。
memory-lineage、data-flow cockpit、runtime ledger、injection cohorts、recall gaps、evolution_control、install/uninstall actions 和 web surface lock 共同约束本地管理台。
retrieval-gate、compression-gate、system few-shot gate、ml-advisory-gate、docs truth contract、web surface lock;PASS 只说明当前矩阵,不保证未来所有 prompt。
Memory Profile 可渲染 AMH-managed `CLAUDE.md`、`AGENTS.md`、Cursor rules;这些是派生配置面,不是新的事实源。
System internals
AMH 把事实的产生、写入、召回、注入、反馈和复核拆成独立边界。每一层都有可解释证据,未来智能体只能使用通过边界的那部分。
Evidence 先保留原始来源,再经过 candidate、audit、WriteService 写成 MemoryItem。pending 是 repair queue,不是第二事实源;poison records 达到重试上限后进入 pending/dead。
BM25/FTS5 与 vector 并行,RRF 融合,再经过 metadata phrase、rerank、decay、feedback、runtime/status、temporal/supersession。MMR、Hopfield、graph 是可选 knob。
ContextFirewall 可以因敏感度、废止、低置信、负反馈、source requirement、重复、cohort 或 token budget 拒绝整组候选。通过后才生成可逆 ContextPack。
drift、duplicates、review、maturity、tiering、auto governance、evolve 负责维护记忆质量;maturity 是治理建议,不是 live retrieval multiplier。
LoopRun 记录 goal、budget、checkpoint、verification、artifact、outcome 和 event。它帮助跨会话承接,但不自动执行外部 Agent、不替用户创建分支或跳过验证。
capability record 包含 support level、hooks、MCP、runtime evidence、verification evidence、blockers 和 limitations。install-ready 不是 verified。
Memory Profile 可以生成 managed CLAUDE.md、AGENTS.md 和 Cursor rules 块,帮助不同 Agent 读同一组高置信记忆;Profile 可重建,事实仍在 MemoryItem。
memory-lineage、data-flow cockpit、runtime ledger、injection cohorts、recall gaps、evolution_control 和 Web surface lock 把写入、召回、注入、治理的证据串起来。
retrieval、compression、system few-shot、ML/DL advisory、docs truth 和 web surface lock gate 都是发布边界;可选 rerank、Hopfield、graph、compression 不能绕过门禁变成默认。
Unified diagrams
每张图都保持可编辑 SVG 源文件,箭头只表达真实数据或控制流;计划、旁路和外部评测边界会在图注里说清楚,不用装饰性连线制造复杂感。
从 Agent 接入、证据维护、候选召回、反馈治理到评估门禁分层展开。已去掉容易误导的竖向回流线,只保留层间默认流向和底部能力导航。
把 Query Signal、Evidence、MemoryItem、Index、Retrieval、Firewall、ContextPack 和 Loop 放在一条操作回路里。
按 agent_integrations、agent_runtime_kit、agent_brain 和 ~/.agent-memory-hub 数据层拆清代码边界。
维护链路先固化 MemoryItem、Index Projection 和 Runtime Ledger;召回链路只读取这个交接面。
清楚区分 Evidence、MemoryItem、RetrievedItem、RankedItem、FirewalledItem、ContextPack 和 FeedbackEvent。
BM25/向量、RRF、metadata phrase、rerank、decay、feedback、MMR、Hopfield、graph 与防火墙按真实顺序呈现。
把 install、doctor、runtime event、MCP probe 和 context effectiveness 分开,不把 install-ready 写成 verified。
Algorithm notes
每个公式都说明它解决哪一段问题、接收什么输入、提供什么保证,以及在哪些条件下不能被误读。RRF、decay、feedback、MMR、Hopfield 和 ContextPack budget 都按同一模板展开。
Adapter truth contract
README 和 capability ledger 的口径是:当前快照 11 verified、4 install-ready、1 wip。verified 仍只代表当前机器和当前版本证据,新机器、新 CLI、新 hook payload 都要重跑 doctor/runtime/context-effectiveness。
Codex CLI、QoderWork,以及 Aider、Aone Copilot、Cline、Continue、Cursor、GitHub Copilot、Hermes Agent、OpenHuman、OpenSquilla 等当前快照内有 verified 记录。
Claude Code、Qoder、Wukong、OpenClaw 有安装/doctor/runtime 相关证据,但不能说成当前 verified;需要本地 runtime 或 context-effectiveness 证明。
agent_integrations 负责不同 Agent 的配置位置、adapter capability record、AMH-owned block、uninstall、doctor、verify;不在 prompt-time 实现检索或防火墙。
agent_runtime_kit 负责 hooks、MCP launcher、工具脚本、记忆纪律和 handoff 模板;agent_brain 负责 WriteService、Retriever、ContextFirewall、ContextPack、Web 和 benchmark。
Surfaces
CLI、MCP、SDK、Web、Profile 和 benchmark API 读写同一份本地事实层,但每个入口都有自己的职责边界。安装、自检和批处理优先走 CLI;Agent 集成优先看 MCP / hooks;人工诊断、证据浏览和治理建议优先看 Web Admin。
install、doctor、search、read、sync-pending、conversation、resource promote-extraction、govern hierarchy/auto、benchmark、adapter install-verify、loop gate 和 loop complete。它是安装、自检、维护和验证的主入口。
给支持 MCP 的 Agent 提供工具入口;可配合 hooks 做 prompt-time 检索、读取和 runtime evidence。
Python 接口可用于应用内读写、检索、资源 sidecar、诊断和评测接入。
本地管理台查看记忆、资源、运行账本、memory-lineage、data-flow cockpit、recall gaps、evolution_control、adapter 证据和演化建议。它是人工复核、诊断和可视化治理的主入口。
Memory Profile 将高置信 MemoryItems 派生成 CLAUDE.md、AGENTS.md、Cursor rules 等 managed block,方便不同 Agent 共享同一事实面。
Web /api/retrieval-gate、/api/compression-gate、/api/ml-advisory-gate 和 system benchmark 把默认能力变更收束到可验收门禁。
Evidence and boundaries
这页的能力覆盖以当前 README.zh.md 和 docs/evaluation/latest-memory-benchmark-report.zh.md 为准;OpenViking 只作为 context database、L0/L1/L2 tiered loading、recursive retrieval、retrieval trajectory 的设计参考。
本页按 tests/unit/test_docs_truth_contract.py 对 README 和 capability ledger 做覆盖审计,不再靠单轮反馈补词。能力覆盖必须回到代码、命令、测试或验证账本。
memory benchmark system --max-cases 240 覆盖 query gate、retrieval、Recall@10、MRR、block / inject、firewall、pack 等门禁;PASS 是当前矩阵结果,不证明未来所有 prompt 都会正确召回。
retrieval-gate 看 recall@1、recall@k、MRR;compression-gate 看 must-keep anchors、noise removal、token savings 和 reversibility;ml-advisory-gate 阻止未通过隐私/延迟/证据审查的模型增强直接默认上线。
tests/unit/test_docs_truth_contract.py 和 web surface lock 用来防止 README、预览、adapter 边界和图示说明静默漂移。
MemoryData / OpenDataBox source-lock 与入口已经说明;外部 smoke/full 依赖 datasets、rank_bm25、MemoryAgentBench / LoCoMo / LongBench / MemBench 数据集和 OpenAI-compatible endpoint,不填无法复核的榜单数字。
ResourceStore、resources/*.json、extractions/*.json、OCR/ASR/VLM/PDF 提取和 promote-extraction 已有路径;主链路融合和更完整导入仍按 README 的边界推进。
memory conversation ingest/list/read/rebalance 和 MCP conversation tools 支持 message-level evidence、access_count 与 hot/warm/cold/frozen tiering;conversation 仍是 evidence source。
semantic proactive v2 写 review/proactive-candidates.jsonl 等待批准;L2/L3 hierarchy sidecar 写 derived/hierarchical-memory.json,不直接修改 items/。
导出和外部知识库属于入口/同步能力,不替代 WriteService 和 Markdown MemoryItem source of truth。
locator、overview、detail 的选择发生在 ContextPack budget 内;用户真实使用时是否注入由 hook、检索结果、防火墙和预算共同决定。