1. openclaw.json配置参考(密码认证,允许局域网访问Control UI,允许HTTP协议访问Control UI)
文件路径~/.openclaw/openclaw.json

  "gateway": {
    "port": 18789,
    "mode": "local",
    "controlUi": {
      "allowedOrigins": [  # 配置域名访问白名单
        "http://192.168.0.1:18789",
        "https://claw.example.com"
      ],
      "allowInsecureAuth": true  # 允许HTTP协议访问Control UI
    },
    "bind": "lan",  # 允许局域网访问Control UI
    "auth": {
      "mode": "password",  # 启用密码认证
      "token": "29c4f73a9798b050122508fcdd72309db44fec0859857833",
      "password": "Password" # 设置Control UI密码
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false,
    }
  },

2. Control UI配置模型,并将模型应用到Agent

配置模型

  • 点击Config -> Models,选择Providers,点击Add Entry,将custom-1修改为模型提供商的名称
  • 选择Api类型,输入Api Key,Base Url(接口地址)
  • 往下Models部分点击Add,Id(模型ID),name(模型名称)

2028488961.png

3667906869.png

配置文件参考

  "models": {
    "providers": {
      "火山引擎": {
        "baseUrl": "https://ark.cn-beijing.volces.com/api/v3",
        "apiKey": "25abab55-488b-4fd9-9be3",
        "auth": "api-key",
        "api": "openai-completions",
        "models": [
          {
            "id": "doubao-seed-1-8-251228",
            "name": "doubao-seed-1-8-251228",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      },
      "火山codeplan": {
        "baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3",
        "apiKey": "25abab55-488b-4fd9-9be3",
        "api": "openai-completions",
        "models": [
          {
            "id": "ark-code-latest",
            "name": "ark-code-latest",
            "reasoning": false,
            "input": [
              "text"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },

将模型应用到Agents
点击Config ->Agents,在Primary Model填写“模型提供商/模型ID”

3859417921.png

配置文件参考

  "agents": {
    "defaults": {
      "model": {
        "primary": "火山codeplan/ark-code-latest"
      },
      "imageModel": {
        "primary": ""
      },
      "models": {
        "火山codeplan/ark-code-latest": {},
        "火山引擎/doubao-seed-1-8-251228": {}
      },
      "workspace": "/home/openclaw/.openclaw/workspace",
      "timeFormat": "24",
      "compaction": {
        "mode": "safeguard"
      },
      "thinkingDefault": "high",
      "verboseDefault": "off",
      "typingIntervalSeconds": 6,
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    },
    "list": [
      {
        "id": "main"
      },
      {
        "id": "agent02",
        "name": "agent02",
        "workspace": "/home/openclaw/.openclaw/workspace-agent02",
        "agentDir": "/home/openclaw/.openclaw/agents/agent02/agent"
      }
    ]
  },

3. 在对话中不显示思考过程

在对话框中发送以下指令

/verbose off
/reasoning off

4. 设置思考级别
在对话框中发送以下指令

/t <level>

级别(别名):off | minimal | low | medium | high | xhigh(仅 GPT-5.2 + Codex 模型)

5. 多Agent路由(将多个Agent绑定到不同的Channel)

编辑openclaw.json,在“agents”配置下方增加绑定配置

    "bindings": [
      {
        "agentId": "main",
        "match": {
          "channel": "telegram"
        }
      },
      {
        "agentId": "agent02",
        "match": {
          "channel": "wecom-app"
        }
      }
    ],

完整示例如下

  "agents": {
    "defaults": {
      "model": {
        "primary": "火山引擎/doubao-seed-1-8-251228"
      },
      "imageModel": {
        "primary": ""
      },
      "models": {},
      "workspace": "/home/openclaw/.openclaw/workspace",
      "timeFormat": "24",
      "compaction": {
        "mode": "safeguard"
      },
      "thinkingDefault": "high",
      "verboseDefault": "off",
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    },
    "list": [
      {
        "id": "main"
      },
      {
        "id": "agent02",
        "name": "agent02",
        "workspace": "/home/openclaw/.openclaw/workspace-agent02",
        "agentDir": "/home/openclaw/.openclaw/agents/agent02/agent"
      }
    ]
  },
    "bindings": [
      {
        "agentId": "main",
        "match": {
          "channel": "telegram"
        }
      },
      {
        "agentId": "agent02",
        "match": {
          "channel": "wecom-app"
        }
      }
    ],

6. 对话报错“400 Total tokens of image and text exceed max message tokens.”
使用指令/new新建对话

7. 检查配置文件语法
执行命令
node -e "JSON.parse(require('fs').readFileSync('/home/openclaw/.openclaw/openclaw.json', 'utf8'))"
没有输出信息表示配置语法正确

8. Telegram机器人长时间正在输入后无结果输出,日志报错“typing TTL reached (2m); stopping typing indicator”
禁用输入指示器(两种方法):
使用Control UI修改Agents设置,将Typing Mode设置为“Never”
或者编辑openclaw.json,在agents配置部分增加"typingMode": "never",

9. 设备配对
2026.2.22版本开始第一次访问Control UI需要进行配对,提示:

pairing required
This device needs pairing approval from the gateway host.

按照提示中的命令查看待配对的设备ID,在OpenClaw服务器执行命令允许配对
执行命令openclaw devices list,查看Pending部分待配对设备的Request ID
执行命令openclaw devices approve <requestId>,进行配对

10. 企业微信多个自建应用绑定到不同的Agent(使用第三方扩展插件)
面向中国IM平台的OpenClaw扩展插件集合

多Agent分流示例

  "bindings": [
    {
      "agentId": "agent02",
      "match": {
        "channel": "wecom-app",
        "accountId": "app1"
      }
    },
    {
      "agentId": "agent03",
      "match": {
        "channel": "wecom-app",
        "accountId": "app2"
      }
    }
  ],

将accountId绑定到不同的自建应用示例

  "channels": {
    "wecom-app": {
      "enabled": true,
      "accounts": {
        "app1": {
          "webhookPath": "/wecom-app1",
          "token": "c2rS3",
          "encodingAESKey": "zemBVd8mMag",
          "corpId": "wwe851e",
          "corpSecret": "TK4Vj5rn",
          "agentId": 1000010,
          "inboundMedia": {
            "enabled": true,
            "maxBytes": 20971520,
            "keepDays": 7
          }
        },
        "app2": {
          "webhookPath": "/wecom-app2",
          "token": "MFLFeT",
          "encodingAESKey": "fOZepsW5eRn",
          "corpId": "wwe851",
          "corpSecret": "FZsIiBxLPUM4iNIQ",
          "agentId": 1000011,
          "inboundMedia": {
            "enabled": true,
            "maxBytes": 20971520,
            "keepDays": 7
          }
        }
      }
    }
  },
多账号共用同一webhookPath / token时,系统会优先按入站消息里的AgentID匹配账号agentId
若仍存在多候选,会记录告警并回退第一个匹配账号
为减少歧义,建议每个账号使用独立的 webhookPath / token / encodingAESKey

相关链接

面向中国IM平台的OpenClaw扩展插件集合

标签: none