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 磁盘空间。
Who are you?
Install OpenClaw
OpenClaw runs on your computer via Node.js. Let's get it installed.
npm install -g openclaw
openclaw init 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.
npm install -g openclaw
openclaw init
openclaw gateway start 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 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:
npm i -g openclaw && openclaw init && openclaw gateway start See advanced config docs to wire up env vars and custom profiles.
Connect an AI model
OpenClaw needs an AI brain. We recommend Anthropic Claude — it's fast, smart, and affordable.
- Go to console.anthropic.com and sign up (free)
- Create an API key and copy it
- Paste it when
openclaw initasks for your API key
Edit ~/.openclaw/config.yaml directly:
# ~/.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:
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.
Say hello
Let's make sure everything works. Open a terminal and type:
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
Test in one-shot and interactive modes:
# 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:
openclaw chat "System check: confirm all providers are accessible"
openclaw status --verbose Connect a messaging channel
Now let's bring OpenClaw to your phone. Pick your favourite app:
We recommend starting with WhatsApp — it's the quickest to set up.
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.
# 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:
channels:
whatsapp:
enabled: true
personality: casual
slack:
enabled: true
personality: professional
discord:
enabled: true
personality: fun What's next?
You're all set! Here are some great places to go from here:
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.