OpenClaw 配置文件 openclaw.json 完整参数说明

Written by

in

文章目录
  • “meta”: { “lastTouchedVersion”: “2026.3.13”, “lastTouchedAt”: “2026-03-16T05:36:26.133Z” }
  • “wizard”: { “lastRunAt”: “2026-03-16T05:10:35.535Z”, “lastRunVersion”: “2026.3.13”, “lastRunCommand”: “configure”, “lastRunMode”: “local” }
  • “auth”: { “profiles”: { “minimax:cn”: { “provider”: “minimax”, “mode”: “api_key” }, “ollama:local”: { “provider”: “ollama”, “mode”: “api_key” } } }
  • “models”: { “mode”: “merge”, “providers”: { “minimax”: { “baseUrl”: “https://api.minimaxi.com/anthropic”, “api”: “anthropic-messages”, “authHeader”: true, “models”: [ { “id”: “MiniMax-M2.5”, “name”: “MiniMax M2.5”, “reasoning”: true, “input”: [ “text” ], “cost”: { “input”: 0.3, “output”: 1.2, “cacheRead”: 0.03, “cacheWrite”: 0.12 }, “contextWindow”: 200000, “maxTokens”: 8192 } ] }, “ollama”: { “baseUrl”: “http://127.0.0.1:11434”, “api”: “ollama”, “apiKey”: “ollama-local”, “authHeader”: true } } }
  • “agents”: { “defaults”: { “model”: { “primary”: “ollama/qwen2.5:7b”, “fallbacks”: [“minimax/MiniMax-M2.5”] }, “models”: { “minimax/MiniMax-M2.5”: { “alias”: “Minimax” }, “ollama/qwen2.5:7b”: { “alias”: “Ollama-Qwen” } }, “workspace”: “/home/ubuntu24/.openclaw/workspace” } }
  • “tools”: { “profile”: “coding” }
  • “commands”: { “native”: “auto”, “nativeSkills”: “auto”, “restart”: true }
  • “session”: { “dmScope”: “per-channel-peer” }
  • “hooks”: { “internal”: { “enabled”: true, “entries”: { “command-logger”: { “enabled”: true } } } }
  • “channels”: { “feishu”: { “enabled”: true, “connectionMode”: “websocket”, “verificationToken”: “xxxxxxxxxxx”, “dmPolicy”: “pairing”, “accounts”: { “main”: { “appId”: “xxxxxxxxxxxxx”, “appSecret”: “xxxxxxxxxxxx”, “botName”: “xxxxxxx” } } } }
  • “gateway”: { “port”: 18789, “mode”: “local”, “bind”: “loopback”, “auth”: { “mode”: “token”, “token”: “xxxx” }, “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 } } }
  • openclaw gateway restart 到此这篇关于OpenClaw 配置文件 openclaw.json 完整参数说明的文章就介绍到这了,更多相关OpenClaw 配置文件 openclaw.json 内容请搜索风君子博客以前的文章或继续浏览下面的相关文章,希望大家以后多多支持风君子博客!
  • 目录
    • 1. meta 配置段
      • 说明
    • 2. wizard 配置段
      • 说明
    • 3. auth 认证配置段
      • 说明
    • 4. models 模型服务配置(核心)
      • 说明
    • 5. agents 智能体默认配置(最常改)
      • 说明
    • 6. tools 工具集配置
      • 说明
    • 7. commands 命令权限配置
      • 说明
    • 8. session 会话策略配置
      • 说明
    • 9. hooks 日志钩子配置
      • 说明
    • 10. channels 飞书通道配置
      • 说明
    • 11. gateway 网关服务配置
      • 说明
    • 12. plugins 插件配置
      • 说明
    • ✅ 修改配置后必须执行

      注:修改配置后必须执行:openclaw gateway restart
      编辑配置文件命令:

      nano ~/.openclaw/openclaw.json

      "meta": {
          "lastTouchedVersion": "2026.3.13",
          "lastTouchedAt": "2026-03-16T05:36:26.133Z"
      }

      • lastTouchedVersion:OpenClaw 版本号
      • lastTouchedAt:配置最后修改时间
      • 系统自动生成,禁止手动修改

      "wizard": {
          "lastRunAt": "2026-03-16T05:10:35.535Z",
          "lastRunVersion": "2026.3.13",
          "lastRunCommand": "configure",
          "lastRunMode": "local"
      }
      

      • 记录配置向导最后运行信息
      • 无需修改,系统自动维护

      "auth": {
          "profiles": {
              "minimax:cn": {
                  "provider": "minimax",
                  "mode": "api_key"
              },
              "ollama:local": {
                  "provider": "ollama",
                  "mode": "api_key"
              }
          }
      }
      

      • 定义模型服务商的认证方式
      • minimax:云端千问模型,API Key 认证
      • ollama:本地模型,模拟认证
      • mode 可选值:api_key / none

      "models": {
          "mode": "merge",
          "providers": {
              "minimax": {
                  "baseUrl": "https://api.minimaxi.com/anthropic",
                  "api": "anthropic-messages",
                  "authHeader": true,
                  "models": [
                      {
                          "id": "MiniMax-M2.5",
                          "name": "MiniMax M2.5",
                          "reasoning": true,
                          "input": [
                              "text"
                          ],
                          "cost": {
                              "input": 0.3,
                              "output": 1.2,
                              "cacheRead": 0.03,
                              "cacheWrite": 0.12
                          },
                          "contextWindow": 200000,
                          "maxTokens": 8192
                      }
                  ]
              },
              "ollama": {
                  "baseUrl": "http://127.0.0.1:11434",
                  "api": "ollama",
                  "apiKey": "ollama-local",
                  "authHeader": true
              }
          }
      }

      • mode:模型加载策略
        • merge:合并所有服务商模型(默认)
        • override:仅使用配置内模型
      • ollama.baseUrl:Ollama 本地地址(固定 127.0.0.1:11434)
      • ollama.apiKey:本地任意填写,无需真实密钥

      "agents": {
          "defaults": {
              "model": {
                  "primary": "ollama/qwen2.5:7b",
                  "fallbacks": ["minimax/MiniMax-M2.5"]
              },
              "models": {
                  "minimax/MiniMax-M2.5": {
                      "alias": "Minimax"
                  },
                  "ollama/qwen2.5:7b": {
                      "alias": "Ollama-Qwen"
                  }
              },
              "workspace": "/home/ubuntu24/.openclaw/workspace"
          }
      }
      

      • primary:默认使用模型
        • ollama/qwen2.5:7b = 本地Ollama模型
        • minimax/MiniMax-M2.5 = 云端模型
      • fallbacks:主模型不可用时自动切换
      • alias:模型显示别名,可自定义
      • workspace:文件操作工作目录,可修改

      "tools": {
          "profile": "coding"
      }
      

      • 工具集类型
      • 可选值:coding / basic / full

      "commands": {
          "native": "auto",
          "nativeSkills": "auto",
          "restart": true
      }
      

      • native:系统命令执行权限
        • auto:智能判断(默认)
        • allow:允许
        • deny:禁止
      • restart:崩溃自动重启(true/false)

      "session": {
          "dmScope": "per-channel-peer"
      }
      

      • 会话上下文隔离策略
      • 可选值:
        • per-channel-peer:按对话场景独立(推荐)
        • global:全局共享会话

      "hooks": {
          "internal": {
              "enabled": true,
              "entries": {
                  "command-logger": {
                      "enabled": true
                  }
              }
          }
      }
      

      • 系统内部日志钩子
      • command-logger:命令日志记录
      • 默认开启即可,无需修改

      "channels": {
          "feishu": {
              "enabled": true,
              "connectionMode": "websocket",
              "verificationToken": "xxxxxxxxxxx",
              "dmPolicy": "pairing",
              "accounts": {
                  "main": {
                      "appId": "xxxxxxxxxxxxx",
                      "appSecret": "xxxxxxxxxxxx",
                      "botName": "xxxxxxx"
                  }
              }
          }
      }
      

      • enabled:是否启用飞书机器人(true/false)
      • botName:机器人显示名称,可修改
      • appId / appSecret 禁止修改

      "gateway": {
          "port": 18789,
          "mode": "local",
          "bind": "loopback",
          "auth": {
              "mode": "token",
              "token": "xxxx"
          },
          "tailscale": {
              "mode": "off",
              "resetOnExit": false
          },
          "nodes": {
              "denyCommands": [
                  "camera.snap",
                  "camera.clip",
                  "screen.record",
                  "contacts.add",
                  "calendar.add",
                  "reminders.add",
                  "sms.send"
              ]
          }
      }
      

      • port:网关端口,可自定义
      • mode:访问范围
        • local:仅本机访问
        • network:局域网可访问
      • auth.mode:认证方式
        • token:令牌认证(安全)
        • none:无认证

      "plugins": {
          "entries": {
              "feishu": {
                  "enabled": true
              }
          }
      }
      

      • 插件开关
      • feishu.enabled:飞书插件启用/禁用

      openclaw gateway restart
      

      到此这篇关于OpenClaw 配置文件 openclaw.json 完整参数说明的文章就介绍到这了,更多相关OpenClaw 配置文件 openclaw.json 内容请搜索风君子博客以前的文章或继续浏览下面的相关文章,希望大家以后多多支持风君子博客!

      站内搜索