šŸ¤–AI Money Guide
Tutorials & How-To5 min readApril 23, 2026

OpenClaw Complete Setup Guide: Build Your Own AI Agent Team in 2026

OpenClaw Complete Setup Guide: Build Your Own AI Agent Team in 2026

OpenClaw is the open-source gateway that lets you build AI agents and deploy them across 30+ messaging platforms — Discord, WhatsApp, Telegram, Slack, Signal, iMessage, and more. One gateway, unlimited agents, running 24/7.

This is the complete guide. By the end, you'll have a working agent team that can serve customers, generate content, or run your business while you sleep.

What You'll Build

By following this guide, you will:

  • āœ… Install OpenClaw on your machine (Mac, Linux, Windows, or VPS)
  • āœ… Create your first AI agent with a custom personality
  • āœ… Write a SOUL file that defines exactly how your agent thinks and communicates
  • āœ… Connect your agent to Discord, Telegram, or WhatsApp
  • āœ… Give your agent tools (web browsing, file access, APIs)
  • āœ… Secure everything with Docker or direct deployment
  • āœ… Scale to multiple agents working together

Time required: 30-60 minutes for basic setup. 2-4 hours for a full production deployment.

Prerequisites

  • A computer (Mac, Linux, or Windows with WSL)
  • Node.js v18+ installed
  • A Discord, Telegram, or WhatsApp account for testing
  • An AI model API key (Anthropic Claude or OpenAI GPT recommended)

Step 1: Install OpenClaw

On macOS (Homebrew)

# Install via npm (recommended)
npm install -g openclaw

# Or via Homebrew
brew install openclaw

On Linux (Ubuntu/Debian)

# Install Node.js 20+ if needed
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

# Install OpenClaw globally
npm install -g openclaw

On a VPS (Recommended for 24/7 operation)

# On a fresh Ubuntu 22.04 VPS ($5-10/month on DigitalOcean or Hostinger)
sudo apt update && sudo apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs git
npm install -g openclaw

Verify Installation

openclaw --version
# Should output: OpenClaw 2026.4.21 or similar

Step 2: Initial Configuration

Run the onboarding wizard:

openclaw onboard

This walks you through:

  1. Choosing your AI model — Claude (recommended), GPT, or Gemini
  2. Setting your API key — paste your Anthropic/OpenAI/Google key
  3. Configuring your first channel — Discord, Telegram, etc.
  4. Creating your first agent — basic personality and name

Manual Configuration

If you prefer manual setup, edit ~/.openclaw/openclaw.json:

{
  "models": {
    "default": "anthropic/claude-sonnet-4-5",
    "providers": {
      "anthropic": {
        "apiKey": "sk-ant-your-key-here"
      },
      "openai": {
        "apiKey": "sk-your-openai-key-here"
      }
    }
  }
}

Step 3: Start the Gateway

openclaw gateway start

Your gateway is now running. It's the bridge between your messaging platforms and your AI agents.

Access the Web UI

OpenClaw includes a web dashboard:

http://localhost:3210

From here you can chat with your agents, manage settings, and monitor activity.

Step 4: Write Your First SOUL File

The SOUL file is what makes your agent unique. It defines personality, expertise, tone, rules, and behavior. This is the secret sauce.

Create ~/.openclaw/workspace/agents/my-agent/SOUL.md:

# SOUL.md — Customer Service Agent

## Identity
- **Name:** Alex
- **Role:** Customer Support Specialist
- **Tone:** Friendly, professional, efficient
- **Emoji:** šŸ¤

## Core Mission
Help customers with product questions, order issues, 
and general inquiries. Resolve issues quickly and 
leave customers feeling valued.

## Personality
- Warm but professional — not robotic, not overly casual
- Always acknowledge the customer's frustration before solving
- Use their name when possible
- Keep responses concise but thorough
- Never say "I'm just an AI" — you ARE the support team

## Knowledge
- Product catalog: [link to your product docs]
- Shipping policies: Standard 3-5 days, Express 1-2 days
- Return policy: 30 days, no questions asked
- Pricing: See products page

## Rules
- Never share customer data with other customers
- Escalate billing disputes to human team
- Don't make promises about features not yet released
- Always end with "Is there anything else I can help with?"

SOUL File Best Practices

  1. Be specific about tone — "professional but warm" is better than "nice"
  2. Include example responses — show the agent what good looks like
  3. Set clear boundaries — what should the agent NOT do?
  4. Add domain knowledge — the more context, the better the responses
  5. Include escalation rules — when should it hand off to a human?

Step 5: Create an IDENTITY File

The IDENTITY file is a quick reference for the agent's persona:

# IDENTITY.md — Alex

- **Name:** Alex
- **Creature:** Customer support specialist who genuinely 
  cares about helping people
- **Vibe:** Warm, efficient, solution-oriented
- **Emoji:** šŸ¤

Step 6: Connect to Discord

Create a Discord Bot

  1. Go to Discord Developer Portal
  2. Click "New Application" → name it
  3. Go to "Bot" → "Add Bot"
  4. Copy the bot token
  5. Enable "Message Content Intent" under Privileged Intents
  6. Use the OAuth2 URL Generator to invite the bot to your server

Configure OpenClaw for Discord

# Add Discord channel
openclaw channel add discord --token YOUR_BOT_TOKEN

Or manually in openclaw.json:

{
  "channels": {
    "discord": {
      "enabled": true,
      "token": "YOUR_BOT_TOKEN"
    }
  }
}

Restart the gateway:

openclaw gateway restart

Your agent is now live on Discord! Message it and watch it respond with the personality you defined in the SOUL file.

Step 7: Connect to Telegram

# Create a bot via @BotFather on Telegram
# Get your bot token
openclaw channel add telegram --token YOUR_BOT_TOKEN
openclaw gateway restart

Step 8: Connect to WhatsApp

WhatsApp requires a bit more setup (Meta Business API):

  1. Create a Meta Business account
  2. Set up WhatsApp Business API
  3. Get your phone number ID and access token
  4. Configure in OpenClaw
{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "phoneNumberId": "YOUR_PHONE_NUMBER_ID",
      "accessToken": "YOUR_ACCESS_TOKEN"
    }
  }
}

Step 9: Give Your Agent Tools

Agents become powerful when they can DO things, not just talk:

Web Browsing

{
  "agents": {
    "my-agent": {
      "tools": ["web_fetch", "browser"]
    }
  }
}

File Access

{
  "agents": {
    "my-agent": {
      "tools": ["read", "write", "exec"]
    }
  }
}

Custom Skills

OpenClaw has 65+ skills (53 bundled + custom):

  • weather — get forecasts
  • github — manage repos, PRs, issues
  • apple-reminders — manage tasks
  • coding-agent — delegate coding to Codex/Claude Code
  • video-frames — extract clips from videos
  • And dozens more

Step 10: Secure Your Deployment

Option A: Docker (Recommended for Production)

# Dockerfile
FROM node:20-slim
RUN npm install -g openclaw
COPY openclaw.json /root/.openclaw/openclaw.json
COPY workspace /root/.openclaw/workspace
EXPOSE 3210
CMD ["openclaw", "gateway", "start"]
docker build -t my-agent .
docker run -d --name my-agent -p 3210:3210 my-agent

Option B: systemd Service (Linux VPS)

# Create service file
sudo tee /etc/systemd/system/openclaw.service << 'EOF'
[Unit]
Description=OpenClaw AI Gateway
After=network.target

[Service]
Type=simple
User=openclaw
ExecStart=/usr/bin/openclaw gateway start
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable openclaw
sudo systemctl start openclaw

Security Best Practices

  1. API keys — store in .env files, never in git
  2. Firewall — only expose port 3210 if needed, use nginx reverse proxy
  3. HTTPS — always use SSL in production (Let's Encrypt is free)
  4. Updates — run npm update -g openclaw regularly
  5. Monitoring — check logs with openclaw gateway logs
  6. Credentials — use chmod 600 on all credential files

Step 11: Scale to Multiple Agents

The real power is running multiple specialized agents:

~/.openclaw/workspace/agents/
ā”œā”€ā”€ customer-support/     # Handles customer inquiries
│   ā”œā”€ā”€ SOUL.md
│   └── IDENTITY.md
ā”œā”€ā”€ sales-agent/          # Qualifies leads
│   ā”œā”€ā”€ SOUL.md
│   └── IDENTITY.md
ā”œā”€ā”€ content-writer/       # Generates blog posts
│   ā”œā”€ā”€ SOUL.md
│   └── IDENTITY.md
└── social-media/         # Manages social accounts
    ā”œā”€ā”€ SOUL.md
    └── IDENTITY.md

Each agent gets its own SOUL file, personality, and tools. They can even communicate with each other for complex workflows.

Choosing Your AI Model: The Complete Comparison

Claude Sonnet 4.5 (Recommended for most agents)

  • Cost: ~$3/$15 per million tokens (input/output)
  • Context: 200K tokens
  • Best for: Customer service, content, general tasks
  • Why: Fast, affordable, great at following SOUL file instructions
  • When to upgrade: Complex reasoning tasks

Claude Opus 4.7 (Premium)

  • Cost: ~$15/$75 per million tokens
  • Context: 200K tokens
  • Best for: CEO-level agents, complex analysis, coding
  • Why: Strongest reasoning, best at nuanced tasks
  • When to use: High-value agents where quality justifies cost

GPT-5.4 (Alternative)

  • Cost: ~$10/$30 per million tokens
  • Context: 128K tokens
  • Best for: Multimodal tasks (image + text), conversational
  • Why: Great at understanding images, audio, mixed content

GPT-4o (Budget-friendly)

  • Cost: ~$5/$15 per million tokens
  • Context: 128K tokens
  • Best for: High-volume, cost-sensitive agents

Gemini 2.5 Pro (Research)

  • Cost: ~$1.25/$5 per million tokens
  • Context: 1M tokens (!)
  • Best for: Processing massive documents, research tasks
  • Why: 5x the context window of Claude/GPT

Local Models via Ollama (Free)

  • Cost: $0 (after hardware)
  • Best for: Privacy-sensitive, high-volume, offline
  • Setup: Install Ollama, run ollama run llama3.1
  • Configure OpenClaw: Point to http://localhost:11434

Revenue Models for Agent Businesses

| Model | Setup Time | Monthly Revenue | Your Cost | |---|---|---|---| | Customer support SaaS | 2-4 weeks | $200-1,000/client | $20-50/mo | | Sales qualification | 3-6 weeks | $300-1,500/client | $30-100/mo | | Content production | 1-2 weeks | $500-5,000/client | $50-200/mo | | Chatbot agency | 2-4 weeks | $500-2,000/client | $20-50/mo | | AI consulting + agents | Ongoing | $2,000-10,000/client | Varies |

Next Steps

  1. Install OpenClaw — 5 minutes
  2. Create your first agent — 15 minutes
  3. Connect to Discord — 10 minutes
  4. Write a killer SOUL file — 30 minutes
  5. Deploy to production — 1 hour
  6. Start selling agent services — this week

The tools are free. The infrastructure is open-source. The market is wide open. Build something incredible.


Want the complete agent business toolkit with SOUL file templates, pricing calculators, and client outreach scripts? Check our AI Entrepreneur Toolkit — everything you need to go from setup to revenue.

šŸ“§ Free: 50 Ways to Make Money with AI

Join 10,000+ readers getting weekly AI money-making strategies. Unsubscribe anytime.

Related Articles