Everything you need to configure, extend, and operate your OpenClaw agent.
OpenClaw is controlled entirely through the CLI. All commands follow the pattern openclaw <command> [options].
| Command | Description |
|---|---|
openclaw init | Initialize a new workspace and config at ~/.openclaw/ |
openclaw gateway start | Start the gateway daemon (main process) |
openclaw gateway stop | Stop the running gateway |
openclaw gateway restart | Restart the gateway |
openclaw gateway status | Check gateway status and connected channels |
openclaw help | Show all available commands |
| Command | Description |
|---|---|
openclaw session list | List active sessions |
openclaw session kill <id> | Terminate a specific session |
openclaw system event --text "msg" | Send a system event notification |
OpenClaw uses a YAML configuration file at ~/.openclaw/config.yaml. Here's a complete example:
# ~/.openclaw/config.yaml
agent:
name: "MyAgent"
personality: "helpful and concise"
models:
default: anthropic/claude-sonnet-4
providers:
anthropic:
apiKey: sk-ant-...
openai:
apiKey: sk-...
google:
apiKey: AIza...
openrouter:
apiKey: sk-or-...
ollama:
baseUrl: http://localhost:11434
channels:
telegram:
botToken: "123456789:ABC-DEF..."
allowedUsers:
- 123456789
whatsapp:
enabled: true
discord:
botToken: "MTIz..."
guildId: "98765..."
gateway:
port: 3333
bind: "0.0.0.0"
workspace:
path: ~/.openclaw/workspace
OpenClaw supports any model accessible via these providers:
| Provider | Models | Config Key |
|---|---|---|
| Anthropic | Claude Opus 4, Sonnet 4, Haiku 4 | anthropic/claude-opus-4 |
| OpenAI | GPT-4o, o1, o3, GPT-4o-mini | openai/gpt-4o |
| Gemini 2.5 Pro, 2.5 Flash | google/gemini-2.5-pro | |
| Ollama (local) | Llama 3, Mistral, DeepSeek, Qwen | ollama/llama3 |
| OpenRouter | 100+ models from all providers | openrouter/provider/model |
Skills are modular capabilities defined in Markdown files. Each skill lives in its own directory under ~/.openclaw/skills/ or ~/.npm-global/lib/node_modules/openclaw/skills/.
skills/
my-skill/
SKILL.md # Skill definition (required)
scripts/ # Helper scripts
references/ # Reference docs
# My Custom Skill
## Description
What this skill does and when the agent should use it.
## Instructions
Step-by-step instructions the agent follows when
this skill is triggered.
## Tools Used
- exec: for running shell commands
- web_fetch: for HTTP requests
- read/write: for file operations
The agent's workspace at ~/.openclaw/workspace/ is where your agent stores knowledge, tasks, and project files.
| File | Purpose |
|---|---|
SOUL.md | Agent personality, identity, and operating instructions |
USER.md | Information about the user (you) |
AGENTS.md | Workspace rules and agent loading behavior |
TOOLS.md | Available tools and integration notes |
memory/ | Daily notes and long-term memory files |
OpenClaw runs anywhere Node.js runs: