HAI Gateway Docs

OpenClaw

Open-source AI coding agent · Setup guide

What is OpenClaw?

OpenClaw is an open-source AI coding agent focused on flexible model access and toolchain integration, supporting multiple LLM backends, ideal for developers who need high customization.

Installation

Multiple installation methods are available:

Script install (recommended)

curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell):

iwr -useb https://openclaw.ai/install.ps1 | iex

npm global install

npm install -g openclaw@latest

Install from source

git clone https://github.com/openclaw/openclaw.git
cd openclaw && pnpm install
pnpm link --global

Verify installation:

openclaw --version

Configure HAI Gateway

openclaw onboard --install-daemon

In the configuration wizard, set the following model configuration:

{
  "models": {
    "default": {
      "provider": "openai-compatible",
      "base_url": "https://api.hai.network/openai/v1",
      "api_key": "sk-pat-YOUR_ACCESS_TOKEN",
      "model": "claude-sonnet-4-20250514"
    }
  }
}
Configuration complete

Once configured, you can run openclaw in any project directory to get started.