Guide
OpenClaw Setup Guide: Configure Your AI Agent
You've installed OpenClaw — now what? This guide walks you through every configuration step to get a fully working AI agent.
Setup Overview
OpenClaw setup involves five key areas. You can configure them in any order, but this sequence gets you to a working agent fastest:
- AI Model — Choose which LLM powers your agent
- Chat Platform — Connect Telegram, Discord, WhatsApp, or Web
- Gateway — Set up authentication and access control
- Skills — Add capabilities like web search, coding, and automation
- Memory — Configure how your agent remembers conversations
openclaw.json manually.Step 1: Choose Your AI Model
The model is the brain of your agent. OpenClaw supports 100+ models from major providers. Set it in your openclaw.json:
{
"models": {
"providers": {
"openrouter": {
"apiKey": "sk-or-..."
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "openrouter/anthropic/claude-sonnet-4.6"
}
}
}
}Popular choices:
| Model | Best For | Cost |
|---|---|---|
| Claude Sonnet 4.6 | Best all-around quality | ~$3/M tokens |
| GPT-5.2 | Strong reasoning, broad knowledge | ~$2.50/M tokens |
| DeepSeek V3 | Budget-friendly, good quality | ~$0.27/M tokens |
| Gemini 2.5 Pro | Large context, Google integration | ~$1.25/M tokens |
| Ollama (local) | Privacy, no API cost | Free (your hardware) |
See our models page for the full list, or read individual model guides: Claude, OpenAI, Ollama, DeepSeek.
Step 2: Connect a Chat Platform
Your agent needs a way to talk to users. OpenClaw supports multiple platforms:
| Platform | Setup Difficulty | Guide |
|---|---|---|
| Web Gateway | Easiest (built-in) | Gateway Setup |
| Telegram | Easy (BotFather token) | Telegram Guide |
| Discord | Medium (bot application) | Discord Guide |
| Easy (QR scan) | WhatsApp Guide |
You can connect multiple platforms at once. Each platform is configured in the channels section of openclaw.json.
Step 3: Configure the Gateway
The gateway provides web-based access to your agent and handles authentication:
{
"gateway": {
"enabled": true,
"auth": {
"token": "your-secret-token"
},
"controlUi": {
"allowInsecureAuth": true
}
}
}The token protects your gateway from unauthorized access. For Telegram and Discord, also configure dmPolicy to control who can message your bot. Use "pairing" for Telegram (required — "open" allows anyone on the internet to use your bot). For Discord, "open" is safe since bots are invite-only, but you must also set allowFrom: ["*"] alongside it.
See the Gateway Pairing Guide if you encounter connection issues.
Step 4: Add Skills
Skills extend what your agent can do. Install them from ClawHub:
openclaw skills install @official/web-search
openclaw skills install @official/code-runnerPopular starter skills:
- Web Search — Let your agent search the internet
- Code Runner — Execute code in a sandbox
- File Manager — Read and write files
- Browser Automation — Control a headless browser
Browse all available skills on ClawHub or read the Skills Installation Guide.
Step 5: Configure Memory
Memory lets your agent remember past conversations and user preferences:
{
"session": {
"scope": "user"
}
}Key memory options:
session.scope: "user"— Each user gets their own conversation historysession.scope: "global"— Shared conversation across all users
For advanced memory with embeddings and long-term recall, see the Memory Guide. For the experimental dreaming memory consolidation system, see the Dreaming Guide.
Verify Your Setup
After configuration, verify everything works:
- Start OpenClaw:
openclaw start(ordocker compose up) - Open the gateway URL in your browser
- Send a test message to confirm your model responds
- Test each connected platform (send a message on Telegram, Discord, etc.)
- Try a skill command to verify skills are loaded
Common Setup Issues
| Issue | Solution |
|---|---|
| Bot not responding | Bot Not Responding Fix |
| Gateway pairing failed | Gateway Pairing Fix |
| Stuck on “Starting” | Stuck on Starting Fix |
| Rate limit errors | Rate Limit Guide |
| Relay not reachable | Relay Fix |
What's Next?
- Agent Setup Guide — Advanced agent configuration and multi-agent setups
- Best Skills — Top-rated skills to supercharge your agent
- MCP Setup — Connect external tools via the Model Context Protocol
- Documentation — Full OpenClaw documentation reference