openclaw

关注公众号 jb51net

关闭
AI > openclaw >

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

SP八岐大兔

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

nano ~/.openclaw/openclaw.json

1. meta 配置段

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

说明

2. wizard 配置段

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

说明

3. auth 认证配置段

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

说明

4. models 模型服务配置(核心)

"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
        }
    }
}

说明

5. agents 智能体默认配置(最常改)

"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"
    }
}

说明

6. tools 工具集配置

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

说明

7. commands 命令权限配置

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

说明

8. session 会话策略配置

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

说明

9. hooks 日志钩子配置

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

说明

10. channels 飞书通道配置

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

说明

11. gateway 网关服务配置

"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"
        ]
    }
}

说明

12. plugins 插件配置

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

说明

✅ 修改配置后必须执行

openclaw gateway restart

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