# Hermes Memory Editor **Repository Path**: neoman/hermes-memory-editor ## Basic Information - **Project Name**: Hermes Memory Editor - **Description**: Hermes Memory Editor - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-08-20 - **Last Updated**: 2026-08-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Hermes Memory Editor(记忆管理) > [English](/README.md) · [中文版 (Chinese)](/README_CN.md) 一个 Hermes Agent Dashboard 插件:在浏览器里查看和编辑所有 profile 的记忆文件与人格文件。 ## 项目解决的痛点 Hermes Agent 把持久上下文存放在纯 Markdown 文件里: - `MEMORY.md` — 工作笔记 / 环境事实(在 `memories/` 目录) - `USER.md` — 用户画像 / 偏好(在 `memories/` 目录) - `SOUL.md` — 人格 / 身份设定(在 profile 根目录) dashboard **没有内置界面**可以查看或编辑这些文件(它只有记忆 provider 的配置项)。没有这个插件,你就只能: 1. 手动在磁盘上定位 `~/.hermes/profiles/<名字>/memories/` 下的文件 2. 每个 profile 都要打开终端和文本编辑器 3. 自己记着哪个 profile 对应哪个文件,而且 `SOUL.md` 在**另一个目录**(profile 根目录,不在 `memories/`)——很容易漏掉 4. 只能猜自己的编辑有没有超过配置的字符上限 **Hermes Memory Editor 一次性解决这些问题:** 一个网页列出所有 profile,三个文件都能编辑并即时写盘,显示字符数和配置上限(超限红色高亮),并用指示灯标示每个 profile 有哪些文件——不用开终端,不用手动翻路径。 ## 功能 - 侧边栏新增「记忆管理」标签页(路径 `/memory-editor`) - 列出 Hermes 全部 profile(默认 profile + `~/.hermes/profiles/*` 下的命名 profile) - 每个 profile 可查看 / 编辑三个文件: | 文件 | 位置 | 作用 | |---|---|---| | `MEMORY.md` | `memories/` 目录 | 工作笔记 / 环境事实 | | `USER.md` | `memories/` 目录 | 用户画像 / 偏好 | | `SOUL.md` | profile 根目录 | 人格 / 身份设定 | - 编辑后点「保存」即时写盘,下次会话自动生效(无需重启) - 侧边栏 M / U / S 指示灯标示各文件是否存在 - 显示字符数与配置上限(读取 `memory.memory_char_limit` / `memory.user_char_limit` / `context_file_max_chars`,未配置时回落默认值),超限红色高亮 - 界面适配 dashboard 深色主题 ## 安装 ```bash # 1. 拷贝插件目录到 Hermes 插件目录 cp -r hermes-memory-editor ~/.hermes/plugins/ # 2. 在 ~/.hermes/config.yaml 的 plugins.enabled 里加入 hermes-memory-editor # 例如: # plugins: # enabled: # - hermes-memory-editor # 3. 重启 dashboard(后端 API 路由在启动时挂载) hermes dashboard --stop hermes dashboard ``` ## 使用 1. 打开 dashboard(默认 http://127.0.0.1:9119)并登录 2. 左侧边栏点击「记忆管理」 3. 左侧选 profile,顶部选文件(MEMORY.md / USER.md / SOUL.md) 4. 编辑内容,点「保存」 ## 目录结构 ``` hermes-memory-editor/ └── dashboard/ ├── manifest.json # 插件清单(名称、标签页路径、入口、API) ├── plugin_api.py # 后端 API(列出 profile、读/写记忆文件) └── dist/ ├── index.js # 前端界面(React,无构建) └── style.css # 界面样式 ``` ## 迁移到其他机器 整个 `hermes-memory-editor/` 目录拷到目标机器的 `~/.hermes/plugins/` 下,按「安装」步骤 2、3 操作即可。插件内部路径解析使用 `HERMES_HOME`(未设置时用 `~/.hermes`),自动适配目标机器。 ## 安全设计 - 仅允许读写白名单文件名:`MEMORY.md` / `USER.md` / `SOUL.md` - 拒绝路径穿越(`../`、绝对路径、符号链接逃逸) - 拒绝非字符串内容写入 - 写操作直接落盘,不做多余处理 ## 兼容性 - 依赖 Hermes 的 Dashboard SPA 插件机制(`window.__HERMES_PLUGIN_SDK__` + `window.__HERMES_PLUGINS__.register`) - 升级 Hermes 不影响本插件(用户插件位于 `~/.hermes/plugins/`,升级只更新 `~/.hermes/hermes-agent/` 源码目录) - 若未来 Hermes 大版本变更插件 SDK 接口,可能需要小幅适配 ## 版本历史 - 1.0.0:初版,支持 MEMORY.md / USER.md - 1.1.0:新增 SOUL.md(人格文件)支持 - 1.2.0:显示字符数与配置上限(超限高亮)