← Home

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:

  1. AI Model — Choose which LLM powers your agent
  2. Chat Platform — Connect Telegram, Discord, WhatsApp, or Web
  3. Gateway — Set up authentication and access control
  4. Skills — Add capabilities like web search, coding, and automation
  5. Memory — Configure how your agent remembers conversations
Using OpenClaw Launch? The configurator handles all of this visually. Go to openclawlaunch.com, pick your options, and click Deploy. This guide is for self-hosted users who want to configure 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:

ModelBest ForCost
Claude Sonnet 4.6Best all-around quality~$3/M tokens
GPT-5.2Strong reasoning, broad knowledge~$2.50/M tokens
DeepSeek V3Budget-friendly, good quality~$0.27/M tokens
Gemini 2.5 ProLarge context, Google integration~$1.25/M tokens
Ollama (local)Privacy, no API costFree (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:

PlatformSetup DifficultyGuide
Web GatewayEasiest (built-in)Gateway Setup
TelegramEasy (BotFather token)Telegram Guide
DiscordMedium (bot application)Discord Guide
WhatsAppEasy (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-runner

Popular 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 history
  • session.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:

  1. Start OpenClaw: openclaw start (or docker compose up)
  2. Open the gateway URL in your browser
  3. Send a test message to confirm your model responds
  4. Test each connected platform (send a message on Telegram, Discord, etc.)
  5. Try a skill command to verify skills are loaded

Common Setup Issues

IssueSolution
Bot not respondingBot Not Responding Fix
Gateway pairing failedGateway Pairing Fix
Stuck on “Starting”Stuck on Starting Fix
Rate limit errorsRate Limit Guide
Relay not reachableRelay 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

Skip the Setup

OpenClaw Launch handles all configuration for you. Deploy in 10 seconds.

Deploy Now