Skip to content

feat: add Hermes Agent MemOS integration#1963

Open
dnegxuantian wants to merge 1 commit into
MemTensor:mainfrom
dnegxuantian:feat/hermes-memos-raw-ingestion
Open

feat: add Hermes Agent MemOS integration#1963
dnegxuantian wants to merge 1 commit into
MemTensor:mainfrom
dnegxuantian:feat/hermes-memos-raw-ingestion

Conversation

@dnegxuantian

@dnegxuantian dnegxuantian commented Jun 24, 2026

Copy link
Copy Markdown

Description

本 PR 为 Hermes Agent 增加 MemOS 集成,覆盖三条能力链路:

  • Hermes 接入 MemOS 的方法:提供 setup.sh 一键配置脚本、Hermes 用户插件示例和集成文档。
  • Hermes 既有记忆全量迁移到 MemOS:提供 migrate_hermes_memory.py,读取 ~/.hermes/memories/MEMORY.mdUSER.md,按内容分类迁移到 text_mem / pref_mem
  • Hermes 新对话增量同步到 MemOS,并交给 Scheduler 沉淀:提供 hermes_log_syncer.py,读取 ~/.hermes/logs/agent.log 识别完整 turn,结合 ~/.hermes/state.db 补全内容,先写入 RawConversationTurn,再批量提交给 MemOS Scheduler / MemReader。

Implementation notes

  • 原始对话轮次以 status="archived" 存储为源材料,正常检索不会直接召回原始聊天记录。
  • 批处理复用现有 MEM_READ 调度路径,由 MemOS 负责提取、合并、压缩和组织。
  • 同步器支持本地或远程 MCP 端点,可通过 --mcp-urlMEMOS_MCP_URL~/.hermes/memos-log-syncer.json 配置。

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (does not change functionality, e.g. code style improvements, linting)
  • Documentation update

How Has This Been Tested?

  • Unit Test
  • Test Script Or Tests Steps (please provide)
  • Pipeline Automated API Test (please provide)

本地运行 pytest 覆盖 4 个测试文件共 33 个用例,全部通过(33 passed, 1 warning):

  • tests/api/test_mcp_serve.py
  • tests/examples/test_hermes_log_syncer.py
  • tests/examples/test_hermes_memos_plugin.py
  • tests/examples/test_migrate_hermes_memory.py
PYTHONPATH=src:. .venv/bin/pytest \
  tests/examples/test_hermes_log_syncer.py \
  tests/examples/test_hermes_memos_plugin.py \
  tests/examples/test_migrate_hermes_memory.py \
  tests/api/test_mcp_serve.py \
  -q

代码风格通过 ruff format + ruff check

Checklist

  • I have performed a self-review of my own code | 我已自行检查了自己的代码
  • I have commented my code in hard-to-understand areas | 我已在难以理解的地方对代码进行了注释
  • I have added tests that prove my fix is effective or that my feature works | 我已添加测试以证明我的修复有效或功能正常

@dnegxuantian dnegxuantian reopened this Jun 24, 2026
@dnegxuantian dnegxuantian changed the title feat: add Hermes Agent MCP memory integration feat: add Hermes Agent MemOS integration Jun 25, 2026
@dnegxuantian dnegxuantian reopened this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant