OpenClaw Configuration
1. Overview
OpenClaw (formerly Clawdbot) is an open-source AI agent framework that supports flexible configuration through configuration files or a GUI interface. The LongCat series models are supported for use within OpenClaw. This document explains how to integrate OpenClaw with the LongCat API Platform.
2. Prerequisites
Before using OpenClaw, you need to prepare the following:
- OpenClaw Installation Package
Installation commands for macOS:
# Using npm
npm install -g openclaw@latest
# Or using pnpm
pnpm add -g openclaw@latest
# Or using curl
curl -fsSL https://openclaw.ai/install.sh | bash
Installation commands for Windows PowerShell:
iwr -useb https://openclaw.ai/install.ps1 | iex
- LongCat Core Configuration
- Confirm your API Keys (available on the API Keys).
- Ensure that your account has sufficient token balance (check on the Usage Information).
Supported Models:
| Model Name | API Format | Description |
|---|---|---|
| LongCat-Flash-Chat | OpenAI/Anthropic | High-performance general-purpose dialogue model |
| LongCat-Flash-Thinking | OpenAI/Anthropic | Deep thinking model |
| LongCat-Flash-Thinking-2601 | OpenAI/Anthropic | Upgraded deep thinking model |
| LongCat-Flash-Lite | OpenAI/Anthropic | Efficient MoE model |
3. Quick Start
Onboarding Command
openclaw onboard --install-daemon
Onboarding Configuration Options
| Step | Recommendation |
|---|---|
| Risk Confirmation | Select yes to continue |
| Onboarding Mode | QuickStart is recommended for quick basic configuration |
| Model/Auth Provider | Select Skip for now |
| Filter models by provider | Select All providers |
| Default model | 选择 Keep current |
| Select Channel | If no suitable option, select Skip for now and configure later |
| Configure Skills | Yes is recommended to enable local utility skills |
| Preferred node manager for skill installs | select npm |
| Install missing skill dependencies | select Skip for now |
| API Key Settings | Select No or Skip if not available |
| Gateway Service | Select Install or Reinstall to install Gateway service |
| How to Hatch Your Bot | Hatch in TUI is recommended for interactive experience |
4. Post-Start Configuration
After completing the onboarding process, OpenClaw will automatically start the Gateway service and open the web control page.
Default Access Address
http://127.0.0.1:18789
If the page does not open automatically, you can manually access the above address in your browser.
Configuration File Location
~/.openclaw/openclaw.json
5. LongCat Model Configuration
After startup, you can configure LongCat models by modifying custom configurations.
Configuration Option 1: Modify Configuration File
1. Add Custom Model Provider
Add the models field to openclaw.json:
{
"models": {
"mode": "merge",
"providers": {
"longCat": {
"baseUrl": "https://api.longcat.chat/openai",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"authHeader": true,
"models": [
{
"id": "LongCat-Flash-Chat",
"name": "LongCat-Flash-Chat",
"reasoning": false,
"input": ["text"],
"contextWindow": 200000,
"maxTokens": 8192,
"compat": {
"maxTokensField": "max_tokens"
}
}
]
}
}
}
}
2. Modify Default Model Settings
Modify the agents field to set the default model:
{
"agents": {
"defaults": {
"model": {
"primary": "longCat/LongCat-Flash-Chat"
}
}
}
}
Changes take effect immediately after saving.
Configuration Option 2: GUI Interface Configuration
- In the web control page, go to Config → Models → Providers
- Add the following configuration:
| Configuration Item | Value |
|---|---|
| Api | openai-completions |
| Api Key | LongCat's API Key |
| Base Url | https://api.longcat.chat/openai |
| models - id | LongCat model name |
| models - name | LongCat model name |
Complete Configuration Example
{
"meta": {
"lastTouchedVersion": "2026.1.24-3",
"lastTouchedAt": "2026-01-29T02:21:28.058Z"
},
"wizard": {
"lastRunAt": "2026-01-29T02:13:14.153Z",
"lastRunVersion": "2026.1.24-3",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"anthropic:default": {
"provider": "anthropic",
"mode": "api_key"
}
}
},
"models": {
"mode": "merge",
"providers": {
"longCat": {
"baseUrl": "https://api.longcat.chat/openai",
"apiKey": "YOUR_API Key",
"auth": "api-key",
"api": "openai-completions",
"authHeader": true,
"models": [
{
"id": "LongCat-Flash-Chat",
"name": "LongCat-Flash-Chat",
"reasoning": false,
"input": ["text"],
"contextWindow": 200000,
"maxTokens": 8192,
"compat": {
"maxTokensField": "max_tokens"
}
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "longCat/LongCat-Flash-Chat"
},
"workspace": "/Users/xxx/.openclaw/workspace",
"contextPruning": {
"mode": "cache-ttl",
"ttl": "1h"
},
"compaction": {
"mode": "safeguard"
},
"heartbeat": {
"every": "30m"
},
"maxConcurrent": 4,
"subagents": {
"maxConcurrent": 8
}
}
},
"messages": {
"ackReactionScope": "group-mentions"
},
"commands": {
"native": "auto",
"nativeSkills": "auto"
},
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"auth": {
"mode": "token",
"token": ""
},
"tailscale": {
"mode": "off",
"resetOnExit": false
}
},
"skills": {
"install": {
"nodeManager": "npm"
}
}
}
6. Getting Started
Once the configuration takes effect, you can start using OpenClaw.
- Open TUI and check Gateway status
openclaw tui
/status
- Open Web UI and interact on the Chat page
openclaw dashboard
Then enter a test message such as: "Hello, please introduce yourself"
If the configuration is correct, you will receive a response from the LongCat model.