OpenClaw is an open agent platform that runs on your machine and works through chat apps you already use.
Install
Use Node ≥ 22 before installing.
npm install -g openclaw@latest
Terminal onboarding
Choose Yes
Choose QuickStart
Choose Skip for now
Choose All providers
Pick a default model (you can use Keep current and edit the config next)
Link an account if needed, otherwise Skip for now
Configure skills: choose Yes
Choose npm
Pick the skills you need
Select all No where shown
Skip for now
Choose Hatch in UI
修改配置文件
打开 ~/.openclaw/openclaw.json 文件,增加以下配置:
{
"models": {
"mode": "merge",
"providers": {
"onetoken": {
"baseUrl": "https://onetoken.one/v1",
"apiKey": "API_KEY",
"api": "openai-completions",
"models": [
{
"id": "claude-sonnet-4-5",
"name": "claude-sonnet-4-5",
"reasoning": false,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 1000000,
"maxTokens": 64000
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "onetoken/claude-sonnet-4-5"
},
"workspace": "your_workspace_path",
"compaction": {
"mode": "safeguard"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
}
}