跳到主要内容

记忆提供商

Hermes Agent 自带 8 个外部记忆大模型提供商(provider)插件,为智能体提供超出内置 MEMORY.mdUSER.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 会自动:

  1. 把 大模型提供商(provider) 上下文注入系统提示(provider 已知的内容)
  2. 在每轮前预取相关记忆(后台执行,不阻塞)
  3. 在每轮响应后同步对话内容 到 provider
  4. 在会话结束时提取记忆(适用于支持此能力的 provider)
  5. 把内置记忆写入镜像到外部 provider
  6. 加入 大模型提供商(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_profilehoncho_searchhoncho_contexthoncho_reasoninghoncho_conclude

架构特点: 双层上下文注入:基础层(session summary + representation + peer card,由 contextCadence 控制刷新)以及 dialectic supplement(由 LLM 生成的推理层,由 dialecticCadence 控制刷新)。会自动在冷启动提示与热会话提示之间切换。

三组正交配置项

  • contextCadence
  • dialecticCadence
  • dialecticDepth

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_searchviking_readviking_browseviking_rememberviking_add_resource

Mem0

服务端 LLM 事实提取,带语义搜索、重排序和自动去重。

最适合想把记忆管理完全交给服务端自动处理
依赖pip install mem0ai + API key
数据存储Mem0 Cloud
成本Mem0 定价

工具: mem0_profilemem0_searchmem0_conclude

Hindsight

长期记忆系统,带知识图谱、实体解析与多策略检索。hindsight_reflect 能做跨记忆综合,这是其他 大模型提供商(provider) 没有的能力。还能自动保留完整会话轮次(包括工具调用)并做 session 级文档跟踪。

最适合基于知识图谱的关系型记忆检索
依赖云模式:API key;本地模式:一个 LLM API key
数据存储Hindsight Cloud 或本地嵌入式 PostgreSQL
成本云收费 / 本地免费

工具: hindsight_retainhindsight_recallhindsight_reflect

Holographic

本地 SQLite 事实存储,结合 FTS5 全文搜索、信任分数和 HRR(Holographic Reduced Representations)做组合式查询。

最适合本地优先、无外部依赖的高级记忆检索
依赖无(SQLite 自带),NumPy 可选
数据存储本地 SQLite
成本免费

工具: fact_storefact_feedback

RetainDB

云记忆 API,支持混合搜索(向量 + BM25 + reranking)、7 类记忆类型以及 delta 压缩。

最适合已在使用 RetainDB 基础设施的团队
依赖RetainDB 账号 + API key
数据存储RetainDB Cloud
成本$20/月

工具: retaindb_profileretaindb_searchretaindb_contextretaindb_rememberretaindb_forget

ByteRover

通过 brv CLI 提供持久记忆。采用层级知识树与分级检索(模糊文本 → LLM 搜索),本地优先并可选云同步。

最适合希望拥有可迁移、本地优先 CLI 记忆的开发者
依赖ByteRover CLI
数据存储本地(默认)或 ByteRover Cloud
成本免费 / 云端收费

工具: brv_querybrv_curatebrv_status

Supermemory

语义长期记忆,支持 profile recall、语义搜索、显式记忆工具,以及通过 graph API 在会话结束后摄取整段对话。

最适合需要语义召回、用户画像和会话级图构建
依赖pip install supermemory + API key
数据存储Supermemory Cloud
成本Supermemory 定价

工具: supermemory_storesupermemory_searchsupermemory_forgetsupermemory_profile

Provider 对比

ProviderStorageCostToolsDependenciesUnique Feature
HonchoCloudPaid5honcho-aiDialectic 用户建模 + session-scoped context
OpenVikingSelf-hostedFree5openviking + server文件系统层次 + 分级加载
Mem0CloudPaid3mem0ai服务端 LLM 提取
HindsightCloud/LocalFree/Paid3hindsight-client知识图谱 + reflect 综合
HolographicLocalFree2NoneHRR 代数 + 信任分数
RetainDBCloud$20/mo5requestsDelta compression
ByteRoverLocal/CloudFree/Paid3brv CLI压缩前提取
SupermemoryCloudPaid4supermemoryContext 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