Configure AI Models for OpenClaw: Give Your Agent a Brain
This tutorial walks through configuring cloud AI models for OpenClaw on Windows, covering status checks, provider selection (Alibaba Bailian, ByteDance, Kimi), JSON configuration with API keys, and testing the agent's first conversation.
This article is the second part of a series on OpenClaw, following the initial Windows local deployment guide. It explains how to equip OpenClaw with an AI model — referred to as giving it a "brain" — so the agent can actually think and respond.
1. Check Running Status
First, enter the WSL environment and run the following command to verify the gateway is running: openclaw gateway status If the output shows running, the gateway is ready and you can proceed to model configuration.
2. Choose a Model Provider
Models can be run locally or in the cloud. Because AI agents typically consume large amounts of tokens, cloud models are generally preferred. Major Chinese cloud providers — including ByteDance, Alibaba, and Kimi — have introduced Coding Plan packages that reduce usage costs. You can apply for API keys via their official websites. This tutorial uses Alibaba's Bailian API Key as an example; configuration details vary slightly between providers.
3. Configure Model Information
After obtaining an API key, open the OpenClaw console, navigate to Configuration → RAW, and replace the "agents": {...} section with the following JSON. Replace DASHSCOPE_API_KEY with your actual Bailian API key (do not copy the placeholder directly).
{
"models": {
"mode": "merge",
"providers": {
"bailian": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "DASHSCOPE_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "qwen3.5-plus",
"reasoning": false,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 65536
},
{
"id": "qwen3-coder-next",
"name": "qwen3-coder-next",
"reasoning": false,
"input": ["text"],
"contextWindow": 262144,
"maxTokens": 65536
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "bailian/qwen3.5-plus"
},
"models": {
"bailian/qwen3.5-plus": {},
"bailian/qwen3-coder-next": {}
}
}
}
}⚠️ Note: Replace DASHSCOPE_API_KEY in the configuration with your actual API key; otherwise the agent will not work.
4. Save and Update Configuration
Click Save in the top-right corner to save the configuration.
Click Update to apply the changes.
5. Start a Conversation
After configuration, go to the chat page and send any message. You will receive a reply from "Xiao Long Xia" (Little Crayfish), the nickname for OpenClaw because its logo is a red crayfish.
💡 "Xiao Long Xia" is OpenClaw's nickname, derived from its red crayfish logo.
The article concludes by previewing the next episode, which will teach the agent to "do things" by defining Skill capabilities.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Cambridge Mofang Notes
Upholding classic programming, focusing on AI human‑machine collaboration, technology implementation and practice sharing.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
