📖 Documentation

OpenClaw Reference

Everything you need to configure, extend, and operate your OpenClaw agent.

CLI Commands

OpenClaw is controlled entirely through the CLI. All commands follow the pattern openclaw <command> [options].

Core Commands

CommandDescription
openclaw initInitialize a new workspace and config at ~/.openclaw/
openclaw gateway startStart the gateway daemon (main process)
openclaw gateway stopStop the running gateway
openclaw gateway restartRestart the gateway
openclaw gateway statusCheck gateway status and connected channels
openclaw helpShow all available commands

Session & Agent Commands

CommandDescription
openclaw session listList active sessions
openclaw session kill <id>Terminate a specific session
openclaw system event --text "msg"Send a system event notification

Configuration

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

Supported Models

OpenClaw supports any model accessible via these providers:

ProviderModelsConfig Key
AnthropicClaude Opus 4, Sonnet 4, Haiku 4anthropic/claude-opus-4
OpenAIGPT-4o, o1, o3, GPT-4o-miniopenai/gpt-4o
GoogleGemini 2.5 Pro, 2.5 Flashgoogle/gemini-2.5-pro
Ollama (local)Llama 3, Mistral, DeepSeek, Qwenollama/llama3
OpenRouter100+ models from all providersopenrouter/provider/model

Skills System

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/.

Skill Structure

skills/
  my-skill/
    SKILL.md      # Skill definition (required)
    scripts/      # Helper scripts
    references/   # Reference docs

SKILL.md Format

# 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

Workspace Files

The agent's workspace at ~/.openclaw/workspace/ is where your agent stores knowledge, tasks, and project files.

FilePurpose
SOUL.mdAgent personality, identity, and operating instructions
USER.mdInformation about the user (you)
AGENTS.mdWorkspace rules and agent loading behavior
TOOLS.mdAvailable tools and integration notes
memory/Daily notes and long-term memory files

Deployment Options

OpenClaw runs anywhere Node.js runs:

  • Mac (local): Best for personal use and development
  • Linux VPS: Best for always-on 24/7 operation — see our VPS guide
  • Raspberry Pi: Ultra-low-cost always-on option

Ready to get started?

Follow our step-by-step installation guide.

⚡ Install OpenClaw