概述
OpenClaw = LLM 驱动的自主智能体 + 本地执行引擎
核心:为大语言模型(LLM)提供自主规划、记忆、工具调用的智能体能力,并赋予其直接操控本地系统、执行真实任务的手脚。
使用顺序
附录一、每个阶段的配置展示
oepnclaw.json 各阶段配置:
json
{
"meta": {
"lastTouchedVersion": "2026.3.24",
"lastTouchedAt": "2026-03-26T04:07:19.504Z"
},
"wizard": {
"lastRunAt": "2026-03-26T04:06:49.932Z",
"lastRunVersion": "2026.3.24",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"ollama:default": {
"provider": "ollama",
"mode": "api_key"
}
}
},
"models": {
"mode": "merge",
"providers": {
"ollama": {
"baseUrl": "http://127.0.0.1:11434",
"apiKey": "OLLAMA_API_KEY",
"api": "ollama",
"models": [
{
"id": "glm-4.7-flash",
"name": "glm-4.7-flash",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 128000,
"maxTokens": 8192
},
{
"id": "qwen3.5:0.8b",
"name": "qwen3.5:0.8b",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 8192
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "ollama/qwen3.5:0.8b"
},
"models": {
"ollama/qwen3.5:0.8b": {}
},
"workspace": "/home/agent/.openclaw/workspace"
}
},
"tools": {
"profile": "coding"
},
"commands": {
"native": "auto",
"nativeSkills": "auto",
"restart": true,
"ownerDisplay": "raw"
},
"session": {
"dmScope": "per-channel-peer"
},
"channels": {
"feishu": {
"enabled": true,
"appId": "<飞书应用ID>",
"appSecret": "<飞书应用Token>",
"connectionMode": "websocket",
"domain": "feishu",
"groupPolicy": "allowlist"
}
},
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "<登录Token>"
},
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"nodes": {
"denyCommands": ["camera.snap", "camera.clip", "screen.record", "contacts.add", "calendar.add", "reminders.add", "sms.send"]
}
},
"plugins": {
"entries": {
"feishu": {
"enabled": true
}
}
}
}json
{
"meta": {
"lastTouchedVersion": "2026.3.24",
"lastTouchedAt": "2026-03-26T04:22:12.079Z"
},
"wizard": {
"lastRunAt": "2026-03-26T04:06:49.932Z",
"lastRunVersion": "2026.3.24",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"ollama:default": {
"provider": "ollama",
"mode": "api_key"
}
}
},
"models": {
"mode": "replace",
"providers": {
"ollama": {
"baseUrl": "http://127.0.0.1:11434",
"apiKey": "OLLAMA_API_KEY",
"api": "ollama",
"models": [
{
"id": "qwen3.5:0.8b",
"name": "qwen3.5:0.8b",
"reasoning": false,
"input": ["text"],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 262144,
"maxTokens": 8192
}
]
},
"bailian": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "<百炼大模型Token>",
"api": "openai-completions",
"models": [
{
"id": "qwen-flash",
"name": "qwen-flash",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-flash-2025-07-28",
"name": "qwen-flash-2025-07-28",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus",
"name": "qwen-plus",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus-2025-07-28",
"name": "qwen-plus-2025-07-28",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus-0112",
"name": "qwen-plus-0112",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192
},
{
"id": "qwen-plus-2025-12-01",
"name": "qwen-plus-2025-12-01",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus-1220",
"name": "qwen-plus-1220",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192
},
{
"id": "qwen-plus-latest",
"name": "qwen-plus-latest",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus-2025-09-11",
"name": "qwen-plus-2025-09-11",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 32768
},
{
"id": "qwen-plus-2025-01-25",
"name": "qwen-plus-2025-01-25",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192
},
{
"id": "qwen-plus-2025-04-28",
"name": "qwen-plus-2025-04-28",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 32768
},
{
"id": "qwen-plus-2025-07-14",
"name": "qwen-plus-2025-07-14",
"reasoning": false,
"input": ["text"],
"contextWindow": 1048576,
"maxTokens": 16384
},
{
"id": "qwen-plus-character",
"name": "qwen-plus-character",
"reasoning": false,
"input": ["text"],
"contextWindow": 32768,
"maxTokens": 4096
},
{
"id": "qwen-max-0919",
"name": "qwen-max-0919",
"reasoning": false,
"input": ["text"],
"contextWindow": 32768,
"maxTokens": 8192
},
{
"id": "qwen-max-2025-01-25",
"name": "qwen-max-2025-01-25",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192
},
{
"id": "qwen-max-latest",
"name": "qwen-max-latest",
"reasoning": false,
"input": ["text"],
"contextWindow": 131072,
"maxTokens": 8192
},
{
"id": "qwen-max",
"name": "qwen-max",
"reasoning": false,
"input": ["text"],
"contextWindow": 32768,
"maxTokens": 8192
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen-flash",
"fallbacks": ["bailian/qwen-flash", "bailian/qwen-flash-2025-07-28", "bailian/qwen-plus", "bailian/qwen-plus-2025-07-28", "bailian/qwen-plus-0112", "bailian/qwen-plus-2025-12-01", "bailian/qwen-plus-1220", "bailian/qwen-plus-latest", "bailian/qwen-plus-2025-09-11", "bailian/qwen-plus-2025-01-25", "bailian/qwen-plus-2025-04-28", "bailian/qwen-plus-2025-07-14", "bailian/qwen-plus-character", "bailian/qwen-max-0919", "bailian/qwen-max-2025-01-25", "bailian/qwen-max-latest", "bailian/qwen-max", "ollama/qwen3.5:0.8b"]
},
"models": {
"ollama/qwen3.5:0.8b": {},
"bailian/qwen-flash": {},
"bailian/qwen-flash-2025-07-28": {},
"bailian/qwen-plus": {},
"bailian/qwen-plus-2025-07-28": {},
"bailian/qwen-plus-0112": {},
"bailian/qwen-plus-2025-12-01": {},
"bailian/qwen-plus-1220": {},
"bailian/qwen-plus-latest": {},
"bailian/qwen-plus-2025-09-11": {},
"bailian/qwen-plus-2025-01-25": {},
"bailian/qwen-plus-2025-04-28": {},
"bailian/qwen-plus-2025-07-14": {},
"bailian/qwen-plus-character": {},
"bailian/qwen-max-0919": {},
"bailian/qwen-max-2025-01-25": {},
"bailian/qwen-max-latest": {},
"bailian/qwen-max": {}
},
"workspace": "/home/agent/.openclaw/workspace"
}
},
"tools": {
"profile": "coding"
},
"commands": {
"native": "auto",
"nativeSkills": "auto",
"restart": true,
"ownerDisplay": "raw"
},
"session": {
"dmScope": "per-channel-peer"
},
"channels": {
"feishu": {
"enabled": true,
"appId": "<飞书应用ID>",
"appSecret": "<飞书应用Token>",
"connectionMode": "websocket",
"domain": "feishu",
"groupPolicy": "allowlist"
}
},
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": "<登录Token>"
},
"tailscale": {
"mode": "off",
"resetOnExit": false
},
"nodes": {
"denyCommands": ["camera.snap", "camera.clip", "screen.record", "contacts.add", "calendar.add", "reminders.add", "sms.send"]
}
},
"plugins": {
"entries": {
"feishu": {
"enabled": true
}
}
}
}