Get started with OpenClaw

Your personal AI agent, up and running in under 10 minutes.

开始使用 OpenClaw 大约需要 5-15 分钟 ,具体取决于你的经验水平。安装流程分三步:先通过 npm 安装 OpenClaw(npm install -g openclaw),再运行初始化向导配置 AI 模型 API Key(openclaw init),最后启动 gateway(openclaw gateway start)。无需编程——向导会通过交互式提示完成配置。

OpenClaw 支持三种安装方式: npm(推荐给大多数用户)、Docker(适合容器化部署)以及从源码构建(适合贡献者)。安装完成后,你还可以按需连接消息平台——WhatsApp、Telegram、Discord 和 Slack 每个通常只需额外约 5 分钟。最低系统要求为 Node.js 18+、2GB 内存和 1GB 磁盘空间。

1

Install OpenClaw

Beginner Developer Power User

OpenClaw runs on your computer via Node.js. Let's get it installed.

bash
npm install -g openclaw
openclaw init
💡
Need Node.js? Download it free from nodejs.org — the LTS version is perfect.

After running openclaw init, a setup wizard will guide you through the rest.

Install via npm, Docker, or build from source. All options are fully supported.

bash
npm install -g openclaw
openclaw init
openclaw gateway start
bash
docker pull openclaw/openclaw:latest
docker volume create openclaw-config
docker run -it \
  -v openclaw-config:/home/openclaw/.openclaw \
  -p 3000:3000 \
  openclaw/openclaw:latest init
bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install
npm run build
npm link

Fast path — install and start in one command:

bash
npm i -g openclaw && openclaw init && openclaw gateway start

See advanced config docs to wire up env vars and custom profiles.

2

Connect an AI model

Beginner Developer Power User

OpenClaw needs an AI brain. We recommend Anthropic Claude — it's fast, smart, and affordable.

  1. Go to console.anthropic.com and sign up (free)
  2. Create an API key and copy it
  3. Paste it when openclaw init asks for your API key
ℹ️
💸 Cost tip: Claude Haiku costs about $0.25 per 1M tokens — typical personal use costs under $2/month.

Edit ~/.openclaw/config.yaml directly:

yaml
# ~/.openclaw/config.yaml
ai:
  provider: anthropic
  model: claude-sonnet-4-20250514
  apiKey: ${ANTHROPIC_API_KEY}

gateway:
  host: 127.0.0.1
  port: 3000

Supports 10+ AI providers including OpenAI, Gemini, Groq, and local Ollama models.

Route different task types to different models for cost/quality optimisation:

yaml
ai:
  providers:
    anthropic:
      apiKey: ${ANTHROPIC_API_KEY}
    openai:
      apiKey: ${OPENAI_API_KEY}
  routing:
    simple: claude-3-haiku
    complex: claude-3-opus
    code: gpt-4-turbo

See model routing docs for advanced patterns.

3

Say hello

Beginner Developer Power User

Let's make sure everything works. Open a terminal and type:

bash
openclaw chat

Try sending it some messages:

  • What's on my agenda today?
  • Summarise this article: [paste URL]
  • Remind me to call mum at 5pm
🎉
🎉 It's working! You now have a personal AI agent running on your machine.

Test in one-shot and interactive modes:

bash
# One-shot test
openclaw chat "Hello! List 3 ways you can help developers."

# Interactive mode
openclaw chat

# Check status & logs
openclaw status
openclaw logs --tail 20

The REST API runs at http://localhost:3000 — see API docs for integration options.

Run a system check and verify all providers respond:

bash
openclaw chat "System check: confirm all providers are accessible"
openclaw status --verbose
4

Connect a messaging channel

Beginner Developer Power User

Now let's bring OpenClaw to your phone. Pick your favourite app:

We recommend starting with WhatsApp — it's the quickest to set up.

bash
openclaw connect whatsapp

Scan the QR code that appears in your terminal and you're connected.

Each channel needs a bot token. See our channel setup guides for step-by-step instructions.

bash
# Telegram (bot token from @BotFather)
openclaw connect telegram

# Discord (bot token from developer portal)
openclaw connect discord

# Slack (app manifest install)
openclaw connect slack

Run openclaw status to verify all channels are connected and healthy.

Configure multiple channels with per-channel personality settings in config.yaml:

yaml
channels:
  whatsapp:
    enabled: true
    personality: casual
  slack:
    enabled: true
    personality: professional
  discord:
    enabled: true
    personality: fun

Quick reference

openclaw chat Start an interactive chat session
openclaw status Check system and channel health
openclaw gateway start Start the background gateway service
openclaw skills list View installed skills
openclaw connect <channel> Connect a messaging channel
openclaw logs --tail 20 Stream the last 20 log lines

Join our Discord Community

Get help, share your setup, and connect with other OpenClaw users.

Join Discord