PersonalClone:让 AI 助手真正记住你的偏好、风格和边界
·
开源一个 Hermes 记忆插件:PersonalClone,本地提取用户画像并自动注入上下文

项目简介
最近做了一个 Hermes 插件:PersonalClone Hermes Memory Provider。
它的核心功能是从 Hermes 历史会话中提取长期偏好、写作风格和互动习惯,生成本地用户画像,并在后续对话中作为 memory context 自动注入。
项目地址:https://github.com/uishd666/hermes-personal-clone
背景
在日常使用 AI 编程助手时,经常会遇到几个问题:
- 新会话不了解历史项目背景
- 用户偏好需要反复说明
- 回答风格不稳定
- AI 不知道哪些内容应该简洁、哪些内容需要展开
- 长期协作中的沟通习惯无法沉淀
PersonalClone 的目标不是做一个完整的“数字分身”,而是把用户在长期对话中重复出现的偏好和风格整理成结构化上下文,让 Hermes 后续回答更贴近用户。
功能特性
- 复用 Hermes 当前 LLM 配置,不需要为插件单独配置模型
- 自动读取
$HERMES_HOME/sessions - 必要时回退读取
$HERMES_HOME/state.db - 本地生成
persona.yaml、style.yaml、interactions.jsonl、style_fingerprint.yaml - 支持 memory provider 自动注入
- 支持
/clone画像对话模式 - 运行数据存放在当前 Hermes profile 下,不写入源码目录
安装
在 Hermes 使用的 Python 环境中安装依赖:
pip install -r requirements.txt
将插件目录复制或软链接到 Hermes 插件目录:
mkdir -p ~/.hermes/plugins
ln -s /path/to/hermes-persona-clone/final_version ~/.hermes/plugins/personalclone
启用插件:
hermes plugins enable personalclone
hermes config set memory.provider personalclone
也可以使用 Hermes 的 memory setup 流程:
hermes memory setup
常用命令
查看状态:
hermes memory status
hermes personalclone status
从历史会话初始化画像:
hermes personalclone bootstrap --limit-sessions 50
重建画像:
hermes personalclone rebuild
导出画像:
hermes personalclone export --output /path/to/personalclone-export.json
启用、禁用和删除:
hermes personalclone disable
hermes personalclone enable
hermes personalclone delete --yes
本地测试:
python cli.py --hermes-home ~/.hermes status
python cli.py --hermes-home ~/.hermes bootstrap --no-llm
/clone 模式
在 hermes chat 中输入:
/clone
即可开启画像对话模式。此时 Hermes 会以生成出的用户画像作为第一人称身份回应,适合用来检查画像是否准确。
相关命令:
/clone
/clone status
/clone off
数据目录
运行时文件保存在:
$HERMES_HOME/personalclone/
├── config.yaml
├── raw_turns.jsonl
├── meta.json
├── data/processed_hermes/*.txt
└── output/
├── persona.yaml
├── style.yaml
├── interactions.jsonl
└── style_fingerprint.yaml
注意:这些文件可能包含聊天历史、个人偏好、工作上下文、写作习惯等敏感信息,不建议提交到公开仓库。
适用场景
- Hermes 用户希望增强 memory 能力
- AI 编程助手需要长期理解用户偏好
- 需要分析个人写作风格或沟通习惯
- 想研究 persona、style fingerprint、AI memory provider 的实现方式
总结
PersonalClone 是一个偏实用的 Hermes memory provider。它通过本地分析历史会话,把用户画像和风格偏好沉淀为结构化文件,再注入到后续对话中,减少重复 prompt,提高 AI 协作的连续性。
欢迎试用、提 issue 或一起改进。
更多推荐


所有评论(0)