Skip to main content
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

openclaw onboard
Choose Yes Oc 1 Choose QuickStart Oc 2 Choose Skip for now Oc 3 Choose All providers Oc 4 Pick a default model (you can use Keep current and edit the config next) Oc 5 Link an account if needed, otherwise Skip for now Oc 6 Configure skills: choose Yes Oc 7 Choose npm Oc 8 Pick the skills you need Oc 9 Select all No where shown Oc 10 Skip for now Oc 11 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
      }
    }
  }
}