openclaw安装笔记

1. 官网脚本安装及验证:

curl -fsSL https://openclaw.ai/install.sh | bash

# Gateway start blocked: set gateway.mode=local (current: unset) or pass --allow-unconfigured.
openclaw config set gateway.mode local

# 运行新手引导:
openclaw onboard --install-daemon
# 快速检查:
openclaw doctor
# 检查 Gateway 网关健康状态:
openclaw status
openclaw health
# 打开仪表板:
openclaw dashboard
# ssh 隧道
ssh -N -L 18789:127.0.0.1:18789 user@host
# 查看token
cat /root/.openclaw/openclaw.json | grep -A2 token
http://localhost:18789/#token={TOKEN}

openclaw --version
openclaw -h

其它方式看这里:https://docs.openclaw.ai/zh-CN/install

2. 引导

openclaw onboard

✦ I understand this is powerful and inherently risky. Continue?
Yes
✦ QuickStart
# 为了安全,这里好像只能 127.0.0.1 否则无法连接,用nginx 代理出去也不行
✦ Model/auth provider 
# 选供应商
✦ Filter models by provider
# 选模型
✦ Default model
# 默认模型
✦ Select channel
# 选聊天工具
✦ Configure sills now?
✦ Hooks

3. 管理/配置

openclaw config 
openclaw gateway start / restart / stop / status

openclaw doctor
openclaw doctor --fix

openclaw update
openclaw update --channel beta
openclaw update --channel dev
openclaw update --channel stable

4. Tools:

# tools.profile 是 OpenClaw 用来控制工具执行范围的配置项。
# 将其设置为 full,表示允许 Agent 根据实际需要调用已安装的 Skills 和工具。

openclaw config get tools.profile
openclaw config set tools.profile full  / coding / messaging ...

# 浏览器托管
openclaw browser --browser-profile openclaw status
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://example.com
openclaw browser --browser-profile openclaw snapshot
# 更多:https://docs.openclaw.ai/zh-CN/tools/browser
插件管理
openclaw plugins list
openclaw plugins install @openclaw/voice-call

clawhub

npm i -g clawhub
# 或者直接采用 npx clawhub@latest 

# 搜索技能
npx clawhub@latest search <关键词>
# 安装技能
npx clawhub@latest install <技能名>
# 查看技能信息
openclaw skills info <技能名>
# 列出已安装技能
openclaw skills list

npx clawhub@latest login --token {FROM https://clawhub.ai/settings}
# 部分 skill 依赖 brew
curl -fsSL  https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh | bash

让Agent记住自己的错误、学到的东西、用户的纠正,并在后续会话中自动参考。具体实现方式是:
• 自动监控:监听命令执行结果、用户反馈
• 结构化记录:将学习内容写入.learnings/目录的日志文件
• 智能检索:遇到类似问题时,自动查询历史记录
每条学习记录包含:ID、时间戳、优先级、摘要、复现步骤、建议修复。

npx clawhub@latest install self-improving-agent
mkdir -p ~/.openclaw/workspace/.learnings
cat > ~/.openclaw/workspace/.learnings/LEARNINGS.md << 'EOF'
# 学习记录
EOF

cat > ~/.openclaw/workspace/.learnings/ERRORS.md << 'EOF'
# 错误记录
EOF

cat > ~/.openclaw/workspace/.learnings/FEATURE_REQUESTS.md << 'EOF'
# 功能请求
EOF

# 让Self-Improving Agent在特定事件发生时自动激活:
cp -r ~/.openclaw/skills/self-improving-agent/hooks/openclaw ~/.openclaw/hooks/self-improvement
openclaw hooks enable self-improvement

Ontology通过类型化的知识图谱,为Agent提供结构化的长期记忆。它的核心机制是:
• 实体抽取:从对话中识别关键实体(人、事、物)
• 关系构建:建立实体之间的关联
• 类型标注:为实体打上类型标签

npx clawhub@latest install ontology
# 手动查看和管理知识图谱:
openclaw ontology query

5. QQbot

QQ开放平台: https://q.qq.com/qqbot/openclaw/login.html
记录AppID和AppSecret,后面无法查询

openclaw plugins install @sliverp/qqbot@latest
openclaw plugins install @tencent-connect/openclaw-qqbot@latest
npm install -g @tencent-connect/openclaw-qqbot@latest

# account 用来区分多个 qqbot,可以分给不同的agent
openclaw channels add --channel qqbot --account qqbot1  --token "AppId:AppSecret"

vi openclaw.json
...
 "plugins": {
    "allow": [
      "qqbot", 
      ...
    ],
    "entries": {
     ...
      "qqbot": {
        "enabled": true
      }
    }
  }

# 验证配置有效性
openclaw config validate


# 停止并移除频道
$ openclaw channels remove
√ qqbot

# 卸载插件
$ openclaw plugins uninstall @sliverp/qqbot
# more: https://cloud.tencent.com/developer/article/2635190
...

6. Tools ++

openclaw hooks list
openclaw hooks enable session-memory

6. cron & heartbeat

openclaw cron add \
  --name "Reminder" \
  --at "2026-02-01T16:00:00Z" \
  --session main \
  --system-event "Reminder: check the cron docs draft" \
  --wake now \
  --delete-after-run

openclaw cron list
openclaw cron run <job-id> --force
openclaw cron runs --id <job-id>

7. 如何编写Skill

8. 多agents

# 多agent 
```md
# 进入新增引导
openclaw agents add 
* 增加前最好先 add channel,这里绑定就好
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容