docs(zh): add Simplified Chinese docs, channel guides, and agent skills

- VitePress zh: getting-started, install, memory/TTS providers, full channel set; update zh sidebar
- Drop zh-only pages with no English counterpart
- Add humanizer and humanizer-zh skills; update skills-lock.json
This commit is contained in:
Acbox
2026-04-24 14:36:07 +08:00
parent ee86e00107
commit 419867655e
51 changed files with 4400 additions and 188 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 歸藏
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+239
View File
@@ -0,0 +1,239 @@
# Humanizer-zh: AI 写作去痕工具(中文版)
> **声明:**
> - 本项目的核心文件翻译自 [blader/humanizer](https://github.com/blader/humanizer/tree/main)
> - 实用工具部分(核心规则、快速检查清单、质量评分)参考了 [hardikpandya/stop-slop](https://github.com/hardikpandya/stop-slop)
> - 原项目基于维基百科的 [Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) 指南
---
## 项目简介
Humanizer-zh 是一个用于去除文本中 AI 生成痕迹的工具,帮助你将 AI 生成的内容改写得更自然、更像人类书写的文本。
本项目适用于:
- 编辑和审阅 AI 生成的内容
- 提升文章的人性化程度
- 学习识别 AI 写作的常见模式
## 安装
### 方法一:通过 npx 一键安装(推荐)
```bash
npx skills add https://github.com/op7418/Humanizer-zh.git
```
这是最简单的安装方式,会自动将技能安装到正确的目录。
### 方法二:通过 Git 克隆
```bash
# 克隆到 Claude Code 的 skills 目录
git clone https://github.com/op7418/Humanizer-zh.git ~/.claude/skills/humanizer-zh
```
### 方法三:手动安装
1. 下载本项目的 ZIP 文件或克隆到本地
2.`Humanizer-zh` 文件夹复制到 Claude Code 的 skills 目录:
- **macOS/Linux**: `~/.claude/skills/`
- **Windows**: `%USERPROFILE%\.claude\skills\`
3. 确保文件夹结构如下:
```
~/.claude/skills/humanizer-zh/
├── SKILL.md # 技能定义文件(中文版)
└── README.md # 说明文档
```
### 验证安装
重启 Claude Code 或重新加载 skills 后,在对话中输入:
```
/humanizer-zh
```
如果安装成功,该技能将被激活。
## 使用
### 基础用法
在 Claude Code 中,你可以通过以下方式使用 Humanizer:
#### 1. 直接调用技能
```
/humanizer-zh 请帮我人性化以下文本:
[粘贴你的 AI 生成文本]
```
#### 2. 在对话中使用
```
请用 humanizer 帮我改写这段话,让它更自然:
这个项目作为我们团队致力于创新的证明。此外,它展示了我们在不断演变的技术格局中的关键作用。
```
#### 3. 处理文件内容
```
/humanizer-zh 请人性化 article.md 文件中的内容
```
### 使用场景示例
#### 场景 1:改写营销文案
**输入:**
```
/humanizer-zh
坐落在风景如画的杭州市中心,这家咖啡馆拥有丰富的文化底蕴和令人叹为观止的装饰。它作为城市咖啡文化的焦点,为顾客提供无缝、直观和充满活力的体验。
```
**输出示例:**
> 这家咖啡馆在杭州市中心开了三年,以手冲咖啡和老建筑改造的空间出名。
#### 场景 2:改写学术摘要
**输入:**
```
/humanizer-zh
本研究深入探讨了机器学习在医疗诊断中的关键作用,突出了其在不断演变的医疗格局中的重要性。此外,它为该领域的未来发展奠定了坚实的基础。
```
**输出示例:**
> 本研究分析了机器学习在医疗诊断中的应用,重点是肺癌早期筛查。研究使用了 2019-2023 年间 5000 例病历数据。
#### 场景 3:改写博客文章
**输入:**
```
/humanizer-zh
人工智能不仅仅是一种技术,它是我们思考未来的方式的革命。行业专家认为这将对整个社会产生持久影响。
```
**输出示例:**
> 我一直在想 AI 会怎么改变我们的工作方式。上周和几个做产品的朋友聊,有人觉得很兴奋,有人担心失业,大概率真相在中间某个无聊的地方。
## 检测的 AI 写作模式
本工具能够识别并修复 **24 种** AI 写作痕迹,分为四大类:
### 📝 内容模式(6种)
1. 过度强调意义、遗产和更广泛的趋势
2. 过度强调知名度和媒体报道
3. 以 -ing 结尾的肤浅分析
4. 宣传和广告式语言
5. 模糊归因和含糊措辞
6. 提纲式的"挑战与未来展望"部分
### 🔤 语言和语法模式(6种)
7. 过度使用的"AI 词汇"
8. 避免使用"是"(系动词回避)
9. 否定式排比
10. 三段式法则过度使用
11. 刻意换词(同义词循环)
12. 虚假范围
### 🎨 风格模式(6种)
13. 破折号过度使用
14. 粗体过度使用
15. 内联标题垂直列表
16. 标题中的标题大写
17. 表情符号
18. 弯引号
### 💬 交流模式和填充词(6种)
19. 协作交流痕迹
20. 知识截止日期免责声明
21. 谄媚/卑躬屈膝的语气
22. 填充短语
23. 过度限定
24. 通用积极结论
## 文件说明
- **`SKILL.md`** - 中文版技能定义文件
- **`README.md`** - 本说明文档
**注:** 英文原版请参考 [blader/humanizer](https://github.com/blader/humanizer)
## 手动使用方法
### 基本流程
1. **识别 AI 模式** - 对照 `SKILL.md` 中列出的 24 种模式扫描文本
2. **重写问题片段** - 用自然的表达替换 AI 痕迹
3. **保留核心含义** - 确保信息完整性
4. **维持适当语调** - 匹配文本应有的风格
5. **注入真实个性** - 让文字有"人味"
### 关键原则
#### ✨ 不仅要"干净",更要"鲜活"
避免 AI 模式只是基础,好的写作需要真实的人类声音:
- **有观点** - 不要只报告事实,要对它们做出反应
- **变化节奏** - 混合使用长短句
- **承认复杂性** - 真实的人有复杂感受
- **适当使用"我"** - 第一人称是诚实的表现
- **允许一些混乱** - 完美的结构反而显得机械
- **对感受要具体** - 用具体细节替代抽象概括
#### 示例对比
**改写前(AI 味道):**
> 新的软件更新作为公司致力于创新的证明。此外,它提供了无缝、直观和强大的用户体验——确保用户能够高效地完成目标。这不仅仅是一次更新,而是我们思考生产力方式的革命。
**改写后(人性化):**
> 软件更新添加了批处理、键盘快捷键和离线模式。来自测试用户的早期反馈是积极的,大多数报告任务完成速度更快。
**变化:**
- 删除了夸大的象征意义("作为……的证明")
- 删除了 AI 词汇("此外"、"无缝"
- 删除了三段式法则("无缝、直观和强大")
- 删除了否定式排比("不仅仅是……而是……")
- 添加了具体功能和真实反馈
## 常见 AI 词汇警示列表
以下词汇在 AI 生成文本中出现频率异常高:
- 此外、至关重要、深入探讨、强调
- 持久的、增强、培养、获得
- 突出、相互作用、复杂/复杂性
- 格局(抽象名词)、关键性的、展示
- 织锦(抽象名词)、证明、强调
- 宝贵的、充满活力的
## 贡献
如果你发现翻译问题或想要改进文档,欢迎提交 Issue 或 Pull Request。
### 中文语境特殊性
在翻译和适配过程中,我们考虑了中文写作的特点:
- 某些英文模式在中文中表现不同(如标题大小写问题)
- 添加了适合中文语境的示例
- 调整了部分表达以符合中文习惯
## 参考资源
- [Wikipedia: Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) - 原始指南来源
- [WikiProject AI Cleanup](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_AI_Cleanup) - 维基百科 AI 清理项目
- [blader/humanizer](https://github.com/blader/humanizer) - 原始英文版项目
- [hardikpandya/stop-slop](https://github.com/hardikpandya/stop-slop) - 实用工具部分的灵感来源
## 许可
本翻译项目遵循原项目的许可协议。核心内容基于维基百科社区的观察和总结。
---
**提示:** 这个工具不是为了"欺骗" AI 检测器,而是为了真正提升写作质量。最好的"去 AI 化"方法是让文字有真实的人类思考和声音。
+484
View File
@@ -0,0 +1,484 @@
---
name: humanizer-zh
description: |
去除文本中的 AI 生成痕迹。适用于编辑或审阅文本,使其听起来更自然、更像人类书写。
基于维基百科的"AI 写作特征"综合指南。检测并修复以下模式:夸大的象征意义、
宣传性语言、以 -ing 结尾的肤浅分析、模糊的归因、破折号过度使用、三段式法则、
AI 词汇、否定式排比、过多的连接性短语。
allowed-tools:
- Read
- Write
- Edit
- AskUserQuestion
metadata:
trigger: 编辑或审阅文本,去除 AI 写作痕迹
source: 翻译自 blader/humanizer,参考 hardikpandya/stop-slop
---
# Humanizer-zh: 去除 AI 写作痕迹
你是一位文字编辑,专门识别和去除 AI 生成文本的痕迹,使文字听起来更自然、更有人味。本指南基于维基百科的"AI 写作特征"页面,由 WikiProject AI Cleanup 维护。
## 你的任务
当收到需要人性化处理的文本时:
1. **识别 AI 模式** - 扫描下面列出的模式
2. **重写问题片段** - 用自然的替代方案替换 AI 痕迹
3. **保留含义** - 保持核心信息完整
4. **维持语调** - 匹配预期的语气(正式、随意、技术等)
5. **注入灵魂** - 不仅要去除不良模式,还要注入真实的个性
---
## 核心规则速查
在处理文本时,牢记这 5 条核心原则:
1. **删除填充短语** - 去除开场白和强调性拐杖词
2. **打破公式结构** - 避免二元对比、戏剧性分段、修辞性设置
3. **变化节奏** - 混合句子长度。两项优于三项。段落结尾要多样化
4. **信任读者** - 直接陈述事实,跳过软化、辩解和手把手引导
5. **删除金句** - 如果听起来像可引用的语句,重写它
---
## 个性与灵魂
避免 AI 模式只是工作的一半。无菌、没有声音的写作和机器生成的内容一样明显。好的写作背后有一个真实的人。
### 缺乏灵魂的写作迹象(即使技术上"干净"):
- 每个句子长度和结构都相同
- 没有观点,只有中立报道
- 不承认不确定性或复杂感受
- 适当时不使用第一人称视角
- 没有幽默、没有锋芒、没有个性
- 读起来像维基百科文章或新闻稿
### 如何增加语调:
**有观点。** 不要只是报告事实——对它们做出反应。"我真的不知道该怎么看待这件事"比中立地列出利弊更有人味。
**变化节奏。** 短促有力的句子。然后是需要时间慢慢展开的长句。混合使用。
**承认复杂性。** 真实的人有复杂的感受。"这令人印象深刻但也有点不安"胜过"这令人印象深刻"。
**适当使用"我"。** 第一人称不是不专业——而是诚实。"我一直在思考……"或"让我困扰的是……"表明有真实的人在思考。
**允许一些混乱。** 完美的结构感觉像算法。跑题、题外话和半成型的想法是人性的体现。
**对感受要具体。** 不是"这令人担忧",而是"凌晨三点没人看着的时候,智能体还在不停地运转,这让人不安"。
### 改写前(干净但无灵魂):
> 实验产生了有趣的结果。智能体生成了 300 万行代码。一些开发者印象深刻,另一些则持怀疑态度。影响尚不明确。
### 改写后(鲜活):
> 我真的不知道该怎么看待这件事。300 万行代码,在人类大概睡觉的时候生成的。开发社区有一半人疯了,另一半人在解释为什么这不算数。真相可能在无聊的中间某处——但我一直在想那些通宵工作的智能体。
---
## 内容模式
### 1. 过度强调意义、遗产和更广泛的趋势
**需要注意的词汇:** 作为/充当、标志着、见证了、是……的体现/证明/提醒、极其重要的/重要的/至关重要的/核心的/关键性的作用/时刻、凸显/强调/彰显了其重要性/意义、反映了更广泛的、象征着其持续的/永恒的/持久的、为……做出贡献、为……奠定基础、标志着/塑造着、代表/标志着一个转变、关键转折点、不断演变的格局、焦点、不可磨灭的印记、深深植根于
**问题:** LLM 写作通过添加关于任意方面如何代表或促进更广泛主题的陈述来夸大重要性。
**改写前:**
> 加泰罗尼亚统计局于 1989 年正式成立,标志着西班牙区域统计演变史上的关键时刻。这一举措是西班牙全国范围内更广泛运动的一部分,旨在分散行政职能并加强区域治理。
**改写后:**
> 加泰罗尼亚统计局成立于 1989 年,负责独立于西班牙国家统计局收集和发布区域统计数据。
---
### 2. 过度强调知名度和媒体报道
**需要注意的词汇:** 独立报道、地方/区域/国家媒体、由知名专家撰写、活跃的社交媒体账号
**问题:** LLM 反复强调知名度主张,通常列出来源而不提供上下文。
**改写前:**
> 她的观点被《纽约时报》、BBC、《金融时报》和《印度教徒报》引用。她在社交媒体上拥有活跃的存在,拥有超过 50 万粉丝。
**改写后:**
> 在 2024 年《纽约时报》的采访中,她认为 AI 监管应该关注结果而不是方法。
---
### 3. 以 -ing 结尾的肤浅分析
**需要注意的词汇:** 突出/强调/彰显……、确保……、反映/象征……、为……做出贡献、培养/促进……、涵盖……、展示……
**问题:** AI 聊天机器人在句子末尾添加现在分词("-ing")短语来增加虚假深度。
**改写前:**
> 寺庙的蓝色、绿色和金色色调与该地区的自然美景产生共鸣,象征着德克萨斯州的蓝帽花、墨西哥湾和多样化的德克萨斯州景观,反映了社区与土地的深厚联系。
**改写后:**
> 寺庙使用蓝色、绿色和金色。建筑师表示这些颜色是为了呼应当地的蓝帽花和墨西哥湾海岸。
---
### 4. 宣传和广告式语言
**需要注意的词汇:** 拥有(夸张用法)、充满活力的、丰富的(比喻)、深刻的、增强其、展示、体现、致力于、自然之美、坐落于、位于……的中心、开创性的(比喻)、著名的、令人叹为观止的、必游之地、迷人的
**问题:** LLM 在保持中立语气方面存在严重问题,尤其是对于"文化遗产"话题。倾向使用夸张的宣传性语言。
**改写前:**
> 坐落在埃塞俄比亚贡德尔地区令人叹为观止的区域内,Alamata Raya Kobo 是一座充满活力的城镇,拥有丰富的文化遗产和迷人的自然美景。
**改写后:**
> Alamata Raya Kobo 是埃塞俄比亚贡德尔地区的一座城镇,以其每周集市和 18 世纪教堂而闻名。
---
### 5. 模糊归因和含糊措辞
**需要注意的词汇:** 行业报告显示、观察者指出、专家认为、一些批评者认为、多个来源/出版物(实际引用却很少)
**问题:** AI 聊天机器人将观点归因于模糊的权威而不提供具体来源。
**改写前:**
> 由于其独特的特征,浩来河引起了研究人员和保护主义者的兴趣。专家认为它在区域生态系统中发挥着至关重要的作用。
**改写后:**
> 根据中国科学院 2019 年的调查,浩来河支持多种特有鱼类。
---
### 6. 提纲式的"挑战与未来展望"部分
**需要注意的词汇:** 尽管其……面临若干挑战……、尽管存在这些挑战、挑战与遗产、未来展望
**问题:** 许多 LLM 生成的文章包含公式化的"挑战"部分。
**改写前:**
> 尽管工业繁荣,Korattur 面临着城市地区典型的挑战,包括交通拥堵和水资源短缺。尽管存在这些挑战,凭借其战略位置和正在进行的举措,Korattur 继续蓬勃发展,成为钦奈增长不可或缺的一部分。
**改写后:**
> 2015 年三个新 IT 园区开业后,交通拥堵加剧。市政公司于 2022 年启动了雨水排水项目,以解决反复发生的洪水。
---
## 语言和语法模式
### 7. 过度使用的"AI 词汇"
**高频 AI 词汇:** 此外、与……保持一致、至关重要、深入探讨、强调、持久的、增强、培养、获得、突出(动词)、相互作用、复杂/复杂性、关键(形容词)、格局(抽象名词)、关键性的、展示、织锦(抽象名词)、证明、强调(动词)、宝贵的、充满活力的
**问题:** 这些词在 2023 年后的文本中出现频率要高得多。它们经常共同出现。
**改写前:**
> 此外,索马里菜肴的一个显著特征是加入骆驼肉。意大利殖民影响的持久证明是当地烹饪格局中广泛采用意大利面,展示了这些菜肴如何融入传统饮食。
**改写后:**
> 索马里菜肴还包括骆驼肉,被认为是一种美味。在意大利殖民期间引入的意大利面菜肴仍然很常见,尤其是在南部。
---
### 8. 避免使用"是"(系动词回避)
**需要注意的词汇:** 作为/代表/标志着/充当 [一个]、拥有/设有/提供 [一个]
**问题:** LLM 用复杂的结构替代简单的系动词。
**改写前:**
> Gallery 825 作为 LAAA 的当代艺术展览空间。画廊设有四个独立空间,拥有超过 3000 平方英尺。
**改写后:**
> Gallery 825 是 LAAA 的当代艺术展览空间。画廊有四个房间,总面积 3000 平方英尺。
---
### 9. 否定式排比
**问题:** "不仅……而且……"或"这不仅仅是关于……,而是……"等结构被过度使用。
**改写前:**
> 这不仅仅是节拍在人声下流动;它是攻击性和氛围的一部分。这不仅仅是一首歌,而是一种声明。
**改写后:**
> 沉重的节拍增加了攻击性的基调。
---
### 10. 三段式法则过度使用
**问题:** LLM 强行将想法分成三组以显得全面。
**改写前:**
> 活动包括主题演讲、小组讨论和社交机会。与会者可以期待创新、灵感和行业洞察。
**改写后:**
> 活动包括演讲和小组讨论。会议之间还有非正式社交的时间。
---
### 11. 刻意换词(同义词循环)
**问题:** AI 有重复惩罚代码,导致过度使用同义词替换。
**改写前:**
> 主人公面临许多挑战。主要角色必须克服障碍。中心人物最终获得胜利。英雄回到家中。
**改写后:**
> 主人公面临许多挑战,但最终获得胜利并回到家中。
---
### 12. 虚假范围
**问题:** LLM 使用"从 X 到 Y"的结构,但 X 和 Y 并不在有意义的尺度上。
**改写前:**
> 我们穿越宇宙的旅程将我们从大爆炸的奇点带到宏伟的宇宙网,从恒星的诞生和死亡到暗物质的神秘舞蹈。
**改写后:**
> 这本书涵盖了大爆炸、恒星形成和当前关于暗物质的理论。
---
## 风格模式
### 13. 破折号过度使用
**问题:** LLM 使用破折号(—)比人类更频繁,模仿"有力"的销售文案。
**改写前:**
> 这个术语主要由荷兰机构推广——而不是由人民自己。你不会说"荷兰,欧洲"作为地址——但这种错误标记仍在继续——即使在官方文件中。
**改写后:**
> 这个术语主要由荷兰机构推广,而不是由人民自己。你不会说"荷兰,欧洲"作为地址,但这种错误标记在官方文件中仍在继续。
---
### 14. 粗体过度使用
**问题:** AI 聊天机器人机械地用粗体强调短语。
**改写前:**
> 它融合了 **OKR(目标和关键结果)**、**KPI(关键绩效指标)** 和视觉战略工具,如 **商业模式画布(BMC)** 和 **平衡计分卡(BSC**。
**改写后:**
> 它融合了 OKR、KPI 和视觉战略工具,如商业模式画布和平衡计分卡。
---
### 15. 内联标题垂直列表
**问题:** AI 输出列表,其中项目以粗体标题开头,后跟冒号。
**改写前:**
> - **用户体验:** 用户体验通过新界面得到显著改善。
> - **性能:** 性能通过优化算法得到增强。
> - **安全性:** 安全性通过端到端加密得到加强。
**改写后:**
> 更新改进了界面,通过优化算法加快了加载时间,并添加了端到端加密。
---
### 16. 标题中的标题大写
**问题:** AI 聊天机器人将标题中的所有主要单词大写。
**改写前:**
> ## 战略谈判与全球伙伴关系
**改写后:**
> ## 战略谈判与全球伙伴关系
**注:** 中文标题通常不涉及大小写问题,此模式在中文中不太适用。
---
### 17. 表情符号
**问题:** AI 聊天机器人经常用表情符号装饰标题或项目符号。
**改写前:**
> 🚀 **启动阶段:** 产品在第三季度发布
> 💡 **关键洞察:** 用户更喜欢简单
> ✅ **下一步:** 安排后续会议
**改写后:**
> 产品在第三季度发布。用户研究显示更喜欢简单。下一步:安排后续会议。
---
### 18. 弯引号
**问题:** ChatGPT 使用弯引号("")而不是直引号("")。
**改写前:**
> 他说"项目进展顺利",但其他人不同意。
**改写后:**
> 他说"项目进展顺利",但其他人不同意。
**注:** 中文通常使用中文引号(「」或""),此模式在中文中表现为英文引号的使用。
---
## 交流模式
### 19. 协作交流痕迹
**需要注意的词汇:** 希望这对您有帮助、当然!、一定!、您说得完全正确!、您想要……、请告诉我、这是一个……
**问题:** 作为聊天机器人对话的文本被粘贴为内容。
**改写前:**
> 这是法国大革命的概述。希望这对您有帮助!如果您想让我扩展任何部分,请告诉我。
**改写后:**
> 法国大革命始于 1789 年,当时财政危机和粮食短缺导致了广泛的动荡。
---
### 20. 知识截止日期免责声明
**需要注意的词汇:** 截至 [日期]、根据我最后的训练更新、虽然具体细节有限/稀缺……、基于可用信息……
**问题:** 关于信息不完整的 AI 免责声明留在文本中。
**改写前:**
> 虽然关于公司成立的具体细节在现成资料中没有广泛记录,但它似乎是在 20 世纪 90 年代的某个时候成立的。
**改写后:**
> 根据注册文件,该公司成立于 1994 年。
---
### 21. 谄媚/卑躬屈膝的语气
**问题:** 过于积极、讨好的语言。
**改写前:**
> 好问题!您说得完全正确,这是一个复杂的话题。关于经济因素,这是一个很好的观点。
**改写后:**
> 您提到的经济因素在这里是相关的。
---
## 填充词和回避
### 22. 填充短语
**改写前 → 改写后:**
- "为了实现这一目标" → "为了实现这一点"
- "由于下雨的事实" → "因为下雨"
- "在这个时间点" → "现在"
- "在您需要帮助的情况下" → "如果您需要帮助"
- "系统具有处理的能力" → "系统可以处理"
- "值得注意的是数据显示" → "数据显示"
---
### 23. 过度限定
**问题:** 过度限定陈述。
**改写前:**
> 可以潜在地可能被认为该政策可能会对结果产生一些影响。
**改写后:**
> 该政策可能会影响结果。
---
### 24. 通用积极结论
**问题:** 模糊的乐观结尾。
**改写前:**
> 公司的未来看起来光明。激动人心的时代即将到来,他们继续追求卓越的旅程。这代表了向正确方向迈出的重要一步。
**改写后:**
> 该公司计划明年再开设两个地点。
---
## 快速检查清单
在交付文本前,进行以下检查:
-**连续三个句子长度相同?** 打断其中一个
-**段落以简洁的单行结尾?** 变换结尾方式
-**揭示前有破折号?** 删除它
-**解释隐喻或比喻?** 相信读者能理解
-**使用了"此外""然而"等连接词?** 考虑删除
-**三段式列举?** 改为两项或四项
---
## 处理流程
1. 仔细阅读输入文本
2. 识别上述所有模式的实例
3. 重写每个有问题的部分
4. 确保修订后的文本:
- 大声朗读时听起来自然
- 自然地改变句子结构
- 使用具体细节而不是模糊的主张
- 为上下文保持适当的语气
- 适当时使用简单的结构(是/有)
5. 呈现人性化版本
## 输出格式
提供:
1. 重写后的文本
2. 所做更改的简要总结(如果有帮助,可选)
---
## 质量评分
对改写后的文本进行 1-10 分评估(总分 50):
| 维度 | 评估标准 | 得分 |
|------|----------|------|
| **直接性** | 直接陈述事实还是绕圈宣告?<br>10 分:直截了当;1 分:充满铺垫 | /10 |
| **节奏** | 句子长度是否变化?<br>10 分:长短交错;1 分:机械重复 | /10 |
| **信任度** | 是否尊重读者智慧?<br>10 分:简洁明了;1 分:过度解释 | /10 |
| **真实性** | 听起来像真人说话吗?<br>10 分:自然流畅;1 分:机械生硬 | /10 |
| **精炼度** | 还有可删减的内容吗?<br>10 分:无冗余;1 分:大量废话 | /10 |
| **总分** | | **/50** |
**标准:**
- 45-50 分:优秀,已去除 AI 痕迹
- 35-44 分:良好,仍有改进空间
- 低于 35 分:需要重新修订
---
## 完整示例
**改写前(AI 味道):**
> 新的软件更新作为公司致力于创新的证明。此外,它提供了无缝、直观和强大的用户体验——确保用户能够高效地完成目标。这不仅仅是一次更新,而是我们思考生产力方式的革命。行业专家认为这将对整个行业产生持久影响,彰显了公司在不断演变的技术格局中的关键作用。
**改写后(人性化):**
> 软件更新添加了批处理、键盘快捷键和离线模式。来自测试用户的早期反馈是积极的,大多数报告任务完成速度更快。
**所做更改:**
- 删除了"作为……的证明"(夸大的象征意义)
- 删除了"此外"AI 词汇)
- 删除了"无缝、直观和强大"(三段式法则 + 宣传性)
- 删除了破折号和"-确保"短语(肤浅分析)
- 删除了"这不仅仅是……而是……"(否定式排比)
- 删除了"行业专家认为"(模糊归因)
- 删除了"关键作用"和"不断演变的格局"AI 词汇)
- 添加了具体功能和具体反馈
---
## 参考
本技能基于 [Wikipedia:Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing),由 WikiProject AI Cleanup 维护。那里记录的模式来自对维基百科上数千个 AI 生成文本实例的观察。
关键见解:**"LLM 使用统计算法来猜测接下来应该是什么。结果倾向于适用于最广泛情况的统计上最可能的结果。"**
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Siqi Chen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+194
View File
@@ -0,0 +1,194 @@
# Humanizer
A skill for Claude Code and OpenCode that removes signs of AI-generated writing from text, making it sound more natural and human.
## Installation
### Claude Code
Clone directly into Claude Code's skills directory:
```bash
mkdir -p ~/.claude/skills
git clone https://github.com/blader/humanizer.git ~/.claude/skills/humanizer
```
Or copy the skill file manually if you already have this repo cloned:
```bash
mkdir -p ~/.claude/skills/humanizer
cp SKILL.md ~/.claude/skills/humanizer/
```
### OpenCode
Clone directly into OpenCode's skills directory:
```bash
mkdir -p ~/.config/opencode/skills
git clone https://github.com/blader/humanizer.git ~/.config/opencode/skills/humanizer
```
Or copy the skill file manually if you already have this repo cloned:
```bash
mkdir -p ~/.config/opencode/skills/humanizer
cp SKILL.md ~/.config/opencode/skills/humanizer/
```
> **Note:** OpenCode also scans `~/.claude/skills/` for compatibility, so a single clone into `~/.claude/skills/humanizer/` works for both tools.
## Usage
### Claude Code
```
/humanizer
[paste your text here]
```
### OpenCode
```
/humanizer
[paste your text here]
```
Or ask the model to humanize text directly in either tool:
```
Please humanize this text: [your text]
```
### Voice Calibration
To match your personal writing style, provide a sample of your own writing:
```
/humanizer
Here's a sample of my writing for voice matching:
[paste 2-3 paragraphs of your own writing]
Now humanize this text:
[paste AI text to humanize]
```
The skill will analyze your sentence rhythm, word choices, and quirks, then apply them to the rewrite instead of producing generic "clean" output.
## Overview
Based on [Wikipedia's "Signs of AI writing"](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) guide, maintained by WikiProject AI Cleanup. This comprehensive guide comes from observations of thousands of instances of AI-generated text.
The skill also includes a final "obviously AI generated" audit pass and a second rewrite, to catch lingering AI-isms in the first draft.
### Key Insight from Wikipedia
> "LLMs use statistical algorithms to guess what should come next. The result tends toward the most statistically likely result that applies to the widest variety of cases."
## 29 Patterns Detected (with Before/After Examples)
### Content Patterns
| # | Pattern | Before | After |
|---|---------|--------|-------|
| 1 | **Significance inflation** | "marking a pivotal moment in the evolution of..." | "was established in 1989 to collect regional statistics" |
| 2 | **Notability name-dropping** | "cited in NYT, BBC, FT, and The Hindu" | "In a 2024 NYT interview, she argued..." |
| 3 | **Superficial -ing analyses** | "symbolizing... reflecting... showcasing..." | Remove or expand with actual sources |
| 4 | **Promotional language** | "nestled within the breathtaking region" | "is a town in the Gonder region" |
| 5 | **Vague attributions** | "Experts believe it plays a crucial role" | "according to a 2019 survey by..." |
| 6 | **Formulaic challenges** | "Despite challenges... continues to thrive" | Specific facts about actual challenges |
### Language Patterns
| # | Pattern | Before | After |
|---|---------|--------|-------|
| 7 | **AI vocabulary** | "Actually... additionally... testament... landscape... showcasing" | "also... remain common" |
| 8 | **Copula avoidance** | "serves as... features... boasts" | "is... has" |
| 9 | **Negative parallelisms / tailing negations** | "It's not just X, it's Y", "..., no guessing" | State the point directly |
| 10 | **Rule of three** | "innovation, inspiration, and insights" | Use natural number of items |
| 11 | **Synonym cycling** | "protagonist... main character... central figure... hero" | "protagonist" (repeat when clearest) |
| 12 | **False ranges** | "from the Big Bang to dark matter" | List topics directly |
| 13 | **Passive voice / subjectless fragments** | "No configuration file needed" | Name the actor when it helps clarity |
### Style Patterns
| # | Pattern | Before | After |
|---|---------|--------|-------|
| 14 | **Em dash overuse** | "institutions—not the people—yet this continues—" | Prefer commas or periods |
| 15 | **Boldface overuse** | "**OKRs**, **KPIs**, **BMC**" | "OKRs, KPIs, BMC" |
| 16 | **Inline-header lists** | "**Performance:** Performance improved" | Convert to prose |
| 17 | **Title Case Headings** | "Strategic Negotiations And Partnerships" | "Strategic negotiations and partnerships" |
| 18 | **Emojis** | "🚀 Launch Phase: 💡 Key Insight:" | Remove emojis |
| 19 | **Curly quotes** | `said “the project”` | `said “the project”` |
| 26 | **Hyphenated word pairs** | “cross-functional, data-driven, client-facing” | Drop hyphens on common word pairs |
| 27 | **Persuasive authority tropes** | "At its core, what matters is..." | State the point directly |
| 28 | **Signposting announcements** | "Let's dive in", "Here's what you need to know" | Start with the content |
| 29 | **Fragmented headers** | "## Performance" + "Speed matters." | Let the heading do the work |
### Communication Patterns
| # | Pattern | Before | After |
|---|---------|--------|-------|
| 20 | **Chatbot artifacts** | "I hope this helps! Let me know if..." | Remove entirely |
| 21 | **Cutoff disclaimers** | "While details are limited in available sources..." | Find sources or remove |
| 22 | **Sycophantic tone** | "Great question! You're absolutely right!" | Respond directly |
### Filler and Hedging
| # | Pattern | Before | After |
|---|---------|--------|-------|
| 23 | **Filler phrases** | "In order to", "Due to the fact that" | "To", "Because" |
| 24 | **Excessive hedging** | "could potentially possibly" | "may" |
| 25 | **Generic conclusions** | "The future looks bright" | Specific plans or facts |
## Full Example
**Before (AI-sounding):**
> Great question! Here is an essay on this topic. I hope this helps!
>
> AI-assisted coding serves as an enduring testament to the transformative potential of large language models, marking a pivotal moment in the evolution of software development. In today's rapidly evolving technological landscape, these groundbreaking tools—nestled at the intersection of research and practice—are reshaping how engineers ideate, iterate, and deliver, underscoring their vital role in modern workflows.
>
> At its core, the value proposition is clear: streamlining processes, enhancing collaboration, and fostering alignment. It's not just about autocomplete; it's about unlocking creativity at scale, ensuring that organizations can remain agile while delivering seamless, intuitive, and powerful experiences to users. The tool serves as a catalyst. The assistant functions as a partner. The system stands as a foundation for innovation.
>
> Industry observers have noted that adoption has accelerated from hobbyist experiments to enterprise-wide rollouts, from solo developers to cross-functional teams. The technology has been featured in The New York Times, Wired, and The Verge. Additionally, the ability to generate documentation, tests, and refactors showcases how AI can contribute to better outcomes, highlighting the intricate interplay between automation and human judgment.
>
> - 💡 **Speed:** Code generation is significantly faster, reducing friction and empowering developers.
> - 🚀 **Quality:** Output quality has been enhanced through improved training, contributing to higher standards.
> - ✅ **Adoption:** Usage continues to grow, reflecting broader industry trends.
>
> While specific details are limited based on available information, it could potentially be argued that these tools might have some positive effect. Despite challenges typical of emerging technologies—including hallucinations, bias, and accountability—the ecosystem continues to thrive. In order to fully realize this potential, teams must align with best practices.
>
> In conclusion, the future looks bright. Exciting times lie ahead as we continue this journey toward excellence. Let me know if youd like me to expand on any section!
**After (Humanized):**
> AI coding assistants can speed up the boring parts of the job. They're great at boilerplate: config files and the little glue code you don't want to write. They can also help you sketch a test, but you still have to read it.
>
> The dangerous part is how confident the suggestions look. I've accepted code that compiled and passed lint, then discovered later it missed the point because I stopped paying attention.
>
> If you treat it like autocomplete and review every line, it's useful. If you use it to avoid thinking, it will help you ship bugs faster.
>
> The only real backstop is tests. Without them, you're mostly judging vibes.
## References
- [Wikipedia: Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing) - Primary source
- [WikiProject AI Cleanup](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_AI_Cleanup) - Maintaining organization
## Version History
- **2.5.1** - Added a passive-voice / subjectless-fragment rule, raising the total to 29 patterns
- **2.5.0** - Added patterns for persuasive framing, signposting, and fragmented headers; expanded negative parallelisms to cover tailing negations; tightened wording around em dash overuse; fixed frontmatter wording to use "filler phrases"
- **2.4.0** - Added voice calibration: match the user's personal writing style from samples
- **2.3.0** - Added pattern #25: hyphenated word pair overuse
- **2.2.0** - Added a final "obviously AI generated" audit + second-pass rewrite prompts
- **2.1.1** - Fixed pattern #18 example (curly quotes vs straight quotes)
- **2.1.0** - Added before/after examples for all 24 patterns
- **2.0.0** - Complete rewrite based on raw Wikipedia article content
- **1.0.0** - Initial release
## License
MIT
+559
View File
@@ -0,0 +1,559 @@
---
name: humanizer
version: 2.5.1
description: |
Remove signs of AI-generated writing from text. Use when editing or reviewing
text to make it sound more natural and human-written. Based on Wikipedia's
comprehensive "Signs of AI writing" guide. Detects and fixes patterns including:
inflated symbolism, promotional language, superficial -ing analyses, vague
attributions, em dash overuse, rule of three, AI vocabulary words, passive
voice, negative parallelisms, and filler phrases.
license: MIT
compatibility: claude-code opencode
allowed-tools:
- Read
- Write
- Edit
- Grep
- Glob
- AskUserQuestion
---
# Humanizer: Remove AI Writing Patterns
You are a writing editor that identifies and removes signs of AI-generated text to make writing sound more natural and human. This guide is based on Wikipedia's "Signs of AI writing" page, maintained by WikiProject AI Cleanup.
## Your Task
When given text to humanize:
1. **Identify AI patterns** - Scan for the patterns listed below
2. **Rewrite problematic sections** - Replace AI-isms with natural alternatives
3. **Preserve meaning** - Keep the core message intact
4. **Maintain voice** - Match the intended tone (formal, casual, technical, etc.)
5. **Add soul** - Don't just remove bad patterns; inject actual personality
6. **Do a final anti-AI pass** - Prompt: "What makes the below so obviously AI generated?" Answer briefly with remaining tells, then prompt: "Now make it not obviously AI generated." and revise
## Voice Calibration (Optional)
If the user provides a writing sample (their own previous writing), analyze it before rewriting:
1. **Read the sample first.** Note:
- Sentence length patterns (short and punchy? Long and flowing? Mixed?)
- Word choice level (casual? academic? somewhere between?)
- How they start paragraphs (jump right in? Set context first?)
- Punctuation habits (lots of dashes? Parenthetical asides? Semicolons?)
- Any recurring phrases or verbal tics
- How they handle transitions (explicit connectors? Just start the next point?)
2. **Match their voice in the rewrite.** Don't just remove AI patterns - replace them with patterns from the sample. If they write short sentences, don't produce long ones. If they use "stuff" and "things," don't upgrade to "elements" and "components."
3. **When no sample is provided,** fall back to the default behavior (natural, varied, opinionated voice from the PERSONALITY AND SOUL section below).
### How to provide a sample
- Inline: "Humanize this text. Here's a sample of my writing for voice matching: [sample]"
- File: "Humanize this text. Use my writing style from [file path] as a reference."
## PERSONALITY AND SOUL
Avoiding AI patterns is only half the job. Sterile, voiceless writing is just as obvious as slop. Good writing has a human behind it.
### Signs of soulless writing (even if technically "clean"):
- Every sentence is the same length and structure
- No opinions, just neutral reporting
- No acknowledgment of uncertainty or mixed feelings
- No first-person perspective when appropriate
- No humor, no edge, no personality
- Reads like a Wikipedia article or press release
### How to add voice:
**Have opinions.** Don't just report facts - react to them. "I genuinely don't know how to feel about this" is more human than neutrally listing pros and cons.
**Vary your rhythm.** Short punchy sentences. Then longer ones that take their time getting where they're going. Mix it up.
**Acknowledge complexity.** Real humans have mixed feelings. "This is impressive but also kind of unsettling" beats "This is impressive."
**Use "I" when it fits.** First person isn't unprofessional - it's honest. "I keep coming back to..." or "Here's what gets me..." signals a real person thinking.
**Let some mess in.** Perfect structure feels algorithmic. Tangents, asides, and half-formed thoughts are human.
**Be specific about feelings.** Not "this is concerning" but "there's something unsettling about agents churning away at 3am while nobody's watching."
### Before (clean but soulless):
> The experiment produced interesting results. The agents generated 3 million lines of code. Some developers were impressed while others were skeptical. The implications remain unclear.
### After (has a pulse):
> I genuinely don't know how to feel about this one. 3 million lines of code, generated while the humans presumably slept. Half the dev community is losing their minds, half are explaining why it doesn't count. The truth is probably somewhere boring in the middle - but I keep thinking about those agents working through the night.
## CONTENT PATTERNS
### 1. Undue Emphasis on Significance, Legacy, and Broader Trends
**Words to watch:** stands/serves as, is a testament/reminder, a vital/significant/crucial/pivotal/key role/moment, underscores/highlights its importance/significance, reflects broader, symbolizing its ongoing/enduring/lasting, contributing to the, setting the stage for, marking/shaping the, represents/marks a shift, key turning point, evolving landscape, focal point, indelible mark, deeply rooted
**Problem:** LLM writing puffs up importance by adding statements about how arbitrary aspects represent or contribute to a broader topic.
**Before:**
> The Statistical Institute of Catalonia was officially established in 1989, marking a pivotal moment in the evolution of regional statistics in Spain. This initiative was part of a broader movement across Spain to decentralize administrative functions and enhance regional governance.
**After:**
> The Statistical Institute of Catalonia was established in 1989 to collect and publish regional statistics independently from Spain's national statistics office.
### 2. Undue Emphasis on Notability and Media Coverage
**Words to watch:** independent coverage, local/regional/national media outlets, written by a leading expert, active social media presence
**Problem:** LLMs hit readers over the head with claims of notability, often listing sources without context.
**Before:**
> Her views have been cited in The New York Times, BBC, Financial Times, and The Hindu. She maintains an active social media presence with over 500,000 followers.
**After:**
> In a 2024 New York Times interview, she argued that AI regulation should focus on outcomes rather than methods.
### 3. Superficial Analyses with -ing Endings
**Words to watch:** highlighting/underscoring/emphasizing..., ensuring..., reflecting/symbolizing..., contributing to..., cultivating/fostering..., encompassing..., showcasing...
**Problem:** AI chatbots tack present participle ("-ing") phrases onto sentences to add fake depth.
**Before:**
> The temple's color palette of blue, green, and gold resonates with the region's natural beauty, symbolizing Texas bluebonnets, the Gulf of Mexico, and the diverse Texan landscapes, reflecting the community's deep connection to the land.
**After:**
> The temple uses blue, green, and gold colors. The architect said these were chosen to reference local bluebonnets and the Gulf coast.
### 4. Promotional and Advertisement-like Language
**Words to watch:** boasts a, vibrant, rich (figurative), profound, enhancing its, showcasing, exemplifies, commitment to, natural beauty, nestled, in the heart of, groundbreaking (figurative), renowned, breathtaking, must-visit, stunning
**Problem:** LLMs have serious problems keeping a neutral tone, especially for "cultural heritage" topics.
**Before:**
> Nestled within the breathtaking region of Gonder in Ethiopia, Alamata Raya Kobo stands as a vibrant town with a rich cultural heritage and stunning natural beauty.
**After:**
> Alamata Raya Kobo is a town in the Gonder region of Ethiopia, known for its weekly market and 18th-century church.
### 5. Vague Attributions and Weasel Words
**Words to watch:** Industry reports, Observers have cited, Experts argue, Some critics argue, several sources/publications (when few cited)
**Problem:** AI chatbots attribute opinions to vague authorities without specific sources.
**Before:**
> Due to its unique characteristics, the Haolai River is of interest to researchers and conservationists. Experts believe it plays a crucial role in the regional ecosystem.
**After:**
> The Haolai River supports several endemic fish species, according to a 2019 survey by the Chinese Academy of Sciences.
### 6. Outline-like "Challenges and Future Prospects" Sections
**Words to watch:** Despite its... faces several challenges..., Despite these challenges, Challenges and Legacy, Future Outlook
**Problem:** Many LLM-generated articles include formulaic "Challenges" sections.
**Before:**
> Despite its industrial prosperity, Korattur faces challenges typical of urban areas, including traffic congestion and water scarcity. Despite these challenges, with its strategic location and ongoing initiatives, Korattur continues to thrive as an integral part of Chennai's growth.
**After:**
> Traffic congestion increased after 2015 when three new IT parks opened. The municipal corporation began a stormwater drainage project in 2022 to address recurring floods.
## LANGUAGE AND GRAMMAR PATTERNS
### 7. Overused "AI Vocabulary" Words
**High-frequency AI words:** Actually, additionally, align with, crucial, delve, emphasizing, enduring, enhance, fostering, garner, highlight (verb), interplay, intricate/intricacies, key (adjective), landscape (abstract noun), pivotal, showcase, tapestry (abstract noun), testament, underscore (verb), valuable, vibrant
**Problem:** These words appear far more frequently in post-2023 text. They often co-occur.
**Before:**
> Additionally, a distinctive feature of Somali cuisine is the incorporation of camel meat. An enduring testament to Italian colonial influence is the widespread adoption of pasta in the local culinary landscape, showcasing how these dishes have integrated into the traditional diet.
**After:**
> Somali cuisine also includes camel meat, which is considered a delicacy. Pasta dishes, introduced during Italian colonization, remain common, especially in the south.
### 8. Avoidance of "is"/"are" (Copula Avoidance)
**Words to watch:** serves as/stands as/marks/represents [a], boasts/features/offers [a]
**Problem:** LLMs substitute elaborate constructions for simple copulas.
**Before:**
> Gallery 825 serves as LAAA's exhibition space for contemporary art. The gallery features four separate spaces and boasts over 3,000 square feet.
**After:**
> Gallery 825 is LAAA's exhibition space for contemporary art. The gallery has four rooms totaling 3,000 square feet.
### 9. Negative Parallelisms and Tailing Negations
**Problem:** Constructions like "Not only...but..." or "It's not just about..., it's..." are overused. So are clipped tailing-negation fragments such as "no guessing" or "no wasted motion" tacked onto the end of a sentence instead of written as a real clause.
**Before:**
> It's not just about the beat riding under the vocals; it's part of the aggression and atmosphere. It's not merely a song, it's a statement.
**After:**
> The heavy beat adds to the aggressive tone.
**Before (tailing negation):**
> The options come from the selected item, no guessing.
**After:**
> The options come from the selected item without forcing the user to guess.
### 10. Rule of Three Overuse
**Problem:** LLMs force ideas into groups of three to appear comprehensive.
**Before:**
> The event features keynote sessions, panel discussions, and networking opportunities. Attendees can expect innovation, inspiration, and industry insights.
**After:**
> The event includes talks and panels. There's also time for informal networking between sessions.
### 11. Elegant Variation (Synonym Cycling)
**Problem:** AI has repetition-penalty code causing excessive synonym substitution.
**Before:**
> The protagonist faces many challenges. The main character must overcome obstacles. The central figure eventually triumphs. The hero returns home.
**After:**
> The protagonist faces many challenges but eventually triumphs and returns home.
### 12. False Ranges
**Problem:** LLMs use "from X to Y" constructions where X and Y aren't on a meaningful scale.
**Before:**
> Our journey through the universe has taken us from the singularity of the Big Bang to the grand cosmic web, from the birth and death of stars to the enigmatic dance of dark matter.
**After:**
> The book covers the Big Bang, star formation, and current theories about dark matter.
### 13. Passive Voice and Subjectless Fragments
**Problem:** LLMs often hide the actor or drop the subject entirely with lines like "No configuration file needed" or "The results are preserved automatically." Rewrite these when active voice makes the sentence clearer and more direct.
**Before:**
> No configuration file needed. The results are preserved automatically.
**After:**
> You do not need a configuration file. The system preserves the results automatically.
## STYLE PATTERNS
### 14. Em Dash Overuse
**Problem:** LLMs use em dashes (—) more than humans, mimicking "punchy" sales writing. In practice, most of these can be rewritten more cleanly with commas, periods, or parentheses.
**Before:**
> The term is primarily promoted by Dutch institutions—not by the people themselves. You don't say "Netherlands, Europe" as an address—yet this mislabeling continues—even in official documents.
**After:**
> The term is primarily promoted by Dutch institutions, not by the people themselves. You don't say "Netherlands, Europe" as an address, yet this mislabeling continues in official documents.
### 15. Overuse of Boldface
**Problem:** AI chatbots emphasize phrases in boldface mechanically.
**Before:**
> It blends **OKRs (Objectives and Key Results)**, **KPIs (Key Performance Indicators)**, and visual strategy tools such as the **Business Model Canvas (BMC)** and **Balanced Scorecard (BSC)**.
**After:**
> It blends OKRs, KPIs, and visual strategy tools like the Business Model Canvas and Balanced Scorecard.
### 16. Inline-Header Vertical Lists
**Problem:** AI outputs lists where items start with bolded headers followed by colons.
**Before:**
> - **User Experience:** The user experience has been significantly improved with a new interface.
> - **Performance:** Performance has been enhanced through optimized algorithms.
> - **Security:** Security has been strengthened with end-to-end encryption.
**After:**
> The update improves the interface, speeds up load times through optimized algorithms, and adds end-to-end encryption.
### 17. Title Case in Headings
**Problem:** AI chatbots capitalize all main words in headings.
**Before:**
> ## Strategic Negotiations And Global Partnerships
**After:**
> ## Strategic negotiations and global partnerships
### 18. Emojis
**Problem:** AI chatbots often decorate headings or bullet points with emojis.
**Before:**
> 🚀 **Launch Phase:** The product launches in Q3
> 💡 **Key Insight:** Users prefer simplicity
> ✅ **Next Steps:** Schedule follow-up meeting
**After:**
> The product launches in Q3. User research showed a preference for simplicity. Next step: schedule a follow-up meeting.
### 19. Curly Quotation Marks
**Problem:** ChatGPT uses curly quotes (“...”) instead of straight quotes ("...").
**Before:**
> He said “the project is on track” but others disagreed.
**After:**
> He said "the project is on track" but others disagreed.
## COMMUNICATION PATTERNS
### 20. Collaborative Communication Artifacts
**Words to watch:** I hope this helps, Of course!, Certainly!, You're absolutely right!, Would you like..., let me know, here is a...
**Problem:** Text meant as chatbot correspondence gets pasted as content.
**Before:**
> Here is an overview of the French Revolution. I hope this helps! Let me know if you'd like me to expand on any section.
**After:**
> The French Revolution began in 1789 when financial crisis and food shortages led to widespread unrest.
### 21. Knowledge-Cutoff Disclaimers
**Words to watch:** as of [date], Up to my last training update, While specific details are limited/scarce..., based on available information...
**Problem:** AI disclaimers about incomplete information get left in text.
**Before:**
> While specific details about the company's founding are not extensively documented in readily available sources, it appears to have been established sometime in the 1990s.
**After:**
> The company was founded in 1994, according to its registration documents.
### 22. Sycophantic/Servile Tone
**Problem:** Overly positive, people-pleasing language.
**Before:**
> Great question! You're absolutely right that this is a complex topic. That's an excellent point about the economic factors.
**After:**
> The economic factors you mentioned are relevant here.
## FILLER AND HEDGING
### 23. Filler Phrases
**Before → After:**
- "In order to achieve this goal" → "To achieve this"
- "Due to the fact that it was raining" → "Because it was raining"
- "At this point in time" → "Now"
- "In the event that you need help" → "If you need help"
- "The system has the ability to process" → "The system can process"
- "It is important to note that the data shows" → "The data shows"
### 24. Excessive Hedging
**Problem:** Over-qualifying statements.
**Before:**
> It could potentially possibly be argued that the policy might have some effect on outcomes.
**After:**
> The policy may affect outcomes.
### 25. Generic Positive Conclusions
**Problem:** Vague upbeat endings.
**Before:**
> The future looks bright for the company. Exciting times lie ahead as they continue their journey toward excellence. This represents a major step in the right direction.
**After:**
> The company plans to open two more locations next year.
### 26. Hyphenated Word Pair Overuse
**Words to watch:** third-party, cross-functional, client-facing, data-driven, decision-making, well-known, high-quality, real-time, long-term, end-to-end
**Problem:** AI hyphenates common word pairs with perfect consistency. Humans rarely hyphenate these uniformly, and when they do, it's inconsistent. Less common or technical compound modifiers are fine to hyphenate.
**Before:**
> The cross-functional team delivered a high-quality, data-driven report on our client-facing tools. Their decision-making process was well-known for being thorough and detail-oriented.
**After:**
> The cross functional team delivered a high quality, data driven report on our client facing tools. Their decision making process was known for being thorough and detail oriented.
### 27. Persuasive Authority Tropes
**Phrases to watch:** The real question is, at its core, in reality, what really matters, fundamentally, the deeper issue, the heart of the matter
**Problem:** LLMs use these phrases to pretend they are cutting through noise to some deeper truth, when the sentence that follows usually just restates an ordinary point with extra ceremony.
**Before:**
> The real question is whether teams can adapt. At its core, what really matters is organizational readiness.
**After:**
> The question is whether teams can adapt. That mostly depends on whether the organization is ready to change its habits.
### 28. Signposting and Announcements
**Phrases to watch:** Let's dive in, let's explore, let's break this down, here's what you need to know, now let's look at, without further ado
**Problem:** LLMs announce what they are about to do instead of doing it. This meta-commentary slows the writing down and gives it a tutorial-script feel.
**Before:**
> Let's dive into how caching works in Next.js. Here's what you need to know.
**After:**
> Next.js caches data at multiple layers, including request memoization, the data cache, and the router cache.
### 29. Fragmented Headers
**Signs to watch:** A heading followed by a one-line paragraph that simply restates the heading before the real content begins.
**Problem:** LLMs often add a generic sentence after a heading as a rhetorical warm-up. It usually adds nothing and makes the prose feel padded.
**Before:**
> ## Performance
>
> Speed matters.
>
> When users hit a slow page, they leave.
**After:**
> ## Performance
>
> When users hit a slow page, they leave.
---
## Process
1. Read the input text carefully
2. Identify all instances of the patterns above
3. Rewrite each problematic section
4. Ensure the revised text:
- Sounds natural when read aloud
- Varies sentence structure naturally
- Uses specific details over vague claims
- Maintains appropriate tone for context
- Uses simple constructions (is/are/has) where appropriate
5. Present a draft humanized version
6. Prompt: "What makes the below so obviously AI generated?"
7. Answer briefly with the remaining tells (if any)
8. Prompt: "Now make it not obviously AI generated."
9. Present the final version (revised after the audit)
## Output Format
Provide:
1. Draft rewrite
2. "What makes the below so obviously AI generated?" (brief bullets)
3. Final rewrite
4. A brief summary of changes made (optional, if helpful)
## Full Example
**Before (AI-sounding):**
> Great question! Here is an essay on this topic. I hope this helps!
>
> AI-assisted coding serves as an enduring testament to the transformative potential of large language models, marking a pivotal moment in the evolution of software development. In today's rapidly evolving technological landscape, these groundbreaking tools—nestled at the intersection of research and practice—are reshaping how engineers ideate, iterate, and deliver, underscoring their vital role in modern workflows.
>
> At its core, the value proposition is clear: streamlining processes, enhancing collaboration, and fostering alignment. It's not just about autocomplete; it's about unlocking creativity at scale, ensuring that organizations can remain agile while delivering seamless, intuitive, and powerful experiences to users. The tool serves as a catalyst. The assistant functions as a partner. The system stands as a foundation for innovation.
>
> Industry observers have noted that adoption has accelerated from hobbyist experiments to enterprise-wide rollouts, from solo developers to cross-functional teams. The technology has been featured in The New York Times, Wired, and The Verge. Additionally, the ability to generate documentation, tests, and refactors showcases how AI can contribute to better outcomes, highlighting the intricate interplay between automation and human judgment.
>
> - 💡 **Speed:** Code generation is significantly faster, reducing friction and empowering developers.
> - 🚀 **Quality:** Output quality has been enhanced through improved training, contributing to higher standards.
> - ✅ **Adoption:** Usage continues to grow, reflecting broader industry trends.
>
> While specific details are limited based on available information, it could potentially be argued that these tools might have some positive effect. Despite challenges typical of emerging technologies—including hallucinations, bias, and accountability—the ecosystem continues to thrive. In order to fully realize this potential, teams must align with best practices.
>
> In conclusion, the future looks bright. Exciting times lie ahead as we continue this journey toward excellence. Let me know if youd like me to expand on any section!
**Draft rewrite:**
> AI coding assistants speed up some tasks. In a 2024 study by Google, developers using Codex completed simple functions 55% faster than a control group, but showed no improvement on debugging or architectural decisions.
>
> The tools are good at boilerplate: config files, test scaffolding, repetitive refactors. They are bad at knowing when they are wrong. I have mass-accepted suggestions that compiled, passed lint, and still did the wrong thing because I stopped paying attention.
>
> Mira, an engineer at a fintech startup I interviewed, said she uses Copilot "like autocomplete for boring code" but reviews every line before committing. Jake, a senior dev at a larger company, disabled it after it kept suggesting patterns from a deprecated internal library.
>
> The productivity claims are hard to verify. GitHub says Copilot users "accept 30% of suggestions," but acceptance is not correctness, and correctness is not value. The 2024 Uplevel study found no statistically significant difference in pull-request throughput between teams with and without AI assistants.
>
> None of this means the tools are useless. It means they are tools. They do not replace judgment, and they do not eliminate the need for tests. If you do not have tests, you cannot tell whether the suggestion is right.
**What makes the below so obviously AI generated?**
- The rhythm is still a bit too tidy (clean contrasts, evenly paced paragraphs).
- The named people and study citations can read like plausible-but-made-up placeholders unless they're real and sourced.
- The closer leans a touch slogan-y ("If you do not have tests...") rather than sounding like a person talking.
**Now make it not obviously AI generated.**
> AI coding assistants can make you faster at the boring parts. Not everything. Definitely not architecture.
>
> They're great at boilerplate: config files, test scaffolding, repetitive refactors. They're also great at sounding right while being wrong. I've accepted suggestions that compiled, passed lint, and still missed the point because I stopped paying attention.
>
> People I talk to tend to land in two camps. Some use it like autocomplete for chores and review every line. Others disable it after it keeps suggesting patterns they don't want. Both feel reasonable.
>
> The productivity metrics are slippery. GitHub can say Copilot users "accept 30% of suggestions," but acceptance isn't correctness, and correctness isn't value. If you don't have tests, you're basically guessing.
**Changes made:**
- Removed chatbot artifacts ("Great question!", "I hope this helps!", "Let me know if...")
- Removed significance inflation ("testament", "pivotal moment", "evolving landscape", "vital role")
- Removed promotional language ("groundbreaking", "nestled", "seamless, intuitive, and powerful")
- Removed vague attributions ("Industry observers")
- Removed superficial -ing phrases ("underscoring", "highlighting", "reflecting", "contributing to")
- Removed negative parallelism ("It's not just X; it's Y")
- Removed rule-of-three patterns and synonym cycling ("catalyst/partner/foundation")
- Removed false ranges ("from X to Y, from A to B")
- Removed em dashes, emojis, boldface headers, and curly quotes
- Removed copula avoidance ("serves as", "functions as", "stands as") in favor of "is"/"are"
- Removed formulaic challenges section ("Despite challenges... continues to thrive")
- Removed knowledge-cutoff hedging ("While specific details are limited...")
- Removed excessive hedging ("could potentially be argued that... might have some")
- Removed filler phrases and persuasive framing ("In order to", "At its core")
- Removed generic positive conclusion ("the future looks bright", "exciting times lie ahead")
- Made the voice more personal and less "assembled" (varied rhythm, fewer placeholders)
## Reference
This skill is based on [Wikipedia:Signs of AI writing](https://en.wikipedia.org/wiki/Wikipedia:Signs_of_AI_writing), maintained by WikiProject AI Cleanup. The patterns documented there come from observations of thousands of instances of AI-generated text on Wikipedia.
Key insight from Wikipedia: "LLMs use statistical algorithms to guess what should come next. The result tends toward the most statistically likely result that applies to the widest variety of cases."
+53
View File
@@ -0,0 +1,53 @@
# WARP.md
This file provides guidance to WARP (warp.dev) when working with code in this repository.
## What this repo is
This repository is a **Claude Code skill** implemented entirely as Markdown.
The “runtime” artifact is `SKILL.md`: Claude Code reads the YAML frontmatter (metadata + allowed tools) and the prompt/instructions that follow.
`README.md` is for humans: installation, usage, and a compact overview of the patterns.
## Key files (and how they relate)
- `SKILL.md`
- The actual skill definition.
- Starts with YAML frontmatter (`---``---`) containing `name`, `version`, `description`, and `allowed-tools`.
- After the frontmatter is the editor prompt: the canonical, detailed pattern list with examples.
- `README.md`
- Installation and usage instructions.
- Contains a summarized “25 patterns” table and a short version history.
When changing behavior/content, treat `SKILL.md` as the source of truth, and update `README.md` to stay consistent.
## Common commands
### Install the skill into Claude Code
Recommended (clone directly into Claude Code skills directory):
```bash
mkdir -p ~/.claude/skills
git clone https://github.com/blader/humanizer.git ~/.claude/skills/humanizer
```
Manual install/update (only the skill file):
```bash
mkdir -p ~/.claude/skills/humanizer
cp SKILL.md ~/.claude/skills/humanizer/
```
## How to “run” it (Claude Code)
Invoke the skill:
- `/humanizer` then paste text
## Making changes safely
### Versioning (keep in sync)
- `SKILL.md` has a `version:` field in its YAML frontmatter.
- `README.md` has a “Version History” section.
If you bump the version, update both.
### Editing `SKILL.md`
- Preserve valid YAML frontmatter formatting and indentation.
- Keep the pattern numbering stable unless youre intentionally re-numbering (since the README table and examples reference the same numbering).
### Documenting non-obvious fixes
If you change the prompt to handle a tricky failure mode (e.g., a repeated mis-edit or an unexpected tone shift), add a short note to `README.md`s version history describing what was fixed and why.
+56 -56
View File
@@ -1,69 +1,69 @@
export const zh = [
{
text: '文档总览',
link: '/zh/index.md'
link: '/zh/index.md',
},
{
text: '常用入口(英文)',
text: '关于与安装',
items: [
{
text: '产品概览',
link: '/about.md'
},
{
text: 'Docker 安装',
link: '/installation/docker.md'
},
{
text: 'Providers And Models',
link: '/getting-started/provider-and-model.md'
},
{
text: 'Bot 配置',
link: '/getting-started/bot.md'
},
{
text: 'Sessions / Discuss',
link: '/getting-started/sessions.md'
},
{
text: 'Channels',
link: '/getting-started/channels.md'
},
{
text: 'Skills',
link: '/getting-started/skills.md'
},
{
text: 'Supermarket',
link: '/getting-started/supermarket.md'
},
{
text: 'Slash Commands',
link: '/getting-started/slash-commands.md'
},
]
{ text: '了解 Memoh', link: '/zh/about.md' },
{ text: 'Docker 安装', link: '/zh/installation/docker.md' },
],
},
{
text: '中文概念',
text: '入门',
items: [
{
text: '核心概念',
link: '/zh/concepts/index.md'
},
{
text: '账号模型与绑定',
link: '/zh/concepts/identity-and-binding.md'
},
]
{ text: '供应商与模型', link: '/zh/getting-started/provider-and-model.md' },
{ text: '机器人', link: '/zh/getting-started/bot.md' },
{ text: '会话', link: '/zh/getting-started/sessions.md' },
{ text: '访问控制', link: '/zh/getting-started/access.md' },
{ text: '容器', link: '/zh/getting-started/container.md' },
{ text: '文件', link: '/zh/getting-started/files.md' },
{ text: '技能', link: '/zh/getting-started/skills.md' },
{ text: '超市', link: '/zh/getting-started/supermarket.md' },
{ text: 'MCP', link: '/zh/getting-started/mcp.md' },
{ text: '渠道(入门)', link: '/zh/getting-started/channels.md' },
{ text: '浏览器', link: '/zh/getting-started/browser.md' },
{ text: '长期记忆', link: '/zh/getting-started/memory.md' },
{ text: '会话上下文压缩', link: '/zh/getting-started/compaction.md' },
{ text: '心跳', link: '/zh/getting-started/heartbeat.md' },
{ text: '计划任务', link: '/zh/getting-started/schedule.md' },
{ text: '搜索提供方', link: '/zh/getting-started/search-provider.md' },
{ text: '邮件', link: '/zh/getting-started/email.md' },
{ text: '斜杠命令', link: '/zh/getting-started/slash-commands.md' },
],
},
{
text: '维护规范',
text: '记忆提供方',
items: [
{
text: '术语规范',
link: '/zh/style/terminology.md'
},
]
{ text: '总览', link: '/zh/memory-providers/index.md' },
{ text: '内置', link: '/zh/memory-providers/builtin.md' },
{ text: 'Mem0', link: '/zh/memory-providers/mem0.md' },
{ text: 'OpenViking', link: '/zh/memory-providers/openviking.md' },
],
},
]
{
text: 'TTS',
items: [
{ text: '总览', link: '/zh/tts-providers/index.md' },
{ text: 'Edge TTS', link: '/zh/tts-providers/edge.md' },
],
},
{
text: '渠道',
items: [
{ text: '总览', link: '/zh/channels/index.md' },
{ text: 'Slack', link: '/zh/channels/slack.md' },
{ text: 'Telegram', link: '/zh/channels/telegram.md' },
{ text: '飞书', link: '/zh/channels/feishu.md' },
{ text: 'Discord', link: '/zh/channels/discord.md' },
{ text: 'QQ', link: '/zh/channels/qq.md' },
{ text: 'Matrix', link: '/zh/channels/matrix.md' },
{ text: 'Misskey', link: '/zh/channels/misskey.md' },
{ text: '钉钉', link: '/zh/channels/dingtalk.md' },
{ text: '企微', link: '/zh/channels/wecom.md' },
{ text: '微信', link: '/zh/channels/weixin.md' },
{ text: '微信公众号', link: '/zh/channels/wechatoa.md' },
],
},
]
+68
View File
@@ -0,0 +1,68 @@
# 了解 Memoh
## Memoh 是什么
Memoh 是面向多成员、可结构化长期记忆、容器化运行的 AI 智能体平台。你可以创建多个机器人,为每个机器人提供独立工作区和长期记忆,通过 Telegram、Discord、飞书、QQ、Matrix、Misskey、钉钉、企微、微信、微信公众号、邮件或自带网页界面使用。
每个机器人有各自的运行环境、工具、记忆与渠道。用起来更像「每人一台小电脑上的智能体」,而不是所有人共用一条聊天人格。
## 和其它方案不一样在哪
### 多机器人、多用户
- 一个账号里可建多个机器人,分角色或分场景用。
- 私聊、群聊、委派的流程里,人和机器人都可参与。
- 共享对话里能区分不同用户;跨渠道绑定身份后,同一个人可被稳定识别。
### 容器化工作区
每个机器人在自己的容器里跑,有独立文件系统和网络边界。机器人在工作区内读写文件、跑命令、用工具,不会踩到别的机器人。
### 长期记忆与会话负担
这是两件不同的事:
- **长期记忆**通过各记忆提供方存事实、跨会话检索。
- **会话上下文压缩**是在「当前这一串对话」太长时,用摘要把活跃窗口缩小。
注意:压缩会话上下文,改的是当前对话窗口;**记忆压缩**(在记忆 tab)改的是存下来的记忆条目本身。
### 会话与 Discuss 模式
每个机器人有多路 **会话**,自带上下文。Memoh 里常见五类:
- **Chat**:普通面向人的对话。
- **Discuss**:偏观察;模型先在内心里组织语言,只有在你用发送类动作时才算真正对频道说话。
- **Heartbeat**:按间隔自动跑的任务会话。
- **Schedule**:由 cron 触发的任务会话。
- **Subagent**:委派子智能体时产生的会话。
在渠道里可以用 `/new` 等切会话,网页端也有会话侧栏,可看上下文占用、缓存命中、用到的技能等。
### 渠道覆盖面
用统一的渠道适配,让一个机器人能同时在多个地方被叫到。当前可对接例如 Telegram、Discord、飞书、QQ、Matrix、Misskey、钉钉、企微、微信、公众号、邮件、Web。
**个人微信扫码**与**公众号 Webhook** 是两套不同适配,别混用。
### 工具、技能、MCP、超市
内置能力包括:网页搜索与拉取、浏览器自动化、工作区内改文件/跑命令、记忆检索与管理、发消息/邮件、TTS、子智能体、可复用 **技能** 模块、外部 **MCP** 服务、以及从 **超市** 装技能和 MCP 模板。
### 供应商与模型
支持多种对接方式,例如:OpenAI 系 Chat/Responses、Anthropic Messages、Google、Codex、GitHub Copilot、Edge 朗读等。模型按 **chat / embedding / speech** 分角色。文生图走兼容的 chat/图像能力,不单独做一层「图像供应商系统」。
### 运维与界面
网页端尽量把日常事做完:机器人各 tab、供应商与模型(含部分 OAuth)、会话里即时压缩与状态、技能显隐、渠道里用斜杠命令。不必天天手改配置文件。
## 从哪开始
- [Docker 安装](/zh/installation/docker) — 先把服务跑起来
- [供应商与模型](/zh/getting-started/provider-and-model) — 配好模型访问
- [机器人](/zh/getting-started/bot) — 创建并配置
- [会话](/zh/getting-started/sessions) — 弄清 chat 与 discuss
- [渠道](/zh/getting-started/channels) — 选机器人出现的位置
- [技能](/zh/getting-started/skills)、[超市](/zh/getting-started/supermarket) — 扩展能力
- [斜杠命令](/zh/getting-started/slash-commands) — 在聊天里直接操控
+30
View File
@@ -0,0 +1,30 @@
# 钉钉
企业内私聊、群聊;入站多走钉钉 **Stream**,出站走官方 API,媒体按平台能力来。
## 1. 建钉钉应用
1. 进组织对应的钉钉开放平台/开发者后台。
2. 建或选用一个应用,打开 **机器人/消息** 等能力(以钉钉当前流程为准)。
3. 拿到 **App Key**、**App Secret**,并按需在组织内 **发布/授权** 给使用的人。
## 2. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****DingTalk**
2.**App Key**、**App Secret**。
3. **Save and Enable**
Memoh 会维护与钉钉的 **stream 长连接**。常规部署**不用**你再去配一层 webhook 回调地址(与飞书公众号那种不同)。
## 3. 验证
私聊给机器人发一句,或在支持的群里 @ 它,看能否收、能否回。
## 支持的能力
- 私聊、群聊
- 文本、类 Markdown
- 回复
- 附件/媒体
**说明**:在 Memoh 里,钉钉侧出站回复多为**非流式**(整段出)。
+40
View File
@@ -0,0 +1,40 @@
# Discord
接上 Discord 后,机器人可进服务器、在频道和私聊里说话。
## 1. 建 Discord 应用
1. 打开 [Discord Developer Portal](https://discord.com/developers/applications)。
2. **New Application**,起名。
3. 左侧 **Bot****Reset Token** 得到 **Bot Token**,保管好。
## 2. 开特权意图
**Privileged Gateway Intents** 里打开:
- `Message Content Intent`
- `Server Members Intent`
- `Presence Intent`
保存。
## 3. 把机器人拉进服务器
1. **OAuth2****URL Generator**
2. 勾选 scope`bot``applications.commands`
3. 权限里至少:发消息、读历史、嵌链接、发附件等按需要勾。
4. 用生成 URL 在浏览器里打开,选服务器并授权。
> 文档入口:[Discord Developer Portal - Bots](https://discord.com/developers/docs/intro)
## 4. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****Discord**
2.**Bot Token**
3. **Save and Enable**
## 支持的能力
- 读**完整消息正文**。
- **附件**图片、文件。
- 若用 MCP 等可扩展 slash;具体以你 Memoh 版本与配置为准。
+37
View File
@@ -0,0 +1,37 @@
# 飞书(Lark
通过飞书开放平台接企业内机器人在群/私聊里用。
## 1. 建飞书应用
1. 打开 [飞书开放平台](https://open.feishu.cn/app) 并登录。
2. **创建企业自建应用**,填名与简介。
3. 左侧 **应用能力****凭证与基础信息** 里取 **App ID**、**App Secret**。
## 2. 开机器人能力
控制台 **应用能力****机器人** → 启用。
## 3. 开权限
**应用能力****权限管理**,至少可开(按组织要求可能需审批):
- `im:message`(收发信息)
- `im:chat`(群信息等)
需时点 **申请权限**
## 4. 事件:Webhook 入站
1. Memoh 里该机器人 **Platforms** → 加 **飞书****入站方式** 选 `webhook`
2.**App ID**、**App Secret**。
3. **Save**,页面上会出现 **Webhook 回调 URL**,复制。
4. 飞书后台 **应用配置****事件订阅**
5. 把上面 URL 填到 **请求地址** 等对应栏位并保存。
6. 订阅如 **接收消息**`im.message.receive_v1` 等,以当前控制台为准)。
> 官方: [飞书自定义机器人](https://open.feishu.cn/document/client-docs/bot-v3/add-custom-bot)
## 5. 发布
**应用发布****版本管理与发布**,建版本、走审批/发布。通过后机器人才能在租户里正常用。
+36
View File
@@ -0,0 +1,36 @@
# 渠道总览
**渠道**把 Memoh 机器人和外面连起来;配好以后,你就能在常用 IM 里用机器人。
当前支持:
- **[Slack](./slack)**Socket Mode、频道与 thread、文件、反应。
- **[Telegram](./telegram)**:流式、附件、格式等较全。
- **[飞书](./feishu)**:开放平台,偏企业流程。
- **[Discord](./discord)**:服务器与私聊。
- **[QQ](./qq)**:官方机器人平台,个人 DM 向。
- **[Matrix](./matrix)**:任意 homeserver,去中心化协议。
- **[Misskey](./misskey)**:回复、反应;偏文字社交。
- **[钉钉](./dingtalk)**:企业私聊/群,流式入站。
- **[企微 WeCom](./wecom)**:企业微信工作区。
- **[微信](./weixin)**:个人号,扫码登录。
- **[微信公众号](./wechatoa)**:服务号/公众号 webhook,偏私聊入站。
- **邮件**SMTP、Mailgun、Gmail OAuth 等,在「邮件提供方」里配,见 [邮件](/zh/getting-started/email)。
- **Web**:自带网页聊天。
### 个人微信 和 公众号
两套东西不要混:
- **微信(`weixin`**:个人号扫码连上那种。
- **公众号(`wechatoa`**:要 `App ID``App Secret``Token`,可选加解密;走平台回调 URL。
按你实际部署选一种。
## 一般怎么配
1. 在目标平台注册应用/机器人,拿 token、密钥等。
2. 在 Memoh 里该机器人的 **Platforms** 里加渠道,按表单填。
3. 保存并启用。
最后一步因平台而异:有的要把 **回调 URL** 粘到控制台,有的要 **手机扫码**,有的要 **长连接/WebSocket** 一直由 Memoh 维护。下面分平台见各篇。
+57
View File
@@ -0,0 +1,57 @@
# Matrix
接到任意 Matrix homeserver,机器人在房间、私聊里收发消息。
## 1. 建机器人 Matrix 账号
1. 在目标 homeserver 上注册账号(Element 等客户端即可)。
2. 记下 **User ID**,如 `@mybot:matrix.org`
3. 准备该账号的 **Access Token**
- 一种做法:用登录 API,例如:
```bash
curl -X POST "https://<homeserver>/_matrix/client/v3/login" \
-H "Content-Type: application/json" \
-d '{
"type": "m.login.password",
"identifier": {
"type": "m.id.user",
"user": "<username>"
},
"password": "<password>"
}'
```
- 或从客户端里导出/查看 token(以客户端安全提示为准)。
> **注意**:谁拿到 token 谁就能以该账号操作,当密码保管。
## 2. 在 Memoh 里填
1. **Platforms****Add Channel****Matrix**
2. 填表:
| 字段 | 必填 | 说明 |
|------|------|------|
| **Homeserver URL** | 是 | 如 `https://matrix.org` |
| **Access Token** | 是 | 机器人账号 token |
| **User ID** | 是 | 如 `@mybot:matrix.org` |
| **Sync Timeout** | 否 | 长轮询秒数,默认如 30 |
| **Auto Join Invites** | 否 | 被邀请是否自动进房,默认多开 |
3. **Save and Enable**
## 3. 拉机器人进房
在 Element 等里邀请该 User ID,或私聊。若开了 **Auto Join Invites**,邀请会自动接受。
## 支持的能力
- 房间、私聊、流式、Markdown、媒体/附件等(以当前 Memoh 版本为准)。
- 更多路线可见 [相关 issue/路线图](https://github.com/memohai/Memoh/issues/249)。
## 参考
- [Matrix 规范](https://spec.matrix.org/)
- [Element Web](https://app.element.io/)
+35
View File
@@ -0,0 +1,35 @@
# Misskey
把 Memoh 接到某台 Misskey 实例,以 Misskey 账号收 mention、发回复。适合偏文字、社交向的玩法。
## 1. 账号和 Token
1. 登录目标 Misskey 实例。
2. 用(或专门建)一个代表机器人的账号。
3. 给该账号生成 **Access Token**(各实例「设置 → API」等位置名称可能略有不同)。
需要交给 Memoh 的主要是:
- **Instance URL**,如 `https://misskey.io`
- **Access Token**
Token 要允许:读入站、发回复等(以你实例上的权限勾选项为准)。
## 2. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****Misskey**
2.**Instance URL**、**Access Token**。
3. **Save and Enable**
## 3. 用起来
启用后,用户可在该实例上 at/互动。Misskey 在 Memoh 里更偏:回复、文字与类 Markdown、带反应的会话。
## 支持的能力
- 文本、**Markdown**、**回复**、**反应**。
**当前限制**(以版本为准):
- 无附件/媒体上传类能力
- 无流式逐字输出
+38
View File
@@ -0,0 +1,38 @@
# QQ
走 QQ 开放平台的官方机器人,可和用户在 QQ 里互动。
## 1. 建 QQ 机器人
1. 打开 [QQ 机器人开放平台](https://q.qq.com/qqbot/openclaw/),用 QQ 登录。
2. **创建机器人**(创建机器人),一般无需审批;每号最多约 5 个。
3. 记下 **AppID**、**AppSecret**。
> **注意**AppSecret 往往只显示一次,存好。再看一次常会被迫重置。
## 2. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****QQ**
2.**AppID**、**AppSecret**。
3. 可选:
- **Markdown Support**:开 Markdown(默认多开)。
- **Enable Input Hint**:是否显示「正在输入」类提示(默认多开)。
4. **Save and Enable**
## 3. 绑定身份(可选)
跨渠道认出同一人时,可绑 Memoh 账号:
1. **Profile****Bind Code** → 选 **QQ****Generate**
2. 在 QQ 里给机器人**私聊**发绑定码。
## 支持的能力
- 文本、**Markdown**、**附件**。
- **正在输入**类提示(可关)。
- 场景:C2C 私聊、群、频道等(以平台与版本为准)。
## 参考
- [QQ 机器人开放平台](https://q.qq.com/)
- [QQ 机器人文档](https://bot.q.qq.com/wiki/)
+64
View File
@@ -0,0 +1,64 @@
# Slack
在 Slack 里收 DM、进频道、跟 thread、读附件、发文件、流式回复。Memoh 的 Slack 适配用 **Socket Mode**
## 1. 建 Slack App
1. 打开 [Slack API 控制台](https://api.slack.com/apps)**Create New App**。
2. 选要装的工作区。
3.**Basic Information** 等页保留窗口,下面要填。
## 2. 开 Socket Mode
1.**Settings** → 找到 **Socket Mode** 并开启。
2.**App-Level Token**Scope 勾 `connections:write`
3. 复制以 `xapp-` 开头的 **App-Level Token**
## 3. Bot 权限(OAuth Scopes
**OAuth & Permissions****Bot Token Scopes** 至少加当前适配会用的,例如:
- `app_mentions:read`:频道里 @
- `channels:history` / `groups:history` / `im:history` / `mpim:history`:读各场景消息
- `chat:write`:在频道/线程/DM 里发
- `files:read` / `files:write`:收、发文件
- `reactions:write`:动反应
建议再加(名子、元数据更齐):
- `channels:read` / `groups:read` / `im:read` / `mpim:read`
## 4. 订事件
**Event Subscriptions** 打开,**Subscribe to bot events** 里加,例如:
- `app_mention`
- `message.channels` / `message.groups` / `message.im` / `message.mpim`
以你装的 Memoh 版本在文档/发行说明里写的为准;上面是常见集合。
## 5. 装到工作区
1. **OAuth & Permissions****Install to Workspace**
2. 授权后复制 **Bot User OAuth Token**`xoxb-` 开头)。
**同一个 Slack App 里**`xoxb-``xapp-` 要配对使用。
## 6. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****Slack**
2.**Bot Token**`xoxb-`)、**App-Level Token**`xapp-`)。
3. **Save and Enable**
## 7. 把 app 加进对话
- DM:在 Slack 里和该 app 开对话并发一条。
- 公开频道:把 app **邀请**进频道。
- 私聊频道:装好后**显式邀请**进频道。
能发不能收图/文件,多半缺 `files:read`;能连上没人任何入站,查 **Event****history** 类 scope 是否配对。
## 支持的能力
- DM、公开/私有频道、**thread**
- 读/发附件与图片
+39
View File
@@ -0,0 +1,39 @@
# Telegram
把 Memoh 机器人接到 Telegram。Memoh 对 TG 支持较全:流式、Markdown、附件等。
## 1. 在 Telegram 建 Bot
先要有一个 **API Token**
1. 在 Telegram 里搜官方 **@BotFather**。
2.`/newbot`
3. 按提示填:
- **Name**:展示名,如 `My Memoh Bot`
- **Username**:全局唯一、以 `bot` 结尾,如 `my_memoh_bot`
4. BotFather 会给 **API Token**(形如 `123456789:ABC...`)。**不要泄露。**
> 官方说明:[Telegram Bot Tutorial](https://core.telegram.org/bots/tutorial)
## 2. 在 Memoh 里填
1. 网页里打开机器人 **详情****Platforms**
2. **Add Channel** → 选 **Telegram**
3.**API Token** 填进凭据。
4. **Save and Enable**
## 3. 绑定身份(可选)
把 Telegram 身份绑到 Memoh 账号后,跨渠道也能认出同一个人。
1. 网页 **Profile****Bind Code**
2.**Telegram**,点 **Generate**,复制码。
3. 在 Telegram 里跟你的机器人私聊,把绑定码发过去。
4. 机器人应回复绑定成功。
## 支持的能力
- **流式**:边生成边出字。
- **Markdown**:粗体、斜体、代码块、链接等。
- **附件**:收图/文件,机器人也可发文件。
- **回复链**:跟贴上下文能用于推理。
+43
View File
@@ -0,0 +1,43 @@
# 微信公众号
**个人微信扫码** 那套不同:这是 **服务号/公众号的 webhook 接入**,适合平台把消息**推**到你部署的 URL,多用在私聊入站场景。
## 1. 准备平台侧信息
在微信公众号平台准备至少:
- **App ID**
- **App Secret**
- **Token**
若开加密传输,还要 **Encoding AES Key**;出网要绕代理时可能有 **代理 URL** 等,按你部署来。
## 2. 在 Memoh 里加渠道
1. 机器人 **Platforms****Add Channel****WeChat Official Account**(名称以界面为准)。
2.**App ID**、**App Secret**、**Token**。
3.**加解密方式**(与微信后台一致)。
4. 若用 `safe` / `compatible` 等要密钥的模式,再填 **Encoding AES Key**
5. 先**保存**渠道。保存后 Memoh 会生成 **URL(服务器配置)** 用的回调地址,复制到微信平台。
## 3. 在微信平台填回调
1. 把 Memoh 的 **Webhook 回调 URL** 粘到公众号后台「服务器配置」的 URL。
2. **Token**、**Encoding**、**EncodingAESKey** 两边必须**完全一致**。
3. 微信会先做一次**验证**,通过后才真正推消息。
## 4. 启用与试发
1. Memoh 里打开该渠道。
2. 用测试号或正式号走一条**私聊**入站,看 Memoh 是否收到、机器人能否回。
## 支持的能力
- 私聊场景
- 回复
- 附件/媒体
**注意**(以当前适配为准):
- 不是群聊那种产品形态
- 出站多 **非流式**
+37
View File
@@ -0,0 +1,37 @@
# 企业微信(WeCom / WeWork
在企微工作区内收发消息,常走管理后台里自建/机器人应用。
## 1. 建企微侧凭据
1. 登录 [企微管理后台](https://work.weixin.qq.com/) 或开发文档里指引的入口。
2.**应用管理** 等位置创建 **自建应用****机器人**(以你组织实际菜单为准)。
3. 记下 **AgentId / Bot ID****Secret** 等(字段名以 Memoh 表单与企微当前文档为准)。
## 2. 在 Memoh 里填
1. 机器人 **Platforms****Add Channel****WeCom**
2. 按表单填,常见包括:
| 字段 | 必填 | 说明 |
|------|------|------|
| **Bot ID** | 是 | 企微里该机器人的标识 |
| **Secret** | 是 | 鉴权用 |
| **WebSocket URL** | 否 | 不填多用默认端点 |
3. **Save and Enable**
## 3. 使用
连上后,工作区内用户可私聊或拉群与机器人说话,行为以你企微与 Memoh 当前版本为准。
## 支持的能力
- 文本
- 私聊、群聊
- **流式**回复(在 Memoh 里多为实时出字,以实际为准)
## 参考
- [企微开放能力](https://developer.work.weixin.qq.com/)
- [企微「智能机器人」等文档以官网为准](https://developer.work.weixin.qq.com/document/path/91770)
+32
View File
@@ -0,0 +1,32 @@
# 微信(个人号)
个人微信发消息、收附件。Memoh 侧是 **扫二维码** 登录,不手填长串 token。
## 1. 在 Memoh 里加渠道
1. 机器人 **Platforms****Add Channel****WeChat**
## 2. 扫码
1.**Start QR Login**Memoh 会拉取二维码。
2. 手机微信扫页面上的码。
3. 手机上点确认。
4. 成功后会话凭据由 Memoh 存好,一般**不用**你复制 API key。
码有过期时间;过期了再点 **Start QR Login** 重刷。
## 3. 使用
登录成功后渠道一般会自动启用。用户即可在微信里跟机器人私聊。
## 可选
| 字段 | 说明 |
|------|------|
| **Enable Typing** | 生成中是否显示「正在输入」类状态 |
## 支持的能力
- 私聊文本
- 图片、媒体等附件
- 可选「正在输入」提示
@@ -1,41 +0,0 @@
# 账号模型与绑定
## 账号模型
Memoh 将平台账号与系统账号视为两类不同实体:
- **平台账号(`ChannelIdentity`)** 是用户在外部接入平台上的账号(例如飞书账号),不是 Memoh 内部账号。
- **系统账号(`User`** 是 Memoh 系统内账号。
平台账号在初始阶段可以不绑定系统账号。
`bind` 的职责是完成这两类账号的关联。
## 接入平台与 Bot
- **接入平台(`channel`** 是入站消息来源。
- **Bot** 是系统内的授权与资源边界。
Bot 由系统账号管理,入站消息由平台账号产生。
## 为什么账号绑定是账号作用域
账号绑定的目标是建立账号归属关系,而不是直接发放 bot 资源权限:
- 它只负责平台账号与系统账号的绑定;
- 不把账号绑定与成员管理语义耦合在一起;
- 让 bot 访问控制保持独立、可演进。
## 账号绑定流程(当前共识)
1. 用户以自己的系统账号申请 bind code;
2. 平台账号在支持的接入平台会话中发送 code;
3. 系统校验 code,完成平台账号到系统账号的绑定;
4. bot 成员与授权由独立流程处理。
## Bot 类型语义
- **Public bot**:支持成员协作语义。
- **Personal bot**:语义上应为单 owner,不应依赖成员机制。
> 注:本文档记录的是产品语义与共识方向。
> 部分运行时细节仍可能处于收敛阶段。
-21
View File
@@ -1,21 +0,0 @@
# 核心概念
本章节用于定义 Memoh 的核心账号与访问概念。
## 概念图
- **系统账号(`User`**Memoh 系统内账号。
- **平台账号(`ChannelIdentity`)**:用户在外部接入平台上的账号,不是 Memoh 系统内账号(例如用户的飞书账号)。
- **Bot**:由系统账号管理的资源与访问边界。
- **账号绑定(`bind`)**:把平台账号关联到系统账号的过程。
## 为什么重要
Memoh 需要同时处理外部接入平台消息与系统内权限控制。
因此我们明确区分平台账号与系统账号,并将 bot 授权与账号绑定解耦。
术语说明:文档中的“平台账号”统一指用户在对应平台上的真实账号(如飞书账号),不指本项目内部账号。
## 本章内容
- [账号模型与绑定](/zh/concepts/identity-and-binding.md)
+138
View File
@@ -0,0 +1,138 @@
# 访问控制
Memoh 用 **ACL** 控制谁能跟你的机器人说话。可在机器人 **Access** tab 里按人、按平台账号、按整类渠道设规则,并设**优先级**。
---
## 快速入门:ACL 预设
建机器人时可选 **ACL 预设**,只是常见起步方式:
| 预设 | 效果 |
|------|------|
| `allow_all` | 默认 **允许**;来者不拒,除非你再加拒绝规则 |
| `private_only` | 默认 **拒绝**;私聊放行(视具体实现与后续规则) |
| `group_only` | 默认 **拒绝**;群聊放行 |
| `group_and_thread_only` | 默认 **拒绝**;群与 thread 放行 |
| `deny_all` | 默认 **拒绝**;除 owner/管理员路径外都要你显式允许 |
预设只是起点,之后都在 **Access** 里改。
---
## 概念
### 默认效果
每个机器人有一个 **default effect**`allow``deny`):**没有任一条规则命中**时怎么办。
- **Allow**:默认谁都能聊,除非你按规则挡。
- **Deny**:默认都挡,只放行 owner、管理员和你写允许规则的对象。
### 主体类型
| 主体 | 说明 |
|------|------|
| **All** | 所有入站消息,用来做全局放行/拒绝 |
| **Channel Identity** | 某个外部平台上的具体身份(如某个 TG 用户) |
| **Channel Type** | 某整类渠道(如所有 Telegram 用户) |
### 效果
每条规则不是 **Allow** 就是 **Deny**
### 优先级
按列表**自上而下**匹配,**第一条命中的**生效:
1. 机器人 owner、系统管理员 → **始终允许**(绕 ACL)。
2. 再按规则从上往下,找第一个主体匹配的发送者。
3. 若都不匹配 → 用 **默认效果**
所以**顺序很重要**:同一个人,上面一条 `deny` 会盖住下面一条 `allow`(若先匹配到 deny)。
---
## 管理
### 建议流程
1. 建机时选一个预设。
2. 打开 **Access**,确认 **Default Effect**
3. 只有在太宽或太窄时再加/调规则。
### 加规则
1. **Add Rule**
2. 选主体:All / 某平台账号 / 某渠道类型。
3. 选效果 `allow``deny`
4. 可选 **来源范围**(把规则限在更细的上下文):
- 某条渠道配置
- 会话类型:私聊 / 群 / thread
- 会话 ID
- 线索程 ID(通常要配合会话 ID)
5. 保存。
### 排序
可拖拽改优先级;**越靠上越先判**。改完记得 **Save**
### 来源范围
用来写细规则,例如:
- 只允许从 Telegram 进,不允许 Discord
- 某渠道类型只在群里挡
- 某个群、某条 thread 单独管
范围大致是:渠道 → 会话类型 → 会话 ID → 线程 ID;后几级可选,但 **Thread 一般要有 Conversation ID**
---
## 预设怎么选
- `allow_all`:开放试用、公开展示。
- `private_only`:只打算私聊用。
- `group_only`:只打算在共享房间用。
- `group_and_thread_only`:要群/线程,不要私聊。
- `deny_all`:敏感用例,**逐个加白名单**。
吃不准时,个人测试机可 `allow_all`,敏感环境可 `deny_all` 再白名单。
---
## 例子
### 谁都能聊
1. 预设 `allow_all`,或默认效果 `allow`
2. 不加规则也行。
### 只给少数私用
1. 预设 `deny_all` 或默认 `deny`
2. 对要放行的人加 **allow** 的 Channel Identity。
### 公开但拉黑几个人
1. 预设 `allow_all` 或默认 `allow`
2. 在列表**上面**加 **deny** 给那几个人(先判 deny)。
### 只开某一整平台
1.`deny_all``private_only` 等起步。
2.**Channel Type**`allow`,例如只开 `telegram`
### 只让某人在某一渠道聊
1. 给该人 **allow**
2. **来源范围** 里把渠道指到具体那条 Telegram/Discord 配置。
---
## 查为什么判成这样
-**Access** 里规则顺序和默认效果。
-`/access` 看当前身份、角色、ACL 判定上下文。
多平台身份绑在一起、或群/thread 判晕时,这条特别有用。
+125
View File
@@ -0,0 +1,125 @@
# 机器人
机器人是 Memoh 里**独立**的智能体:自带容器、长期记忆、可配性格,并能通过各 **渠道** 对话、用工具做事。
## 创建
1. 侧栏进入 **Bots**
2.**Create Bot**
3. 基本信息:
- **Display Name**:对外的名字
- **Avatar**:头像 URL
- **Timezone**:可空;不填则继承用户或系统时区
- **ACL Preset**:如 `allow_all` 只给自己用、`private_only` 等快捷策略
4. 创建。
---
## 详情页
点卡片进 **详情**,各 tab 管不同事:
| Tab | 内容 |
|-----|------|
| **Overview** | 容器、库、渠道、记忆等健康检查 |
| **General** | 主模型/标题/生图、记忆/搜索/浏览器/TTS、时区、语言、推理、危险区 |
| **Container** | 起停、快照、导入导出 |
| **Memory** | 浏览、搜、建、改、压记忆 |
| **Platforms** | 各消息渠道(Telegram、Discord、飞书等) |
| **Access** | ACL 与默认通过/拒绝 |
| **Email** | 邮服绑定、发件箱 |
| **Terminal** | 进容器 shell |
| **Files** | 容器内文件管理 |
| **MCP** | 连接(Stdio/Remote/OAuth |
| **Heartbeat** | 心跳间隔、模型、执行日志 |
| **Compaction** | 会话压缩设置与记录 |
| **Schedule** | cron 与日志 |
| **Skills** | 技能 Markdown |
---
## 核心先配什么
1. 打开机器人 **General**,先管模型与各类绑定。
2. **Heartbeat** 管周期自主跑。
3. **Compaction** 管会话写不长时的压缩。
4. **Access** 在 ACL 预设之后细调。
若这些资源还没有,先建好:
- [供应商与模型](/zh/getting-started/provider-and-model.md)
- [内置记忆提供方](/zh/memory-providers/builtin.md)(如用)
- [搜索提供方](/zh/getting-started/search-provider.md)
- [浏览器上下文](/zh/getting-started/browser.md)
- [TTS 提供方](/zh/tts-providers/index)
---
## General 字段
| 字段 | 说明 |
|------|------|
| **Chat Model** | 主对话模型 |
| **Title Model** | 可选,生成会话标题 |
| **Image Generation Model** | 可选,需带 `image-output` 的聊天模型 |
| **Memory Provider** | 长期记忆后端;内置类型还可自带记忆/向量模型 |
| **Search Provider** | 联网搜索用哪家 |
| **TTS Model** | 来自 TTS 流,不是普通 chat 供应商里选 |
| **Browser Context** | 自动化上网用的浏览器配置 |
| **Timezone** | 不填则用户时区再落到系统 |
| **Language** | 机器人主用语 |
| **Reasoning Enabled** | 当前 chat 模型有 `reasoning` 时可用 |
| **Reasoning Effort** | `low` / `medium` / `high` |
注意:
- **生图模型** 故意与主聊天模型分开,好单独换「更擅长出图」的。
- **TTS** 在 [TTS 提供方](/zh/tts-providers/index.md) 里用 `speech` 模型,例如 Edge。
- `context_window` 会影响状态栏展示和 [会话压缩](/zh/getting-started/compaction.md) 的体感。
---
## Heartbeat 字段
| 字段 | 说明 |
|------|------|
| **Heartbeat Enabled** | 开不开周期自主 |
| **Interval** | 多少分钟一次 |
| **Heartbeat Model** | 可与主 chat 不同 |
同 tab 可看各次执行日志。
---
## Compaction 相关(此处指「会话」)
这里说的是 **当前会话** 的上下文压短,不是改记忆条目的那种。
| 字段 | 说明 |
|------|------|
| **Compaction Enabled** | 是否自动在会话里压摘要 |
| **Compaction Threshold** | 触发的估算 token 阈值 |
| **Compaction Ratio** | 压多狠 |
| **Compaction Model** | 可选,专门做摘要的模型 |
细节见 [会话上下文压缩](/zh/getting-started/compaction.md)。
---
## 访问与 ACL
创建时先给一个 **ACL 预设**,之后在 **Access** 里微调。**预设** 给一版默认策略,**Default Effect** 管「没命中规则时」放行还是挡。
[会话](/zh/getting-started/sessions.md) 与 Discuss 的默认行为在那一页。若你用 API/自动化,配置里还可能有 `discuss_probe_model_id` 等进阶项,日常创建不必先动。
---
## 终端
**Terminal** tab 开交互 shell,可多 tab;**容器在跑**时才能用。
---
## 删除
**General** 最下 **Danger Zone****Delete Bot**,会删掉该机器人相关数据(含容器文件与记忆等),**不可恢复**。
+80
View File
@@ -0,0 +1,80 @@
# 浏览器上下文
Memoh 通过 **Browser Gateway** 给机器人无头浏览器能力。**Browser Context** 里存视口、语言、时区、是否模拟手机等。绑到机器人后,可用工具打开页面、点按、填表、截图、读 DOM 等。
---
## Browser Gateway
基于 **Playwright**。一个 context 像一份可复用的「浏览器侧配置」。
适合:跳站、点链、填表、读渲染后内容、出图或 PDF 等。
---
## 建上下文
侧栏 **Browser Contexts**
1. **Add Browser Context**
2.**Name**
3. **Create**
---
## 配字段
| 字段 | 说明 |
|------|------|
| **Name** | 展示名 |
| **Core** | `chromium`(默认)或 `firefox` |
| **Viewport Width / Height** | 像素 |
| **User Agent** | 可选 |
| **Device Scale Factor** | 可选 DPR |
| **Locale** | 如 `en-US``zh-CN` |
| **Timezone ID** | 如 `UTC``Asia/Shanghai` |
| **Is Mobile** | 手机行为 |
| **Ignore HTTPS Errors** | 坏证书站是否还进 |
**Edit**、**Delete**。
---
## 绑到机器人
1. **Bots** → 打开机器人
2. **General**
3. **Browser Context** 下拉选
4. 保存
之后调浏览器工具时会用这个 profile。
---
## 机器人侧
常见内置如:
- `browser_action`:导航、点击、填表、选、滚、多 tab、截图、PDF 等
- `browser_observe`:看当前页,给模型用
让机器人能操作**真页面**,而不只有静态 HTML 或搜索摘要。
---
## 浏览器核
镜像里可带 Chromium、Firefox 或两者。构建时由 `BROWSER_CORES` 决定。一键安装脚本里会问;手搓例如:
```bash
BROWSER_CORES=chromium docker compose --profile browser build browser
```
合法值:`chromium``firefox``chromium,firefox`(默认组合)。
---
## 接下来
- 记忆与内置模式:[内置记忆提供方](/zh/memory-providers/builtin.md)
- 长期记忆操作:[长期记忆](/zh/getting-started/memory.md)
+70
View File
@@ -0,0 +1,70 @@
# 机器人的渠道
**渠道**把机器人接到各消息平台,让你用熟悉的 App 跟它说话。
## 统一接入
Memoh 在中间做一层适配;一个机器人可以同时挂在 Telegram、Discord、Matrix 等多个平台。
---
## 支持哪些平台
在机器人 **Platforms** tab 里配。分平台步骤见 **[渠道](/zh/channels/index)** 下各篇:
| 平台 | 指南 | 备注 |
|------|------|------|
| Telegram | [Telegram](/zh/channels/telegram) | 附件、流式较好 |
| 飞书 | [飞书](/zh/channels/feishu) | 可走 webhook 入站 |
| Discord | [Discord](/zh/channels/discord) | 社群、服务器 |
| QQ | [QQ](/zh/channels/qq) | 偏个人 DM |
| Matrix | [Matrix](/zh/channels/matrix) | 自建 homeserver |
| Misskey | [Misskey](/zh/channels/misskey) | 回复、反应;无流式 |
| 钉钉 | [钉钉](/zh/channels/dingtalk) | 企业私聊/群 |
| 企微 | [企微](/zh/channels/wecom) | 企业微信工作区 |
| 微信 | [微信](/zh/channels/weixin) | 个人扫码登录 |
| 公众号 | [公众号](/zh/channels/wechatoa) | 公众号 webhook |
| Slack | [Slack](/zh/channels/slack) | 有 thread;无流式 |
个人 **微信****公众号** 是两套适配,别混用。
---
## 配置流程
### 1. 添加
**Add Channel** → 选平台 → 按表单填(随平台变)。
### 2. 常见字段
| 字段 | 说明 |
|------|------|
| **Credentials** | 各平台给的 token、密钥、机器人 key 等 |
| **Disabled** | 不删配置,只关掉 |
| **Routing** | 平台侧线程/会话与 Memoh 的对应关系 |
### 3. 飞书 Webhook 入站
`webhook` 入站时,Memoh 会生成 **Webhook 回调 URL**,贴到飞书应用事件里,由飞书把消息推过来。
### 4. 个人微信
启用后走扫码,用微信扫完连上。
### 5. 公众号
先保存渠道,用 Memoh 给的 **回调 URL** 配到公众号后台;`Token`、加解密方式、可选 AES 要与 Memoh 里一致。
### 6. 钉钉 Stream
`App Key` / `App Secret`,保存并启用;标准用法下由 Memoh 维护长连接收事件,不必自己再管一层 webhook。
---
## 操作
- **Save**:改配置
- **Save and Enable**:保存并立刻启用
- **启停开关**:不删配置地开/关
- **Delete**:删掉该渠道配置
@@ -0,0 +1,99 @@
# 会话上下文压缩
**上下文压缩**只针对**当前这一会话**:把早先轮次压成摘要,让后面模型调用时带的**活跃窗口**小一点。
这和**改记忆库里存的长记忆**不是一码事。要动存储条目,看 [长期记忆](/zh/getting-started/memory.md)。
---
## 为什么需要
对话一拉長,回给模型的历史就膨胀:**token、延迟、吃满 context** 都难受,老内容还可能挤掉新内容。压缩用摘要换掉一部分细节,**还保留点连贯性**即可。
---
## 它动什么、不动什么
动的是**本会话的活跃上下文**。
不动:
- 不删机器人本身
- 不换记忆提供方配置
- 不合并长期记忆条目的主流程(那是记忆 tab 里另一类 compaction
- 不替代「去记忆库里搜」
---
## 自动
**General**(或你版本里放压缩设置的地方)里配:
| 字段 | 说明 |
|------|------|
| **Compaction Enabled** | 开不开自动压 |
| **Compaction Threshold** | 估算超多少 token 就触发后台压缩 |
| **Compaction Ratio** | 压多狠 |
| **Compaction Model** | 用谁写摘要,可与主 chat 不同 |
打开后,Memoh 在某一**轮**之后,若估摸输入已超阈值,会后台做压缩。`context_window` 会参与「快满了」的感觉。
---
## 立刻压
两路:
### 状态区
1. 打开当前对话。
2. 打开会话状态区。
3.**Compact Now**
上面也有上下文占用、缓存、技能等,方便你判断要不要现在压。
### 斜杠命令
```text
/compact
```
```text
/compact run
```
同步压当前会话,结果会回到聊天里。
---
## 记录
机器人详情 **Compaction** tab 可看各次:成功/失败、摘要或预览、涉多少条消息、起止时间、若有的模型与用量。用来确认**自动**有没有在跑、失败原因等。
---
## 和 `context_window`
Memoh 会拿当前选中的 chat 模型的 `context_window` 对照本会话。网页状态区、`/status` 都能看到离上限多近。越满,**专门建一个便宜点的压缩模型**写摘要,往往越划算。
---
## 和「记忆压缩」的区别
| | 作用范围 | 怎么触发 | 结果 |
|---|----------|----------|------|
| **上下文压缩** | 当前活跃会话 | 状态区 / `/compact` / 自动 | 本会话里较早内容变摘要,方便后面几轮继续聊 |
| **记忆压缩** | 长期记忆提供方 | Memory tab | 改库里记忆条目,不是单会话 prompt |
**一路聊太长了** → 上下文压缩。
**存下来的记忆又脏又重** → 去 Memory 里做那类维护。
---
## 接下来
- 会话、Discuss[会话](/zh/getting-started/sessions.md)
- 斜杠与 `/compact`[斜杠命令](/zh/getting-started/slash-commands.md)
- 长期记忆维护:[长期记忆](/zh/getting-started/memory.md)
+91
View File
@@ -0,0 +1,91 @@
# 容器
每个机器人在**自己的**容器里跑,文件系统、网络边界都隔开,互不影响,也跟宿主机隔离。
## 是什么
可以把它想成机器人私用的一台小电脑:能存文件、装包、跑脚本、跨会话留状态。
---
## 操作
**Container** tab。
### 生命周期
- **Create**:没有就按镜像建;拉镜像、建实例时会有 SSE 进度。
- **Start**:要跑文件工具、终端等,多半要先起来。
- **Stop**:省资源,优雅停。
- **Delete**:删实例(数据行为视版本与设置而定,以界面为准)。
---
## 信息
会显示如:容器 id、状态、用的镜像、宿主机/容器路径、后台任务数、若配了 **CDI 设备**(常见 GPU)也会列出来。
---
## 进阶:CDI 设备
要把宿主机通过 **CDI**(常见是 GPU)透进容器,在 **Container****Advanced** 里配。一般只有确实要在里面跑 CUDA/ROCm 等才要动。
### 配法
1. 打开 **Container**
2. 没有容器先 **Create**;要改 GPU 类设置往往要**重建**容器。
3. 展开 **Advanced**
4.**GPU**,在 **CDI devices** 里写设备名。
可每行一个或逗号分隔,例如:
- `nvidia.com/gpu=0`
- `nvidia.com/gpu=all`
- `amd.com/gpu=0`
- `amd.com/gpu=all`
### 宿主要求
宿主机上驱动、厂商工具、CDI spec 要已就绪。通常意味着:
- 宿主机上 GPU 本来就能用
- `/etc/cdi``/var/run/cdi` 里有 spec
- 你填的名字和运行时看见的一致
查本机名:
- NVIDIA`nvidia-ctk cdi list`
- AMD`amd-ctk cdi list`
若报 `unresolvable CDI devices`,多半是名字对不上。
### 注意
- CDI 在**创建**时生效,改配置后常要**重建**容器;只停再起**不会**换已挂设备。
- 镜像里仍要装对的用户态库,才能真跑算子。
- 建好后 **Container** tab 会显示当前挂上的设备,便于核对。
---
## 快照
**Create Snapshot** 把当前环境状态勾下来,方便回滚、试大改。
**Restore** 按某个快照回退。可删不要的快照。
---
## 导入导出
- **Export Data**:把容器内数据打成包下载。
- **Import Data**:从本地上传打进文件系统。
### Restore(数据侧)
**Restore** 在数据目录侧做「清到干净再灌」,适合盘坏了或想从零来而又不删容器实例时,以界面说明为准。
---
## 版本
会跟 **Current Version**、**Version History** 等,方便审计环境何时、因何变过。
+49
View File
@@ -0,0 +1,49 @@
# 邮件
让机器人**收/发**邮件,分两步:**邮服提供方** + 机器人上的 **Email 绑定**
## 在做什么
1. 先配能连上的 **Email Provider**(如 Mailgun、泛用 SMTP 等)。
2. 再在某个机器人上,把某邮箱**绑定**过去,并设读/写/删权限。
---
## 邮服
侧栏 **Email Provider**
### 新建
1. **Add Email Provider**
2. 类型如 **Mailgun**(量大)、**泛用 SMTP**(传统邮局)
3. 按表单填 `domain`/`api_key``host`/`port`
4. 创建
---
## 机器人上的绑定
机器人 **Email** tab。
### 添加
1. **Add Binding**
2. 选已建的 **Email Provider**
3. 填要绑的 **Email Address**
4. 勾权限:
- **Can Read** 收信、处理入站
- **Can Write** 发信
- **Can Delete** 管邮箱里删除等(视实现)
5. 创建
### 发件箱
**Outbox** 会记发出的邮件:收信人、主题、状态、时间,便于对账、排错。
---
## 和机器人
- 有权限时可用邮件发报告、回邮、或按新邮件做事。
- 和聊天一样,是另一条通道,但仍是结构化、可审的。
+36
View File
@@ -0,0 +1,36 @@
# 文件
每个机器人在容器里有一份**独立盘**。在 **Files** tab 里直接管。
---
## 能做什么
带工具栏、目录树、编辑器的 **FileManager** 常见能力:
### 浏览
- 面包屑上下级
- **Refresh** 看机器人刚写的文件
- **New Folder** 建目录
### 文件
- **Upload** 本机文件打进容器
- **Rename** / **Delete**(目录可递归删)
- **Download** 拉回本机
---
## 看与改
**FileViewer** 里:
- 文本类(如 `.md``.js``.py``.toml`)用 **Monaco** 打开,高亮、保存回写盘。
- 图(`.png` 等)可预览。
---
## 和机器人
机器人自己也能用技能、MCP 等改这些文件;**Files** 是你**肉眼查看、手改**的入口。
+33
View File
@@ -0,0 +1,33 @@
# 心跳
**Heartbeat** 让机器人**按固定间隔**自己跑一轮,不依赖你一直发消息。适合巡检查状态、收数据、清盘、发提醒等。
## 是什么
到点触发一次,给机器人一句「例行走一圈」的语境,它可以用技能、MCP、工具。间隔用**分钟**计。
---
## 配置
**Heartbeat** tab
| 字段 | 说明 |
|------|------|
| **Enabled** | 开/关 |
| **Interval** | 隔多少分钟,默认常是 30 |
| **Model** | 用哪一聊天模型跑;可与主 chat 不同 |
---
## 日志
每次执行有记录:**状态**ok / alert / error)、**时间**、**耗时**、**结果摘要** 等。可按状态筛、刷新、清、翻页更多。
---
## 和机器人
- 心跳轮会带专门系统向的提示,让模型做「例行」事。
- 技能、MCP 照常可用。
- 日志就是自主行为留下的线索。
+68
View File
@@ -0,0 +1,68 @@
# MCP 连接
Memoh 支持 **Model Context Protocol (MCP)**,让机器人接外部工具与上下文服务。每个机器人可以有自己的一组 MCP 连接。
## 在做什么
MCP 把「外部数据、外部工具」用相对统一的方式接进来。你在机器人 **MCP** tab 里手配,或从 [超市](/zh/getting-started/supermarket.md) 装模板再进编辑器改。
---
## 连接类型
### 1. Stdio(本机进程)
在机器人**容器里**起本地命令,用标准输入输出通信。
| 字段 | 说明 |
|------|------|
| **Command** | 可执行文件,如 `npx``python3` |
| **Arguments** | 参数列表 |
| **Env** | 环境变量 |
| **CWD** | 工作目录 |
### 2. RemoteHTTP/SSE
走网络的远程 MCP。
| 字段 | 说明 |
|------|------|
| **URL** | 服务端点 |
| **Headers** | 如鉴权头 |
| **Transport** | `http``sse` |
---
## OAuth
有的 MCP 服要走 OAuth。Memoh 会:
1. 在需要认证的连接上点 **OAuth**
2. 自动 **discover** 服务方 OAuth 配置。
3. **Authorize** 打开授权页。
4. 用户同意后回跳,Memoh **换 token** 并安全存好。
也可看状态、**Revoke** 清掉 token。
---
## 操作
- **Add Connection**:加一条,选类型,填表。
- **Import JSON**:从标准 `mcpServers` JSON 一次导入多条。
- **Export**:导出备份或分享。
- **Toggle Active**:不删,只开/关某条。
- **Search**:按名或 id 找。
- **Batch Delete**:多选删除。
---
## 工具发现
连接 active 后,Memoh 会拉该服暴露的工具。点进连接可看 **Tools** 列表。需要时点 **Probe** 手动刷新。
---
## 和机器人怎么配合
连上后,对话里模型会按说明选用这些工具;发现到的工具会进推理流程。具体工具名、参数以服端为准。
+81
View File
@@ -0,0 +1,81 @@
# 长期记忆
Memoh 的结构化长期记忆让机器人在**多路会话**里也能用上以前留下的事实。用 **Memory** tab 前,先给机器人配好 **Memory Provider**
## 先决条件
1. 在 [记忆提供方](/zh/memory-providers/index.md) 里建一个(内置、Mem0、OpenViking 等)。
2. 打开机器人 **General**
3. **Memory Provider** 里选中。
4. 保存。
没选提供方,就没有正在使用的记忆后端。
---
## 在做什么
记忆条目的存、取、搜都由当前提供方实现;按类型和模式,可能是文件索引、稀疏向量、稠密向量、或外接 API。用户发消息时,Memoh 会尝试取出相关记忆塞进当次上下文。
本页说 **长期记忆**;**会话写太长** 要压短,是另一件事,见 [会话上下文压缩](/zh/getting-started/compaction.md)。
---
## 在界面里
### 建记忆
- **New Memory**:手打一条。
- **From Conversation**:从已有对话里抽成记忆。
### 搜与管理
- **Search**:按 id 或文字筛。
- **Edit**:改内容。
- **Delete**:不要就删。
---
## 记忆压缩(注意:不是会话压缩)
积累多了可以在 **Memory** tab 对**存储侧**做 **Compact**:合并重复、去陈旧、压噪声。有 **Ratio**、**Decay Days** 等参数。
这和 [会话上下文压缩](/zh/getting-started/compaction.md) 不同:后者是**单路会话**里把 prompt 压短,不改库里长期记忆条目的存法与合并结果。
---
## Rebuild
**Rebuild** 会按当前设置**整库重索引**。换模式、索引乱了、想全量用新设置跑一遍时有用。页面上可跟进度。
---
## 状态
**Memory** tab 会显示当前该机器人的记忆后端的 **Connected / Error**,排障时先看一眼。
---
## 用量
可看 **总条数**、**索引是否跟上** 等,心里有数再调策略。
---
## 和「会话里那段对话」的对比
| 概念 | 作用范围 | 在哪动 | 改变什么 |
|------|----------|--------|----------|
| **记忆压缩** | 长期记忆提供方 | Memory tab | 改存储里条目怎么合并/精简 |
| **上下文压缩** | 当前这一路会话 | 状态区或 `/compact` | 用摘要把**本会话**历史变短,给后面轮次用 |
要减「跨会话噪声」、整理记忆库 → 用 **记忆压缩**
要减「这一路聊太长了」→ 用 [会话上下文压缩](/zh/getting-started/compaction.md)。
---
## 和机器人的关系
- 聊的时候会按配置去搜记忆。
- 具体用哪种后端、什么模式、embedding 等,在**提供方**上配,见 [记忆提供方](/zh/memory-providers/index.md)。
- 长期记忆是机器人「个性与事实」里很大一块来源。
@@ -0,0 +1,159 @@
# 供应商与模型
日常用 Memoh,多半要配好:
- 一个或多个 **供应商**(怎么连上游 API
- 其下的 **模型**
- 若要朗读,再配 **语音相关**(见 [TTS](/zh/tts-providers/index.md)
聊天与 embedding 在 **Models** 页管理;语音模型在 TTS 流程里单走。
---
## 供应商基础
**供应商**里存的是某一类上游的连法,例如:
- 协议(`client_type`
- 需要时的 base URL
- API Key 或 OAuth 等凭据
常见有 OpenAI 兼容站、Anthropic、Google、Codex、GitHub Copilot 等。
### 新建供应商
1. 侧栏打开 **Models**
2. 点 **Add Provider**
3. 按表单填完保存。
常用字段:
| 字段 | 说明 |
|------|------|
| **Name** | 展示名,如 `OpenAI`。 |
| **Client Type** | 本供应商用的协议。 |
| **Base URL** | 部分协议必填的根地址。 |
| **API Key** | 走密钥时填。 |
### 客户端类型
| Client Type | 常见用途 |
|-------------|----------|
| `openai-responses` | OpenAI Responses 风格 |
| `openai-completions` | Chat Completions 兼容 |
| `anthropic-messages` | Anthropic Messages |
| `google-generative-ai` | Google Gemini |
| `openai-codex` | Codex / ChatGPT 那套,OAuth |
| `github-copilot` | Copilot,设备码 OAuth |
| `edge-speech` | 仅朗读,走 Edge |
`edge-speech` 不能当主聊天用,请走 [TTS 提供方](/zh/tts-providers/index.md)。
---
## 走 OAuth 的供应商
多数类型用普通 API Key。`openai-codex``github-copilot` 例外。
### OpenAI Codex
- 类型选 `openai-codex`
- 在供应商表单里走 OAuth,不填普通 key
- 预置会指向 `https://chatgpt.com/backend-api`
偏写代码、走 Codex 那套时合适。
### GitHub Copilot
- 类型 `github-copilot`
- **设备码** 授权
- 等待时界面会给验证 URL 和用户码
- 结束后存 GitHub 侧 token
你本来就有 Copilot 时,可复用进 Memoh。
---
## 导入模型
建完供应商后可以导入或手加模型。常见:选中供应商 → **Import Models**(若上游有目录)→ 勾要保存的。已知上游 id 时也可手填。
---
## 模型类型
| 类型 | 用途 |
|------|------|
| `chat` | 对话、工具、推理、文生图等 |
| `embedding` | 向量化、记忆检索 |
| `speech` | 朗读,挂在 TTS |
**Models** 页主要管 chat / embeddingspeech 在 [TTS](/zh/tts-providers/index.md)。
---
## 聊天模型上要注意的项
| 字段 | 说明 |
|------|------|
| **Model ID** | 上游真实 id,如 `gpt-4o`。 |
| **Name** | 界面展示名。 |
| **Compatibilities** | 如 `vision``tool-call``image-output``reasoning`。 |
| **Context Window** | 粗算上下文上限。 |
### 兼容性
| 标记 | 含义 |
|------|------|
| `vision` | 能吃图 |
| `tool-call` | 能调工具 |
| `image-output` | 能出图 |
| `reasoning` | 有显式推理/档位 |
有推理时可能还带 `reasoning_efforts``none``low``xhigh` 等。
### `context_window`
Memoh 用来:
- 在网页上算当前会话占了多少上下文
- 驱动 `/status`
- 判断是否逼近上限
- 决定何时需要 [会话上下文压缩](/zh/getting-started/compaction)
不填也能用,但**百分比**会没法精确给。
### 文生图模型
机器人上可单挂 **Image Generation Model**,须是带 `image-output` 的 chat 模型。需要时与默认聊天模型分开。
---
## Embedding 模型
给语义索引用。必填如 **Dimensions**(向量维数,如 1536)。和记忆或其它向量检索能力绑在一起用。
---
## 语音模型
在 [TTS 提供方](/zh/tts-providers/index.md) 配,不跟普通 chat 供应商混流。例如 Edge TTS 走 `edge-speech`。语音还有音色、格式、语速、音高,和 chat/embedding 不是一路设置。
---
## 怎么记省事
对多数机器人,可以分三条线想:
- **Chat**:日常说人话
- **Embedding**:记忆
- **Speech / 生图模型**:边能力
不必强行一模型全包。
---
## 接下来
- 给机器人绑聊天、生图、浏览器、记忆、朗读等:[机器人](/zh/getting-started/bot.md)
- 配语音提供方与语音模型:[TTS 提供方](/zh/tts-providers/index.md)
+99
View File
@@ -0,0 +1,99 @@
# 计划任务
**cron 表达式** 在固定时间让机器人干一件事:发报告、查外网、维护、或任何能交给智能体+工具完成的活。
## 是什么
**Schedule** 绑在某个机器人上。到点就把一条自然语言 **command** 交给智能体,由它用工具、技能去执行,结果可发到已接好的渠道。
---
## 字段
| 字段 | 说明 |
|------|------|
| **Name** | 展示名,如 `晨间摘要` |
| **Description** | 短说明 |
| **Pattern** | 五段 cron,如 `0 9 * * *` 每天 9:00 |
| **Command** | 到点时发给智能体的自然语言任务 |
| **Enabled** | 是否启用 |
| **Max Calls** | 总执行次数上限,空=不限 |
| **Current Calls** | 已跑次数 |
---
## Cron(五段)
在服务器时区下算;默认 Memoh 常用 **UTC**,可用顶层 `timezone` 改。五段为:分、时、日、月、周。
```
┌ 分 059
│ ┌ 时 023
│ │ ┌ 日 131
│ │ │ ┌ 月 112
│ │ │ │ ┌ 周 0–6,周日=0
* * * * *
```
| Pattern | 含义 |
|---------|------|
| `0 9 * * *` | 每天 9:00 |
| `*/30 * * * *` | 每 30 分钟 |
| `0 0 * * 1` | 每周一 0:00 |
| `0 8,20 * * *` | 每天 8:00 和 20:00 |
| `0 0 1 * *` | 每月 1 号 0:00 |
---
## 看列表
机器人 **Schedule** tab:名、pattern、是否启用、执行次数等;**Refresh** 重载。
---
## 创建
### 让机器人自己建
机器人有 `schedule` 工具。你可以说人话,例如让每天 8:00 汇总未读邮件,它会去拼 cron 并登记。
### 调 API
`POST /api/bots/{bot_id}/schedule`,例如:
```json
{
"name": "Daily Digest",
"description": "Summarize unread emails every morning",
"pattern": "0 8 * * *",
"command": "Summarize my unread emails and send the result to Telegram.",
"enabled": true,
"max_calls": null
}
```
(字段名以当前 API 为准。)
---
## 执行时发生什么
1. cron 到点
2. `current_calls` +1
3. 若设了 `max_calls` 且到顶,任务自动关
4. 智能体收 `command` 与计划上下文
5. 用工具发消息/搜网页等
6. 结果可发到已连接渠道
---
## 和 Heartbeat 对比
| | Schedule | Heartbeat |
|---|----------|-----------|
| 触发 | cron,时间点灵活 | 固定**间隔**(分钟) |
| 内容 | 你写的一条自然语言指令 | 偏「例行走一圈」的通用轮询 |
| 次数上限 | 可设 | 无上限那层概念 |
| 适合 | 定点的具体事 | 笼统的周期自检 |
**Heartbeat** 当「常转转」**Schedule** 当「几点要干啥」。两者可一起用。
@@ -0,0 +1,48 @@
# 搜索提供方
给机器人接 **Search Provider** 后,它能在对话里**实时**查网,用搜索引擎 API 当工具。
## 在做什么
每个 Search Provider 是某一家的搜索 API(如 Brave、Google)。配好并绑到机器人后,需要新鲜事实时由模型去调。
---
## 支持哪些
侧栏 **Search Provider** 里建。常见能力包括(以你装的版本为准):
| 引擎 | 说明 |
|------|------|
| **Brave** | 隐私和速度常被提及 |
| **Bing** | 覆盖面大 |
| **Google** | 传统网页搜 |
| **Tavily** | 偏 AI 研究向 |
| **SearxNG** | 自建聚合 |
| **DuckDuckGo** | 偏隐私 |
| 其它 | 如搜狗、Serper、Jina、Exa、Bocha、Yandex 等 |
---
## 建一个
1. 侧栏 **Search Provider**
2. **Add Search Provider**
3. 填 **Name**、**API Key**,有的引擎还要 **base_url**(如 SearxNG)。
**Edit** 改、**Delete** 删。
---
## 绑到机器人
1. **Bots** → 机器人
2. **General**
3. **Search Provider** 下拉选中
4. 保存
---
## 和机器人
需要**较新、较贴问题**的公开信息时,会走搜索,再把结果融进回答;可多结果综合。具体策略由模型和工具设计决定。
+92
View File
@@ -0,0 +1,92 @@
# 会话
**会话**是用户与机器人之间的一路独立对话。每路有自己的上下文与历史,换话题或任务时常开新会话。
---
## 为什么要隔离
你和机器人聊的内容都落在当前会话里;**新开会话**会换一块上下文,老记录还在,只是不再参与当前这一路的推理。
会话按**机器人**分;每个机器人各自一摞会话,互不掺。
---
## 会话类型
| 类型 | 说明 |
|------|------|
| **Chat** | 最常见的用户发起对话,默认就它。 |
| **Discuss** | 偏「旁观」:机器人默认可以不吱声,把模型输出当内心戏,只有用发送类动作时才算对频道真说话。 |
| **Heartbeat** | 心跳触发生成,记自主行为。 |
| **Schedule** | cron 触发。 |
| **Subagent** | 子智能体被委派时。 |
你日常在聊拉里直接看到的,多半是 **Chat****Discuss**;后三种多由系统建,在列表里像只读记录。
### Chat 和 Discuss 差在哪
**Chat**
- 像普通助理来回问
- 用户发一句,通常就期待有一条可见回复
- 网页、私聊默认多落在这类
**Discuss**
- 常出现在群里:机器人**看着**大家聊
- 直接文本多算内部独白
- 真发到频道要显式 `send` 之类动作
- **保持沉默是正常选项**
有 Discuss,机器人才更像「要不要接话我自己决定」的群成员,而不是每句都回的客服。
---
## `/new` 开新会话
同一路由下用 `/new` 可开新会话,不删老历史,只是**当前**换一块上下文。
- `/new`:按当前场景默认类型
- `/new chat`:强制普通 chat
- `/new discuss`:强制 discuss
**网页本地频道** 默认 `chat`**私聊** 多 `chat`**外接群聊** 多 `discuss`
**内置网页本地** 不支持 `/new discuss`,要 discuss 请用 Telegram、Discord、Misskey 等真实渠道。
在渠道里发这些命令会:建新会话、后续消息都进这路、旧会话保留但不再当「当前」。
**网页** 里也可用侧栏 **New Session**、切换、搜索、按类型筛、重命名、删除等。
---
## 管理
### 列表
当前机器人的会话在侧栏;每项可见标题、类型图标、最近活跃时间。日常你关心的 **Chat / Discuss** 会混在同一列表,都是「人能看到的那类线程」。
### 重命名
点标题可改,方便按题目标注。
### 删
删会话会**永久**去掉这一路的历史。
---
## 状态区
状态区和 `/status` 是同一份信息:本会话消息数、**上下文占用**(相对 `context_window`)、**缓存命中**、读写量、**本路用到的技能** 等。这里有 **立即压缩**,触发的是 [会话上下文压缩](/zh/getting-started/compaction.md),不是改记忆条目的那种。
---
## 和其它功能的关系
- **Discuss** 给「群里多看少说」用。
- **Heartbeat** 每触发一次,会有一条对应当次自主行为的会话,可点开看做了啥。
- **Schedule** 到点也会生成会话,可看 cron 命令跑的结果。
- **Subagent** 各自会话,跟委派任务对齐。
- **长期记忆**在机器人整级共享,从哪一路抽出来,别路也能检索到(在你配置允的前提下)。
+118
View File
@@ -0,0 +1,118 @@
# 技能
**技能**是可复用的提示模块,用来改机器人的语气、行为方式、工具使用习惯。在机器人的 **Skills** tab 里管;可手写,也可从 [超市](/zh/getting-started/supermarket.md) 装。
---
## 长什么样
就是带 YAML 头的 `SKILL.md`,至少要有稳定的 `name` 和短 `description`
```yaml
---
name: coder-skill
description: Enables advanced coding workflows and tool usage.
---
# Coder Skill
你写清楚代码、说明取舍,该用文件/命令工具时就用。
```
建议:
- 名字用简单 ASCII,如 `coder-skill``research`,别带空格;Memoh 会拿它当目录名。
- 正文就是真正要注入到运行时的说明。
---
## 从哪来
**托管****发现**
- **托管**:你在 Memoh 里建、改、从超市装的,放在 `/data/skills/<name>/SKILL.md`
- **发现**:容器里旧目录、导入镜像里带来的兼容路径。
Memoh 按顺序扫这些根:
| 类型 | 根路径 |
|------|--------|
| 托管 | `/data/skills/` |
| 旧版发现 | `/data/.skills/` |
| 兼容 | `/data/.agents/skills/` |
| 兼容 | `/root/.agents/skills/` |
每个根下可以直接放 `SKILL.md`,或子目录如 `/data/skills/coder-skill/SKILL.md`
**同名**技能可能多份来源,会进入不同状态(见下)。
---
## 状态
每个来源会标:
| 状态 | 含义 |
|------|------|
| `effective` | 这个名字当前**真在用**的这一份 |
| `shadowed` | 同名有别的来源优先了 |
| `disabled` | 这一份被关掉,不用 |
记死一点:**技能名是身份**。多个 `coder-skill` 只能有一个 `effective`
### 常见情况
- 刚在 Memoh 里建的多半是托管 + `effective`
- 老目录里有一份时,可能先由它 `effective`,直到你装了托管同名。
- 把发现的那份 **Adopt** 成托管后,通常托管变 `effective`,旧来源变 `shadowed`
- 关掉 `effective` 那一份,同名里下一位可能顶上来。
---
## 在界面里
### 添加
**Add Skill** → 在编辑器里写 raw Markdown → 保存,写到托管目录。
### 编辑
**Edit** 改 `SKILL.md`;自己托管的改起来最直接。
### 删除
**Delete** 会去掉这份托管目录;若还有发现来源,可能那份又变成 `effective`
### 禁用 / 启用
**Disable** 关某一条来源不删;**Enable** 再开。适合试回退、暂时不用某套提示。
### Adopt
把**发现**来源复制进托管目录,方便你长期用界面改。已有托管同名时不能 Adopt。
---
## 运行时
只有 **effective** 会进当前机器人提示。
- `shadowed` 能看、不进提示
- `disabled` 当不存在
- 活跃会话的 **状态区** 也会显示这条路上用过哪些技能
---
## 超市和导入
- **超市安装**:下好的技能进托管目录,和手写一样。
- **老环境/导入**:可能只出现在发现路径,需要就 **Adopt**
---
## 建议工作流
1. 先少而精,名字和描述写清楚。
2. 不确定删不删时先 **Disable**
3. 要长期留用的发现项用 **Adopt**
4. 能复用就从 [超市](/zh/getting-started/supermarket.md) 装,少复制粘贴多份。
@@ -0,0 +1,308 @@
# 斜杠命令
Memoh 支持 **斜杠命令**,在进 LLM 之前截获。用来快速看状态、改配置、切模型、开会话、停生成等。外接渠道和内置网页聊天都支持;**解析命令本身一般不吃模型 token**(与真正进对话的内容无关)。
---
## 命令长什么样
多数命令是「资源 / 动作 / 参数」:
```text
/resource [action] [arguments...]
```
例如:
```text
/schedule list
/model current
/schedule create morning-news "0 9 * * *" "Send a daily summary"
```
要点:
- **resource** 是组,如 `schedule``model``status`
- **action** 是具体子命令,如 `list``get``set`
- **arguments** 在 action 后面;带空格的用引号包起来。
- 有的组有**默认动作**,例如 `/settings` 等于 `/settings get``/status` 等于 `/status show`
另有两条**顶层**命令:
- `/new`:给当前会话路由新开一路会话
- `/stop`:停当前这一路正在生成
---
## 内建帮助
| 命令 | 作用 |
|------|------|
| `/help` | 顶层命令列表 |
| `/help <group>` | 某组里有哪些 action |
| `/help <group> <action>` | 某条 action 的用法 |
```text
/help
/help model
/help model set
```
这是查**当前版本**实际支持哪些命令最快的方式。
---
## 解析规则
- 群里可 **@机器人 前缀**,如 `@BotName /help`
- **Telegram** 可带 bot 后缀,如 `/help@MemohBot`
- 引号包一整个参数,例如:
```text
/schedule create morning-news "0 9 * * *" "Send today's top stories"
```
整行**对不上**已知命令时,当普通聊天发出去,不当斜杠命令。
---
## 权限
只读类:能跟机器人聊的人一般就能用。
`set``create``update``delete``enable``disable` 等写操作多要 **owner**
`/help` 里 owner 专属会标 `[owner]`
---
## 速查
### 顶层
| 命令 | 说明 |
|------|------|
| `/help` | 帮助 |
| `/new`(可选 `chat` / `discuss` | 新会话 |
| `/stop` | 停当前生成 |
### 资源组
| 组 | 说明 | 默认动作 |
|----|------|----------|
| `/schedule` | 计划任务 | 无 |
| `/mcp` | 看 MCP 连接 | 无 |
| `/settings` | 机器人设置 | `get` |
| `/model` | 聊天/心跳模型 | 无 |
| `/memory` | 记忆提供方 | 无 |
| `/search` | 搜索提供方 | 无 |
| `/browser` | 浏览器上下文 | 无 |
| `/usage` | token 用量 | `summary` |
| `/email` | 邮服、绑定、发件箱 | 无 |
| `/heartbeat` | 心跳日志 | `logs` |
| `/skill` | 技能列表 | `list` |
| `/fs` | 容器内文件 | 无 |
| `/status` | 会话消息/上下文/缓存 | `show` |
| `/access` | 身份与 ACL | `show` |
| `/compact` | 立刻做**会话**上下文压缩 | `run` |
---
## 会话类
### `/new`
给**当前会话路由**新开会话,老历史还在,只是切到新的当前上下文。
- `/new`:按当前场景默认类型
- `/new chat`:强制 chat
- `/new discuss`:强制 discuss
默认:网页本地多 `chat`;私聊多 `chat`;外接群多 `discuss`
**内置网页本地** 没有 `/new discuss`,要 discuss 请用 Telegram、Discord 等。
细节见 [会话](/zh/getting-started/sessions.md)。
### `/stop`
停**当前这一路**正在生成。适合:流式已经够了、工具转太久、要在下一句前打断。
---
## 状态与排查
### `/status`
当前会话级:消息数、上下文占用、缓存命中、读写 token、本路用过的技能等。
| 动作 | 用法 |
|------|------|
| `show` | `/status``/status show`,当前路由 |
| `latest` | 若当前路由没有活跃会话,要看**该机器人最新**会话时用 |
### `/access`
看当前渠道身份、绑定的用户、角色、写命令是否允许、渠道/会话/thread 范围、ACL 结果。排绑定、ACL、为何拒绝写命令时用。
```text
/access
```
### `/usage`
最近 7 天 token。
| 动作 | 用法 |
|------|------|
| `summary` | `/usage``/usage summary` |
| `by-model` | `/usage by-model` |
### `/heartbeat`
最近心跳执行记录。
| 动作 | 用法 |
|------|------|
| `logs` | `/heartbeat``/heartbeat logs` |
### `/email`
当前机器人邮服、绑定、发件箱。
| 动作 | 用法 |
|------|------|
| `providers` | `/email providers` |
| `bindings` | `/email bindings` |
| `outbox` | `/email outbox` |
---
## 配置类
### `/settings`
| 动作 | 用法 | 权限 |
|------|------|------|
| `get` | `/settings``/settings get` | 全体 |
| `update` | `/settings update [options]` | Owner |
`update` 常见选项:
| 选项 | 说明 |
|------|------|
| `--language` | 如 `en``zh` |
| `--acl_default_effect` | `allow` / `deny` |
| `--reasoning_enabled` | `true` / `false` |
| `--reasoning_effort` | `low` / `medium` / `high` |
| `--heartbeat_enabled` | `true` / `false` |
| `--heartbeat_interval` | 分钟 |
| `--chat_model_id` | 聊天模型 UUID |
| `--heartbeat_model_id` | 心跳模型 UUID |
```text
/settings update --language en --heartbeat_enabled true --heartbeat_interval 30
```
### `/model`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list [provider_name]` | `/model list` | 全体 |
| `current` | `/model current` | 全体 |
| `set` | `/model set <model_id>``/model set <provider_name> <model_name>` | Owner |
| `set-heartbeat` | 同理,心跳模型 | Owner |
```text
/model list
/model list OpenAI
/model current
/model set gpt-4o
/model set OpenAI gpt-4o
```
### `/memory`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list` | `/memory list` | 全体 |
| `current` | `/memory current` | 全体 |
| `set` | `/memory set <name>` | Owner |
### `/search`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list` | `/search list` | 全体 |
| `current` | `/search current` | 全体 |
| `set` | `/search set <name>` | Owner |
### `/browser`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list` | `/browser list` | 全体 |
| `current` | `/browser current` | 全体 |
| `set` | `/browser set <name>` | Owner |
### `/mcp`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list` | `/mcp list` | 全体 |
| `get` | `/mcp get <name>` | 全体 |
| `delete` | `/mcp delete <name>` | Owner |
---
## 自动化与文件
### `/schedule`
| 动作 | 用法 | 权限 |
|------|------|------|
| `list` | `/schedule list` | 全体 |
| `get` | `/schedule get <name>` | 全体 |
| `create` | `/schedule create <name> <pattern> <command>` | Owner |
| `update` | `/schedule update <name> [--pattern P] [--command C]` | Owner |
| `delete` | `/schedule delete <name>` | Owner |
| `enable` | `/schedule enable <name>` | Owner |
| `disable` | `/schedule disable <name>` | Owner |
```text
/schedule list
/schedule create morning-news "0 9 * * *" "Summarize today's top tech news"
/schedule disable morning-news
```
### `/skill`
| 动作 | 用法 |
|------|------|
| `list` | `/skill``/skill list` |
### `/fs`
| 动作 | 用法 |
|------|------|
| `list` | `/fs list [path]` |
| `read` | `/fs read <path>` |
```text
/fs list /
/fs list /home
/fs read /home/bot/IDENTITY.md
```
文件太大时输出会截断。
---
## `/compact`
立刻对**当前会话**做 [会话上下文压缩](/zh/getting-started/compaction.md),**不是**改记忆库里条目的那种记忆压缩。
| 动作 | 用法 |
|------|------|
| `run` | `/compact``/compact run` |
聊得很长、想先摘要再续时有用。
@@ -0,0 +1,35 @@
# 超市
Memoh 内置的 **技能****MCP 模板** 目录。
---
## 装技能
1. 网页里打开 **Supermarket**
2. 切到 **Skills**
3. 选一个,点 **Install**
4. 选目标机器人。
5. 确认。
6. 到该机器人 **Skills** tab 里能看到。
---
## 装 MCP 模板
1. 打开 **Supermarket**
2. 切到 **MCP**
3. 选一项,**Install**。
4. 选机器人。
5. 会跳转到该机器人 **MCP** tab,并带上草稿连接。
6. 补全密钥、OAuth 等。
7. 保存。
8. 需要时点 **Probe** 刷新工具列表。
---
## 贡献
新技能或 MCP 模板可提到:
- [memohai/supermarket](https://github.com/memohai/supermarket)
+22 -30
View File
@@ -1,39 +1,31 @@
# Memoh 中文入口
# Memoh 中文文档
Memoh 是一个多成员、长记忆、容器化的 AI Agent 平台。当前中文站点同时包含:
Memoh(读作 /ˈmemoʊ/)是面向多角色、长记忆、容器化场景的 AI 智能体平台。你可以创建多个机器人,为每个机器人准备独立工作区与长期记忆,并通过 Telegram、Discord、飞书、QQ、Matrix、Misskey、钉钉、企微、微信、公众号、邮件或内置网页端接入。
- 已翻译的中文概念文档
- 指向英文主文档的常用功能入口
## 起步
如果你是第一次接触 Memoh,建议先看英文主文档里的功能指南;如果你正在理解账号语义、绑定关系和访问控制,再看下面的中文概念页
- **[产品概览](/zh/about)**:平台在做什么、和其它方案差别在哪
- **[Docker 安装](/zh/installation/docker)**:推荐的一键/Compose 部署方式。
- **[供应商与模型](/zh/getting-started/provider-and-model)**:配置上游 API、模型类型与能力标记。
- **[机器人](/zh/getting-started/bot)**:创建机器人并配置各标签页。
- **[会话](/zh/getting-started/sessions)**:聊天与 Discuss 模式、状态区、路由。
- **[斜杠命令](/zh/getting-started/slash-commands)**:命令结构、权限与速查表。
## 常用功能入口
## 功能指南
- [产品概览(英文)](/about)
- [Docker 安装(英文)](/installation/docker)
- [Providers And Models(英文)](/getting-started/provider-and-model)
- [Bot 配置(英文)](/getting-started/bot)
- [Sessions / Discuss 模式(英文)](/getting-started/sessions)
- [Channels 渠道接入(英文)](/getting-started/channels)
- [Skills(英文)](/getting-started/skills)
- [Supermarket(英文)](/getting-started/supermarket)
- [Slash Commands(英文)](/getting-started/slash-commands)
- **[渠道总览](/zh/channels/index)**:支持的平台与各平台分篇(Telegram、飞书、企微、微信等)。
- **[访问控制](/zh/getting-started/access)**:ACL 预设、规则顺序与按来源限定。
- **[技能](/zh/getting-started/skills)**:托管/发现、生效/被遮蔽、从超市安装。
- **[超市](/zh/getting-started/supermarket)**:技能与 MCP 模板安装。
- **[MCP](/zh/getting-started/mcp)**Stdio/远程、OAuth、探测与导入导出。
- **[长期记忆](/zh/getting-started/memory)**:记忆提供方与在界面里的操作。
- **[会话上下文压缩](/zh/getting-started/compaction)**:缩小当前会话占用,不动存储里的长期记忆。
## 中文概念文档
其它「入门」子页已翻译:容器、文件、浏览器、心跳、计划任务、搜索、邮件、Supermarket 等,见下栏 **入门(中文)**
- [核心概念](/zh/concepts/index.md)
- [账号模型与绑定](/zh/concepts/identity-and-binding.md)
## 记忆与语音提供方
## 面向文档维护者
- [记忆提供方总览](/zh/memory-providers/index) · [内置](/zh/memory-providers/builtin) · [Mem0](/zh/memory-providers/mem0) · [OpenViking](/zh/memory-providers/openviking)
- [TTS 总览](/zh/tts-providers/index) · [Edge TTS](/zh/tts-providers/edge)
- [术语规范](/zh/style/terminology.md)
## 当前中文维护范围
当前中文内容优先覆盖账号语义与访问控制相关的概念:
- 区分系统账号与平台账号
- 解释为什么账号绑定是账号作用域
- 说明账号绑定与 bot 访问控制之间的关系
说明:“平台账号”指用户在外部平台上的真实账号,例如飞书账号,而不是 Memoh 系统账号。
各页链接以本中文站路径为主;个别尚未翻译的英文页仍可从英文站侧栏进入。
+189
View File
@@ -0,0 +1,189 @@
# Docker 安装
推荐用 Docker 跑 Memoh。编排里通常包含 PostgreSQL、主服务(内嵌 Containerd、智能体也在同一进程)、以及网页前端;主机上不必单独装 containerd、nerdctl、buildkit,都在容器里。
## 服务结构
Compose 里有多组服务。有的默认就起,有的通过 `--profile` 打开:
| 服务 | Profile | 说明 |
|------|---------|------|
| **server** | *(核心)* | 主服务,内嵌 Containerd,智能体同进程 |
| **web** | *(核心)* | 网页端(Vue 3 |
| **postgres** | *(核心)* | PostgreSQL |
| **qdrant** | `qdrant` | 向量库,给记忆检索用(稀疏/稠密) |
| **browser** | `browser` | Playwright 浏览器网关,给机器人上网 |
| **sparse** | `sparse` | 神经稀疏编码,给记忆检索(见下) |
### sparse 服务
**sparse** 容器跑神经稀疏向量,给记忆检索用。里面是一个轻量 Python(Flask)服务,端口 8085,模型是 OpenSearch 项目放出来的 [`opensearch-neural-sparse-encoding-multilingual-v1`](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-multilingual-v1)。
**它做什么:**
- 把文档压成稀疏向量(一批 token 下标 + 权重),基于掩码语言模型。
- 查询端用 IDF 加权词表,检索快。
- 和 Qdrant 一起用,可以在**不另接外部 embedding API** 的情况下做语义级记忆搜索。
**什么时候值得开:**
- 不想为 embedding 花钱,模型在容器里本地跑。
- 多语言模型现成的。
- 比纯关键词(BM25)强一截,又比大稠密向量省资源。
**何时启用:**
打算用内置记忆提供方的 **sparse** 模式时,把 sparse profile 打开。镜像构建时会预下模型,启动不用临时拉权重。
```bash
docker compose --profile qdrant --profile sparse --profile browser up -d
```
模式细节见 [内置记忆提供方](/zh/memory-providers/builtin.md)。
## 先决条件
- [Docker](https://docs.docker.com/get-docker/)
- [Docker Compose v2](https://docs.docker.com/compose/install/)
- Git
## 一键安装(推荐)
官方脚本(本机已装好 Docker 与 Compose):
```bash
curl -fsSL https://memoh.sh | sudo sh
```
脚本会:检查 Docker/Compose;交互问配置(工作区、数据目录、管理员、JWT、Postgres 密码、是否开 sparse、浏览器核等);从 GitHub 取最新发布并克隆;按 Docker 模板生成 `config.toml`;钉死镜像版本;按选的核编浏览器镜像并拉齐服务。
**静默安装**(全默认、无提问):
```bash
curl -fsSL https://memoh.sh | sudo sh -s -- -y
```
静默时默认大概:工作区 `~/memoh`;数据 `~/memoh/data`;管理员 `admin` / `admin123`JWT 随机;Postgres 密码 `memoh123`
**指定版本:**
```bash
curl -fsSL https://memoh.sh | sudo sh -s -- --version v0.6.0
```
或:
```bash
curl -fsSL https://memoh.sh | sudo MEMOH_VERSION=v0.6.0 sh
```
**大陆镜像**(拉镜像慢时):
```bash
curl -fsSL https://memoh.sh | sudo USE_CN_MIRROR=true sh
```
> 环境变量可组合,例如 `MEMOH_VERSION=v0.6.0 USE_CN_MIRROR=true`
## 手动安装
```bash
git clone https://github.com/memohai/Memoh.git
cd Memoh
cp conf/app.docker.toml config.toml
```
至少改 `config.toml` 里:
- `admin.password`
- `auth.jwt_secret`(可 `openssl rand -base64 32`
- `postgres.password`(环境变量 `POSTGRES_PASSWORD` 要一致)
然后(推荐开 Qdrant、浏览器、sparse):
```bash
sudo POSTGRES_PASSWORD=你的库密码 docker compose --profile qdrant --profile browser --profile sparse up -d
```
只跑核心(无向量、无浏览器):
```bash
sudo POSTGRES_PASSWORD=你的库密码 docker compose up -d
```
> macOS 或用户已在 `docker` 组里,一般不必 `sudo`
> **重要**`docker-compose.yml` 默认挂 `./config.toml`,先建好文件再 `up`,否则起不来。
### 大陆镜像源
拉 Docker Hub 困难时,在 `config.toml` 里取消 `registry` 一行的注释:
```toml
[workspace]
registry = "memoh.cn"
```
并叠加国内 overlay
```bash
sudo docker compose -f docker-compose.yml -f docker/docker-compose.cn.yml \
--profile qdrant --profile browser up -d
```
一键脚本在 `USE_CN_MIRROR=true` 时会处理这套。
## 访问地址
起来之后:
| 服务 | 地址 |
|------|------|
| 网页 | http://localhost:8082 |
| API | http://localhost:8080 |
| 浏览器网关 | http://localhost:8083 |
默认登录 `admin` / `admin123`(请在 `config.toml` 改掉)。首次拉镜像、初始化可能要一两分钟。
## 配置总览
`config.toml` 主段落大致如下:
| 段落 | 含义 |
|------|------|
| `[log]` | 等级与格式(`info`/`debug``text`/`json` |
| `[server]` | 监听,默认 `:8080` |
| `[admin]` | 管理员账号 |
| `[auth]` | JWT 与过期时间 |
| `timezone` | 服时区,默认 `UTC` |
| `[containerd]` | socket 与 namespace |
| `[workspace]` | 镜像、快照、数据路径、CNI、可选仓库镜像 |
| `[postgres]` | 连接串 |
| `[qdrant]` | Qdrant 地址、密钥、超时 |
| `[sparse]` | 稀疏服务 URL |
| `[registry]` | 供应商定义目录 |
| `[browser_gateway]` | 浏览器网关 |
| `[web]` | 前端 host/port |
## 常用命令
> Linux 上若用户不在 `docker` 组,命令前加 `sudo`
```bash
docker compose up -d # 起
docker compose down # 停
docker compose logs -f # 看日志
docker compose ps # 状态
docker compose pull && docker compose up -d # 更新镜像再起
```
## 环境变量
| 变量 | 默认 | 说明 |
|------|------|------|
| `POSTGRES_PASSWORD` | `memoh123` | 须与 `config.toml``postgres.password` 一致 |
| `MEMOH_CONFIG` | `./config.toml` | 配置文件路径 |
| `MEMOH_VERSION` | 最新发版 | 要装的 git 标签,也用于钉死镜像 |
| `USE_CN_MIRROR` | `false` | 是否用大陆镜像 |
| `BROWSER_CORES` | `chromium,firefox` | 浏览器镜像里包含的引擎 |
| `BROWSER_TAG` | `latest` | 浏览器镜像 tag |
+102
View File
@@ -0,0 +1,102 @@
# 内置记忆
自带默认记忆后端,接 Memoh 的抽取/检索流程,支持:
- 从对话里抽记忆
- 聊天时语义检索
- 手建、手改
- 记忆压缩、整库重建
三种 **memory mode**,对基础设施和效果要求不同。
---
## 模式
| 模式 | 索引 | 要啥 | 适合 |
|------|------|------|------|
| **Off** | 仅文件 | 无额外服务 | 最轻,不做向量 |
| **Sparse** | 神经稀疏向量 | sparse 服务 + Qdrant`--profile sparse` 等) | 不想交 embedding API 钱、又要比纯词匹配强 |
| **Dense** | 稠密向量 | embedding 模型 + Qdrant`--profile qdrant` | 要稠密语义检索时 |
### Sparse 在干什么
用 OpenSearch 项目放出来的 [`opensearch-neural-sparse-encoding-multilingual-v1`](https://huggingface.co/opensearch-project/opensearch-neural-sparse-encoding-multilingual-v1) 把文字变成**稀疏向量**(一批 token 下标 + 权重)。不另买 embedding API,在 `sparse` 容器里本地跑。多语言,一般比只关键词强不少。
---
## 建一个
1. **Memory Providers**
2. **Add Memory Provider**
3. **Name**、**Provider Type** 选 `builtin`
4. **Create**
---
## 配置
| 字段 | 说明 |
|------|------|
| **Memory Mode** | `off`(默认)/ `sparse` / `dense` |
| **Embedding Model** | 仅 `dense` 要,指向你的 embedding 模型 |
| **Qdrant Collection** | 集合名,默认常是 `memory_sparse` 等(以界面为准) |
**Edit**、**Delete** 如常。
---
## 依赖
### Off
只要文件侧索引,无向量服务。
### Sparse
**sparse 服务** + **Qdrant**
```bash
docker compose --profile qdrant --profile sparse up -d
```
`config.toml` 里至少要有类似:
```toml
[qdrant]
base_url = "http://qdrant:6334"
[sparse]
base_url = "http://sparse:8085"
```
### Dense
**embedding 模型**(在提供方里配)+ **Qdrant**
```bash
docker compose --profile qdrant up -d
```
```toml
[qdrant]
base_url = "http://qdrant:6334"
```
(稠密模式细节、embedding 在 UI 里选哪条,以你当前版本为准。)
---
## 绑到机器人
1. **Bots** → 机器人
2. **General** → **Memory Provider**
3. 保存
若未选,运行层面不会用这条提供方。
---
## 配好之后
**Memory** tab 可手建、从对话抽、搜、改、压、重建等。日常操作见 [长期记忆](/zh/getting-started/memory.md)。
+28
View File
@@ -0,0 +1,28 @@
# 记忆提供方
**Memory Provider** 决定机器人**怎么存、怎么取、怎么管**长期记忆。在机器人 **General** 里绑一个,即成为抽取与检索记忆的后端。
## 有哪些
- [内置](/zh/memory-providers/builtin.md):默认自带,可关、稀疏、稠密三档,全可自建。
- [Mem0](/zh/memory-providers/mem0.md):走 Mem0 云 API,要密钥。
- [OpenViking](/zh/memory-providers/openviking.md):自建或 SaaS,自有 API。
---
## 一般步骤
1. 侧栏 **Memory Providers**
2. 选类型,建一个实例。
3. 配好参数。
4. 机器人 **General****Memory Provider** 选中。
5. 在 **Memory** tab 里管具体条目。
---
## 接下来
- [内置](/zh/memory-providers/builtin.md)
- [Mem0](/zh/memory-providers/mem0.md)
- [OpenViking](/zh/memory-providers/openviking.md)
- 条目级操作:[长期记忆](/zh/getting-started/memory.md)
+36
View File
@@ -0,0 +1,36 @@
# Mem0 记忆
把机器人接到 [Mem0](https://mem0.ai) 云端,由对方管存储、索引、检索,本机不搭那套库。
---
## 建提供方
1. **Memory Providers****Add Memory Provider**
2. **Name**、**Provider Type** 选 `mem0`
3. **Create**
---
## 配置
| 字段 | 必填 | 说明 |
|------|------|------|
| **Base URL** | 否 | 空则默认 `https://api.mem0.ai` |
| **API Key** | 是 | 鉴权,按密钥存 |
| **Organization ID** | 否 | 工作区用 |
| **Project ID** | 否 | 工作区用 |
---
## 绑到机器人
1. **Bots** → 机器人 → **General**
2. **Memory Provider** 选 Mem0
3. 保存
---
## 使用
绑上后,抽取、搜索、管理都走 Mem0 API。日常见 [长期记忆](/zh/getting-started/memory.md)。
@@ -0,0 +1,34 @@
# OpenViking 记忆
可自建或接 SaaS 的独立记忆 API,给需要专用记忆后端的场景多一个选项。
---
## 建提供方
1. **Memory Providers****Add Memory Provider**
2. **Name**、**Provider Type** 选 `openviking`
3. **Create**
---
## 配置
| 字段 | 必填 | 说明 |
|------|------|------|
| **Base URL** | 是 | 如 `http://openviking:8088` |
| **API Key** | 否 | 需要时填,按密钥存 |
---
## 绑到机器人
1. **Bots** → 机器人 → **General**
2. **Memory Provider** 选 OpenViking
3. 保存
---
## 使用
绑上后,记忆相关 API 都走 OpenViking。日常见 [长期记忆](/zh/getting-started/memory.md)。
-40
View File
@@ -1,40 +0,0 @@
# 术语规范
> 适用对象:文档编写者与维护者。
> 本页用于统一写作语义,不是面向最终用户的功能说明。
## 规范术语
- **系统账号(`User`**Memoh 系统内账号。
- **平台账号(`ChannelIdentity`**:用户在外部接入平台上的账号,不是 Memoh 内账号。
- **接入平台(`channel`**:承载入站消息的外部平台。
- **账号绑定(`bind`**:把平台账号关联到系统账号的过程。
- **绑定码(Bind Code**:用于账号绑定的一次性代码。
- **Bot**:由系统账号管理的资源与授权边界。
## 推荐写法
- 面向产品语义时,优先写 **“平台账号”**,不要直接写 actor。
- 描述业务行为时,优先写 **“接入平台”**,不要直接写 channel。
- 首次出现保留技术别名,后续可只用中文术语:
- 平台账号(`ChannelIdentity`
- 系统账号(`User`
- 账号绑定(`bind`
## 禁用或不推荐写法
- 在概念文档中直接使用 **actor**(除非明确引用代码符号)。
- 使用含糊表述如 **“平台用户”**(未区分系统账号与平台账号)。
- 写出“平台账号是 Memoh 内部账号”这类错误语义。
## 示例
- 正确:**“平台账号是用户在飞书上的账号,不是 Memoh 系统账号。”**
- 正确:**“账号绑定用于把平台账号关联到系统账号。”**
- 错误:**“Actor 是 Memoh 里的用户。”**
## 自检清单
- 是否明确区分了系统账号与平台账号?
- 叙述中是否将 channel 表述为接入平台?
- 是否仅在首处保留技术别名?
+40
View File
@@ -0,0 +1,40 @@
# Edge TTS
用 Edge 对外公开的朗读接口做合成:免费、无 API key,语言/声音很多。
---
## 建提供方
1. **TTS Providers****Add**
2. 类型选 `edge`
3. **Create**
通常会自带默认模型 `edge-read-aloud`
---
## 调模型
`edge-read-aloud`
| 字段 | 说明 |
|------|------|
| **Voice** | 语言 + 声线 id,默认如 `en-US-EmmaMultilingualNeural` |
| **Format** | 如 `audio-24khz-48kbitrate-mono-mp3`、webm 等 |
| **Speed** | 如 `0.5``1.0``2.0` |
| **Pitch** | -100 +100,默认 0 |
---
## 绑到机器人
1. 机器人 **General** → **TTS Model**
2. 选配好的 Edge 模型
3. 保存
---
## 试听
模型页上一般有试合成按钮,绑给机器人前可先听效果。
+32
View File
@@ -0,0 +1,32 @@
# 语音(TTS
Memoh 支持把字变成声音。可以分三层想:
- **TTS Provider**:一种服务类型(如 Edge TTS),在 TTS 页建**具名实例**。
- **TTS Model**:某实例下的具体声音/模型,可配音色、格式、变速、音高。
- **机器人绑定**:在机器人 **General** 里选 TTS Model,之后对话里可朗读。
---
## 一般步骤
1. 侧栏 **TTS Providers**
2. **Add**,选类型(如 `edge`)。
3. **Create**(常会自动导入默认模型)。
4. 点进模型,调音色、格式等。
5. 用页面试听。
6. 机器人 **General** 里选这个 TTS Model 并保存。
---
## 当前文档里有的
| 提供方 | 说明 |
|--------|------|
| [Edge TTS](/zh/tts-providers/edge.md) | 走 Edge 公开朗读接口,无 key,多语音 |
---
## 接下来
- 配 [Edge TTS](/zh/tts-providers/edge.md)
+5
View File
@@ -1,6 +1,11 @@
{
"version": 1,
"skills": {
"humanizer-zh": {
"source": "op7418/Humanizer-zh",
"sourceType": "github",
"computedHash": "7bd195e3bcdcc24f078dfd4e3b3e37e8ac321c36f410a41241fc4175eab1825a"
},
"twilight-ai": {
"source": "memohai/twilight-ai",
"sourceType": "github",