一句话结论:在主会话里直接给出明确目标,wiki-recorder 会自动提取事实、整理结构、脱敏并写入 Wiki.js。
"请把刚才部署 Wiki.js 的过程整理成一篇操作流水页并写入 Wiki.js。"
"请把刚才关于 OpenResty 反向代理的操作,整理成一篇知识沉淀页并写入 Wiki.js。"
"请把刚才这次排障过程同时整理成操作流水页和知识沉淀页,自动脱敏并直接落库。"
"请重点保留命令、配置路径、验证结果和遗留风险,其他内容压缩。"
误区:使用泛用 subagent 工具,以为会自动路由到 wiki-recorder。
真相:
subagent 调用 → 实际运行在默认模型链路(曾表现为 openai-plus/gpt-5.4)wiki-recorder 调用 → 明确指定 agentId: wiki-recorder,走专用文档落库链路正确方式:
# ❌ 错误:未指定 agentId,实际走默认链路
工具调用: subagent
参数: { task: "记录到 Wiki.js" }
# ✅ 正确:明确指定使用 wiki-recorder agent
工具调用: subagent
参数: {
agentId: wiki-recorder,
task: "记录到 Wiki.js"
}
排查信号:
model=openai-plus/gpt-5.4 而不是 model=opencode-go/kimi-k2.5 → 未走 wiki-recorder 链路历史配置(已废弃):
{
"tokenFile": "/root/.secrets/wikijs/token"
}
当前配置(推荐):
{
"tokenFile": "/root/.secrets/runtime/wikijs_api_token"
}
陷阱:文件存在但内容被替换为占位文本(如清理旧明文时),导致认证失败。
验证方法:
# 检查 token 是否为真实值(非占位符)
head -c 50 /root/.secrets/runtime/wikijs_api_token
当前采用收口模式:
┌─────────────┐ ┌──────────────┐ ┌──────────────────────┐
│ Infisical │────▶│ 同步脚本渲染 │────▶│ runtime token 文件 │
│ (业务 Secret)│ │ │ │ /root/.secrets/runtime/│
└─────────────┘ └──────────────┘ └──────────────────────┘
│
▼
┌────────────────┐
│ wiki-recorder │
│ (读取并调用 API)│
└────────────────┘
要点:
请把刚才关于【主题】的内容整理成 Wiki.js 页面。
要求:
1. 生成【操作流水页 / 知识沉淀页 / 两者都要】
2. 自动脱敏
3. 保留关键命令、路径、域名和验证结果
4. 使用简体中文
5. 如果页面已存在则更新
6. 完成后告诉我页面标题、路径和写入结果
适合记录"今天做了什么"。
典型结构:
适合记录"以后怎么做"。
典型结构:
| 项目 | 路径/地址 |
|---|---|
| Wiki.js 地址 | https://wiki.thankseveryone.top |
| API token 文件 | /root/.secrets/runtime/wikijs_api_token |
| 配置文件 | /root/.openclaw/workspace-wiki-recorder/config/wiki-js.json |
| 写入脚本 | /root/.openclaw/workspace-wiki-recorder/scripts/wiki-upsert.mjs |
PageIllegalPathAPI is disabledzh localeagentId: wiki-recorder,参见 subAgent 模型路由排查指南检查清单(按优先级):
agentId: wiki-recorder快速诊断命令:
# 检查配置
cat /root/.openclaw/workspace-wiki-recorder/config/wiki-js.json
# 检查 token 文件是否存在且有效
ls -la /root/.secrets/runtime/wikijs_api_token
head -c 50 /root/.secrets/runtime/wikijs_api_token
# 检查 Infisical 同步状态
ls -la /root/.secrets/runtime/
agentId: wiki-recorderallowAgents: [wiki-recorder]title、path、locale、更新时间符合预期agent=wiki-recorder | model=opencode-go/kimi-k2.5)绝不会写入的内容:
| 页面 | 说明 |
|---|---|
| knowledge/wikijs/index | 文档总索引 |
| knowledge/wikijs/deploy-and-connect-wiki-recorder-handbook | Wiki.js 部署与接入手册 |
| knowledge/wikijs/admin-init-api-locale-guide | 管理初始化详细指南 |
| knowledge/openclaw/subagent-model-routing-troubleshoot | 模型路由问题排查 |
| ops/2026/04/2026-04-10-wikijs-full-deployment-chain | 全链路部署记录 |
| 知识库/OpenResty/Telegram-Bot-API-反向代理 | OpenResty 配置示例 |
wiki-recorder wikijs 使用说明 文档沉淀 知识库 subagent faq