OpenClaw配置大全:YAML配置文件参数详解

# OpenClaw配置参数大全:YAML配置文件详解

**适用场景**:快速查找OpenClaw配置项,自定义AI模型、插件、权限等。

## 一、基础配置(config.yaml)

“`yaml
# 服务配置
server:
port: 3000
host: 0.0.0.0
ssl: false

# AI模型配置
ai:
provider: openai
api_key: sk-your-key
model: gpt-4
temperature: 0.7
max_tokens: 2000

# 本地模型配置(可选)
local_model:
enabled: false
path: ~/.openclaw/models
model_name: llama3
“`

## 二、Agent能力配置

“`yaml
# 文件操作权限
permissions:
file_read: true
file_write: true
file_delete: false
allowed_paths:
– ~/Documents
– ~/Downloads
blocked_paths:
– ~/.ssh
– /etc

# 网络请求权限
network:
enabled: true
allowed_hosts:
– api.openai.com
– github.com
timeout: 30

# 命令执行权限
shell:
enabled: true
allowed_commands:
– ls
– cat
– grep
– python
blocked_commands:
– rm -rf
– sudo
“`

## 三、插件配置

“`yaml
plugins:
– name: file_manager
enabled: true
– name: web_search
enabled: true
config:
engine: duckduckgo
– name: code_executor
enabled: true
config:
language: python
timeout: 60
“`

## 四、日志与调试

“`yaml
logging:
level: info
file: ~/.openclaw/logs/app.log
max_size: 100MB
max_files: 5

debug:
enabled: false
verbose: false
“`

## 五、安全配置

“`yaml
security:
encryption: true
secret_key: your-secret-key
allowed_origins:
– http://localhost:3000
rate_limit: 100
“`

**配置验证命令**:
“`bash
openclaw config –validate
“`

**相关阅读**:
– [OpenClaw安全配置指南:保护你的本地AI助手]
– [OpenClaw插件开发入门]

*更新日期:2025年2月*

© 版权声明
THE END
喜欢就支持一下吧
点赞15 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容

七天热门