记忆提供商
Hermes Agent 自带 8 个外部记忆大模型提供商(provider)插件,为智能体提供超出内置 MEMORY.md 与 USER.md 的跨会话持久知识。任意时刻只能激活 一个 外部 provider;内置记忆始终与其并行启用。
快速开始
hermes memory setup # 交互式选择与配置
hermes memory status # 查看当前启用状态
hermes memory off # 关闭外部 provider
你也可以通过 hermes plugins → Provider Plugins → Memory Provider 选择活动的记忆 provider。
也可以直接在 ~/.hermes/config.yaml 中设置:
memory:
provider: openviking # or honcho, mem0, hindsight, holographic, retaindb, byterover, supermemory
工作原理
当外部记忆 大模型提供商(provider) 激活后,Hermes 会自动:
- 把 大模型提供商(provider) 上下文注入系统提示(provider 已知的内容)
- 在每轮前预取相关记忆(后台执行,不阻塞)
- 在每轮响应后同步对话内容 到 provider
- 在会话结束时提取记忆(适用于支持此能力的 provider)
- 把内置记忆写入镜像到外部 provider
- 加入 大模型提供商(provider) 专属工具,供智能体检索、存储和管理记忆
内置记忆(MEMORY.md / USER.md)会保持原样工作;外部 大模型提供商(provider) 是增量能力,而非替代。
可用 providers
Honcho
以 AI 原生方式进行跨会话用户建模,支持 dialectic reasoning、会话级上下文注入、语义搜索和持久 conclusions。基础上下文中会同时包含 session summary、用户表示与 peer cards,使智能体知道当前会话已经讨论过什么。
| 最适合 | 多智能体系统、跨会话上下文、用户-智能体对齐 |
| 依赖 | pip install honcho-ai + API key 或自托管实例 |
| 数据存储 | Honcho Cloud 或自托管 |
| 成本 | Honcho 定价(云)/ 免费(自托管) |
工具(5 个): honcho_profile、honcho_search、honcho_context、honcho_reasoning、honcho_conclude
架构特点: 双层上下文注入:基础层(session summary + representation + peer card,由 contextCadence 控制刷新)以及 dialectic supplement(由 LLM 生成的推理层,由 dialecticCadence 控制刷新)。会自动在冷启动提示与热会话提示之间切换。
三组正交配置项:
contextCadencedialecticCadencedialecticDepth
Setup Wizard:
hermes honcho setup
# or
hermes memory setup # select "honcho"
Config: $HERMES_HOME/honcho.json(profile 级)或 ~/.honcho/config.json(全局)。
OpenViking
由 Volcengine(ByteDance)提供的上下文数据库,带有类似文件系统的知识层次、分级检索,以及按 6 类自动提取记忆。
| 最适合 | 自托管知识管理与结构化浏览 |
| 依赖 | pip install openviking + 运行中的服务 |
| 数据存储 | 自托管 |
| 成本 | 免费 |
工具: viking_search、viking_read、viking_browse、viking_remember、viking_add_resource
Mem0
服务端 LLM 事实提取,带语义搜索、重排序和自动去重。
| 最适合 | 想把记忆管理完全交给服务端自动处理 |
| 依赖 | pip install mem0ai + API key |
| 数据存储 | Mem0 Cloud |
| 成本 | Mem0 定价 |
工具: mem0_profile、mem0_search、mem0_conclude
Hindsight
长期记忆系统,带知识图谱、实体解析与多策略检索。hindsight_reflect 能做跨记忆综合,这是其他 大模型提供商(provider) 没有的能力。还能自动保留完整会话轮次(包括工具调用)并做 session 级文档跟踪。
| 最适合 | 基于知识图谱的关系型记忆检索 |
| 依赖 | 云模式:API key;本地模式:一个 LLM API key |
| 数据存储 | Hindsight Cloud 或本地嵌入式 PostgreSQL |
| 成本 | 云收费 / 本地免费 |
工具: hindsight_retain、hindsight_recall、hindsight_reflect
Holographic
本地 SQLite 事实存储,结合 FTS5 全文搜索、信任分数和 HRR(Holographic Reduced Representations)做组合式查询。
| 最适合 | 本地优先、无外部依赖的高级记忆检索 |
| 依赖 | 无(SQLite 自带),NumPy 可选 |
| 数据存储 | 本地 SQLite |
| 成本 | 免费 |
工具: fact_store、fact_feedback
RetainDB
云记忆 API,支持混合搜索(向量 + BM25 + reranking)、7 类记忆类型以及 delta 压缩。
| 最适合 | 已在使用 RetainDB 基础设施的团队 |
| 依赖 | RetainDB 账号 + API key |
| 数据存储 | RetainDB Cloud |
| 成本 | $20/月 |
工具: retaindb_profile、retaindb_search、retaindb_context、retaindb_remember、retaindb_forget
ByteRover
通过 brv CLI 提供持久记忆。采用层级知识树与分级检索(模糊文本 → LLM 搜索),本地优先并可选云同步。
| 最适合 | 希望拥有可迁移、本地优先 CLI 记忆的开发者 |
| 依赖 | ByteRover CLI |
| 数据存储 | 本地(默认)或 ByteRover Cloud |
| 成本 | 免费 / 云端收费 |
工具: brv_query、brv_curate、brv_status
Supermemory
语义长期记忆,支持 profile recall、语义搜索、显式记忆工具,以及通过 graph API 在会话结束后摄取整段对话。
| 最适合 | 需要语义召回、用户画像和会话级图构建 |
| 依赖 | pip install supermemory + API key |
| 数据存储 | Supermemory Cloud |
| 成本 | Supermemory 定价 |
工具: supermemory_store、supermemory_search、supermemory_forget、supermemory_profile
Provider 对比
| Provider | Storage | Cost | Tools | Dependencies | Unique Feature |
|---|---|---|---|---|---|
| Honcho | Cloud | Paid | 5 | honcho-ai | Dialectic 用户建模 + session-scoped context |
| OpenViking | Self-hosted | Free | 5 | openviking + server | 文件系统层次 + 分级加载 |
| Mem0 | Cloud | Paid | 3 | mem0ai | 服务端 LLM 提取 |
| Hindsight | Cloud/Local | Free/Paid | 3 | hindsight-client | 知识图谱 + reflect 综合 |
| Holographic | Local | Free | 2 | None | HRR 代数 + 信任分数 |
| RetainDB | Cloud | $20/mo | 5 | requests | Delta compression |
| ByteRover | Local/Cloud | Free/Paid | 3 | brv CLI | 压缩前提取 |
| Supermemory | Cloud | Paid | 4 | supermemory | Context fencing + session graph ingest |
Profile 隔离
每个 大模型提供商(provider) 的数据都会按 profile 隔离:
- 本地存储型 provider(Holographic、ByteRover)使用
$HERMES_HOME/路径,因此不同 profile 天然分离 - 配置文件型 provider(Honcho、Mem0、Hindsight、Supermemory)把配置存放在
$HERMES_HOME/下,因此每个 profile 都有自己的凭据 - 云 provider(如 RetainDB)会自动推导 profile 范围内的项目名
- 环境变量型 provider(OpenViking)则通过各自 profile 的
.env配置
构建自己的 Memory Provider
如需实现自定义 provider,请参阅 Developer Guide: Memory Provider Plugins。