Setting Up Your First OpenClaw Assistant

Get your personal AI assistant running on your device in 30 minutes

Beginner30 min

Setting Up Your First OpenClaw Assistant

Setting Up Your First OpenClaw Assistant

In this tutorial, you'll set up OpenClaw and configure your first AI assistant that can respond through multiple communication channels.

Prerequisites

  • Node.js 22 or higher installed
  • npm, pnpm, or bun package manager
  • A communication app (WhatsApp, Telegram, Slack, or Discord)
  • Basic command line knowledge

Step 1: Install OpenClaw

Install OpenClaw globally using your preferred package manager:

# Using npm
npm install -g openclaw@latest

# Or using pnpm (recommended)
pnpm add -g openclaw@latest

# Or using bun
bun add -g openclaw@latest

Verify the installation:

openclaw --version

Step 2: Run the Onboarding Wizard

Start the interactive setup wizard:

openclaw onboard --install-daemon

The wizard will guide you through:

  1. Setting up the Gateway (control plane)
  2. Configuring your workspace
  3. Connecting communication channels
  4. Installing skills from ClawHub
  5. Installing the daemon service

Follow the prompts and answer the questions. For your first setup, we recommend:

  • Gateway port: 18789 (default)
  • Workspace location: ~/.openclaw (default)
  • Channel: Start with one channel (e.g., Telegram or CLI)

Step 3: Start the Gateway

After onboarding, start the Gateway:

openclaw gateway --port 18789 --verbose

You should see output like:

OpenClaw Gateway starting...
WebSocket server listening on ws://127.0.0.1:18789
Gateway ready!

Keep this terminal window open.

Step 4: Configure Your Agent

Open a new terminal and edit your agent configuration:

openclaw config edit

This opens your configuration file. Set up your agent:

{
  "agent": {
    "model": "claude-sonnet-4-6",
    "temperature": 0.7,
    "maxTokens": 4096,
    "systemPrompt": "You are a helpful personal assistant. Be friendly, concise, and helpful.",
    "thinkingLevel": "medium"
  },
  "dmPolicy": "pairing",
  "whitelist": []
}

Save and close the file.

Step 5: Test Your Assistant

Send your first message:

openclaw agent --message "Hello! What can you help me with?" --thinking medium

Your assistant should respond with information about its capabilities.

Try a few more commands:

# Ask a question
openclaw agent --message "What's the capital of France?"

# Use higher thinking for complex tasks
openclaw agent --message "Explain quantum computing" --thinking high

# Start an interactive chat
openclaw chat

Step 6: Connect a Communication Channel

Let's connect WhatsApp so you can chat with your assistant from your phone.

Configure WhatsApp

Edit your config file:

openclaw config edit

Add the WhatsApp channel:

{
  "channels": [
    {
      "type": "whatsapp",
      "enabled": true,
      "phoneNumber": "+1234567890"
    }
  ]
}

Pair Your Device

Run the pairing process:

openclaw channel pair whatsapp

A QR code will appear. Scan it with WhatsApp on your phone (Settings → Linked Devices → Link a Device).

Test WhatsApp Integration

Send a message to your OpenClaw number from WhatsApp. Your assistant will respond!

Step 7: Install Skills

Enhance your assistant with skills from ClawHub:

# Search for skills
openclaw skill search "weather"

# Install a skill
openclaw skill install weather-api

# List installed skills
openclaw skill list

Now you can ask your assistant:

  • "What's the weather in San Francisco?"
  • "Will it rain tomorrow?"

Step 8: Use Chat Commands

In any connected channel, use these commands:

/status          - Check session status
/think high      - Set thinking level to high
/verbose on      - Enable verbose mode
/reset           - Start a new conversation

Example conversation:

You: /think high
You: Help me plan a trip to Japan
Assistant: [Provides detailed travel planning with high-level thinking]

Step 9: Configure Security

For security, OpenClaw uses pairing mode by default. Approve new contacts:

# List pending pairing requests
openclaw pairing list

# Approve a contact
openclaw pairing approve whatsapp ABC123

# Reject a contact
openclaw pairing reject whatsapp XYZ789

Complete Setup Summary

You now have:

  • ✅ OpenClaw installed and running
  • ✅ Gateway control plane active
  • ✅ Agent configured with Claude
  • ✅ Communication channel connected (WhatsApp)
  • ✅ Skills installed from ClawHub
  • ✅ Security configured with pairing mode

Next Steps

Now that your assistant is running, explore more features:

  • Add more channels: Connect Telegram, Slack, Discord, etc.
  • Install more skills: Browse ClawHub for useful skills
  • Enable voice: Set up voice interaction on macOS/iOS
  • Multi-agent routing: Create separate agents for work and personal use
  • Canvas mode: Try the visual workspace for complex tasks

Troubleshooting

Gateway won't start

Check if the port is already in use:

lsof -i :18789

Use a different port if needed:

openclaw gateway --port 18790

Channel pairing fails

Make sure:

  • Your phone has internet connection
  • WhatsApp is up to date
  • You're scanning the QR code within 60 seconds

Agent doesn't respond

Check Gateway logs:

openclaw gateway --verbose

Verify your API keys are set:

openclaw config get agent.apiKey

Skills not working

Reinstall the skill:

openclaw skill uninstall weather-api
openclaw skill install weather-api

Useful Commands Reference

# Gateway management
openclaw gateway --port 18789 --verbose
openclaw gateway stop

# Agent interaction
openclaw agent --message "Hello"
openclaw chat

# Configuration
openclaw config edit
openclaw config get agent.model
openclaw config set agent.temperature 0.8

# Skills
openclaw skill search "keyword"
openclaw skill install skill-name
openclaw skill list
openclaw skill update --all

# Sessions
openclaw session list
openclaw session info <session-id>
openclaw session reset <session-id>

# Pairing
openclaw pairing list
openclaw pairing approve <channel> <code>

Conclusion

Congratulations! You've successfully set up your first OpenClaw assistant. Your AI assistant is now running locally on your device and can communicate through multiple channels.

Explore the documentation to learn about advanced features like multi-agent routing, custom skills, and voice interaction.