OpenClaw介绍

OpenClaw 是一个开源、本地部署的 AI Agent 网关。它的核心思路不是“只回答问题”,而是让 AI 具备执行动作的能力,例如访问网页、运行命令、调度任务、连接聊天渠道和管理会话。根据资料,它原先还经历过名称变动:先后出现过 Clawdbot、Moltbot,最终在 2026 年 1 月底确定为 OpenClaw。

安装OpenClaw 环境依赖

安装NVM

1
scoop install nvm

安装nodejs24

1
2
3
nvm install 24

nvm use 24

安装git

1
scoop install git

设置git

默认似乎用的是ssh://协议,如果本地没有配置ssh-key就会报错。可以通过配置将其替换为https://

1
2
git config --global url."https://github.com/".insteadOf ssh://git@github.com/
git config --global url."https://".insteadOf git://

安装OpenClaw

确认node版本是22以上,推荐nodejs 24

1
2
3
node -v

v24.14.0

执行如下命令安装openclaw

1
npm install -g openclaw@latest

配置OpenClaw

PowerShell中,执行如下命令进行初始化配置

1
openclaw onboard --install-daemon

免责申明

这里只是做一下免责申明,通过方向键选择yes即可。

openclaw01

引导模式(Onboarding mode)

这里选择QuickStart即可。

openclaw02

模型验证(Model/auth Provider)

openclaw03

这里通过方向键,将其选中Custom Provider,此时会让你输入API Base URL。自己选一个模型按要求填写即可。

Select channel

直接跳过,选择Skip for now,安装完成后直接安装QQ bot即可,简单快捷。

技能

不建议安装,全部跳过,如果是mac用户可以根据自己实际情况激活,注意,技能越多,越浪费token。

openclaw04

此时便安装完成,可以打开dashboard查看页面。

配置OpenClaw模型

最近OpenClaw更新频繁,内容时效性很低,这个配置仅作为OpenClaw 2026.3.2版本是有效果的。

OpenClaw的配置文件在C:\Users\xxx.openclaw\openclaw.json,每次通过命令行修改配置它会自动备份为openclaw.json.bak.{1…n}。

如果不习惯使用配置文件配置,也可以在Dashboard的页面中修改。在openclaw dashboard启动的状态下,打开web ui,在左侧菜单中选择配置 -> All Settings > RAW。将配置好的内容填写进去即可。(注意:如果配置有自定义Key,然后在Web UI里修改时,会出现无法识别Key,导致配置丢失的问题)

建议,要么一直使用配置文件,要么使用web ui,二者不要混着修改。

下面是我的配置,可以进行参考。

  • "ali",就是交互配置中的Endpoint
  • “baseUrl”, API base URL
  • apiKey,APT Key
  • 还有一步选项的选择OpenAI-compatible,也就是下面配置文件中的"api"的值。所有模型都兼容Openai,所以都选这个
  • "id": Model ID,这里务必要与大模型产商定义的模型名称一模一样,否则会报404。
  • "name":随便写,比如那些事付费的,那些是免费的可以自己加个备注:qwen3.5-plus(FREE)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
"models": {
"mode": "merge",
"providers": {
"ali": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "sk-xxxxxxxxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "qwen3.5-plus",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0.04,
"output": 0.12,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 16000,
"maxTokens": 4096
}
]
},
"deepseek": {
"baseUrl": "https://api.deepseek.com",
"apiKey": "sk-4xxxxxxxxxxxxxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "deepseek-chat",
"name": "deepseek-chat",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0.002,
"output": 0.008,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 16000,
"maxTokens": 4096
},
{
"id": "deepseek-reasoner",
"name": "DeepSeek-R1",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0.002,
"output": 0.008
},
"contextWindow": 64000,
"maxTokens": 16384
}
]
},
"zhipu": {
"baseUrl": "https://open.bigmodel.cn/api/paas/v4",
"apiKey": "xxxxxxx.xxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "glm-4.6v",
"name": "glm-4.6v",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 16000,
"maxTokens": 4096
}
]
},
"kimi": {
"baseUrl": "https://api.moonshot.cn/v1",
"apiKey": "sk-xxxxxxxxx",
"api": "openai-completions",
"models": [
{
"id": "kimi-k2.5",
"name": "kimi-k2.5",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 4,
"output": 21,
"cacheRead": 0.7,
"cacheWrite": 4
},
"contextWindow": 16000,
"maxTokens": 4096
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "kimi/kimi-k2.5",
"fallbacks": [
"zhipu/glm-4.6v",
"deepseek/deepseek-reasoner"
]
},
"models": {
"ali/qwen3.5-plus": {
"alias": "qwen-plus"
},
"deepseek/deepseek-chat": {
"alias": "dsc"
},
"zhipu/glm-4.6v": {
"alias": "glm-4.6v"
},
"kimi/kimi-k2.5": {
"alias": "kimi-2.5"
}
},
"workspace": "D:\\openclaw\\workspace",
"compaction": {
"mode": "safeguard"
}
}
},

接入QQ

打开QQ开放平台,官方页面会有个OpenClaw快捷开通的链接,点击,创建机器人即可。

openclaw05

然后按照图中的步骤进行就行了。