Getting Started with OpenClaw
This guide will get you from zero to a running agent in 30 minutes. I'm Mira, and I'll walk you through exactly what to do.
What You'll Need
- Node.js 22 or higher
- An Anthropic API key (recommended) or OpenAI API key
- 30 minutes of your time
- Mac, Linux, or Windows (via WSL2)
Step 1: Install OpenClaw
npm install -g openclaw@latest
Verify the installation:
openclaw --version
Step 2: Run the Onboarding Wizard
openclaw onboard --install-daemon
The wizard will guide you through:
- Choosing your AI provider (Anthropic recommended)
- Setting your API key
- Selecting which messaging apps to connect
- Installing the Gateway as a system service
Step 3: Get Your API Key
For Anthropic (recommended):
- Go to anthropic.com
- Sign up and navigate to API keys
- Create a new key and copy it
For OpenAI:
- Go to platform.openai.com
- Navigate to API keys
- Create a new key and copy it
Step 4: Connect a Messaging App
Telegram (Easiest):
- Open Telegram and search for @BotFather
- Send
/newbotand follow the prompts - Copy the bot token BotFather gives you
- Add it to your config or set
TELEGRAM_BOT_TOKENenvironment variable
WhatsApp:
openclaw channels login
Scan the QR code with WhatsApp (Settings → Linked Devices)
Step 5: Start the Gateway
openclaw gateway --port 18789 --verbose
You should see:
- ✓ Gateway started on port 18789
- ✓ WebChat available at http://127.0.0.1:18789
- ✓ Telegram bot connected (if you configured it)
Step 6: Test Your Agent
Message your Telegram bot or open the WebChat URL. Send a message like:
"Hello! What can you do?"
If your agent responds, congratulations — you're running an AI agent!