agents101 · OpenClaw

What is OpenClaw

OpenClaw

OpenClaw is an open-source, self-hosted AI agent gateway that lets you deploy a personal AI assistant on your own machine and interact with it through any chat platform — WhatsApp, Telegram, Discord, iMessage, Feishu/Lark, Slack, Signal, and more.

Unlike cloud-only AI tools, OpenClaw runs locally, keeps your data private, and gives your AI assistant persistent access to your files, tools, and workflows.

Core capabilities:

  • Local-first — your data stays on your machine; no server-side storage
  • Multi-platform — one agent, many chat apps; switch devices seamlessly
  • Multi-model — swap between Anthropic, OpenAI, Google Gemini, DeepSeek, Ollama, and 30+ providers with a config change
  • Extensible — 5,400+ community Skills via ClawHub; build your own in minutes
  • Always on — runs as a background daemon; proactive via Cron, Heartbeat, Task Flow, and Webhooks
  • Multi-agent — run multiple isolated agents with different personalities, models, and tool sets

How OpenClaw Works

OpenClaw follows a gateway architecture — a central process connects chat platforms to AI agents through a unified message bus.

┌─────────────────────────────────────────────────────────┐
│                   Application Layer                      │
│   WebChat  ·  macOS App  ·  CLI  ·  Control UI (Admin)  │
├─────────────────────────────────────────────────────────┤
│                   Gateway Layer                          │
│   WebSocket Server  ·  Message Routing  ·  Sessions     │
├─────────────────────────────────────────────────────────┤
│                   Channel Layer                          │
│   WhatsApp · Telegram · Discord · Slack · Feishu · ...  │
├─────────────────────────────────────────────────────────┤
│                   Agent Layer                            │
│   System Prompt  ·  Tool Execution  ·  Memory Retrieval  │
├─────────────────────────────────────────────────────────┤
│                   Model Layer                            │
│   Claude · GPT · Gemini · DeepSeek · Ollama · ...       │
└─────────────────────────────────────────────────────────┘

Message flow:

  1. User sends a message on any chat platform
  2. The channel adapter converts it to OpenClaw’s internal format
  3. Gateway routes it to the correct agent session based on binding rules
  4. The agent assembles context (system prompt + memory + tools), calls the LLM
  5. The response flows back through the gateway to the originating channel

Core Design Principles

PrincipleDescription
Self-hostedRuns on your machine — laptop, VPS, Docker, or cloud VM. You own the data.
Platform-agnosticSame agent across any chat app. Add or remove channels without touching agent logic.
Model-flexibleNo vendor lock-in. Switch models per agent, per task, or set up automatic fallback chains.
Skill-extensibleSkills are markdown-based instruction files. Install from ClawHub or write your own.
Agent-isolatedEach agent has its own workspace, sessions, memory, auth, and skill set.
ProactiveNot just reactive — Cron, Heartbeat, Task Flow, and Webhooks let the agent act on its own.

System Architecture in Depth

OpenClaw uses a five-layer architecture designed for extensibility and isolation:

Gateway (the core):

  • WebSocket server handling all client connections
  • Message routing engine that maps incoming messages to agent sessions
  • Session management with per-agent state isolation
  • Tool execution coordinator that manages concurrent tool calls

Channel adapters:

  • Each platform (WhatsApp, Telegram, etc.) has a dedicated adapter
  • Adapters handle platform-specific auth, message formatting, and media
  • New channels can be added via plugins without modifying the gateway

Agent runtime:

  • System prompt assembly from workspace files (SOUL.md, USER.md, IDENTITY.md)
  • Tool registration and execution sandbox
  • Memory retrieval pipeline (Active Memory, Memory Wiki)
  • Conversation context management with token budgeting

Model abstraction:

  • Unified interface across 35+ LLM providers
  • Automatic fallback chains (primary → secondary → local)
  • Per-agent model configuration
  • WebSocket transport for low-latency streaming

Gateway Internals

The Gateway is the heart of OpenClaw. Every client — CLI, WebChat, chat platforms — connects through it via WebSocket.

Connection lifecycle:

Client                          Gateway
  │                                │
  ├── req:connect (identity) ────▶ │
  │                                ├── authenticate
  │ ◀── res (ok) + hello-ok ──────┤
  │                                │
  │ ◀── event:presence ───────────┤  (online status)
  │ ◀── event:tick ───────────────┤  (heartbeat)
  │                                │
  ├── req:agent (message) ───────▶ │
  │                                ├── route to agent session
  │                                ├── execute tools
  │                                ├── call LLM
  │ ◀── event:agent (stream) ─────┤  (partial response)
  │ ◀── res:agent (final) ────────┤  (complete response)

Key configuration:

{
  "gateway": {
    "port": 18789,
    "host": "127.0.0.1",
    "auth": {
      "mode": "token",
      "token": "your-secret-token"
    }
  }
}

Multi-Agent Architecture

Multiple agents running in parallel via the OpenClaw Control UI Multiple agents running side by side in the Control UI — via openclaw/openclaw

OpenClaw supports running multiple agents in parallel, each fully isolated:

Isolation DimensionDescription
WorkspaceEach agent has its own directory with SOUL.md, USER.md, etc.
SessionsIndependent conversation histories
AuthSeparate API keys and model configurations
MemoryIndependent memory stores
SkillsCan load different skill sets per agent

Example topology:

Gateway
├── WhatsApp ──▶ "alex" agent (personal assistant)
├── Telegram ──▶ "work" agent (coding helper)
├── Discord  ──▶ "coding" agent (pair programmer)
└── Feishu   ──▶ "team" agent (team coordinator)

Each agent has its own workspace at ~/.openclaw/agents/<agentId>/agent/.

OpenClaw vs ChatGPT vs Claude Code

FeatureChatGPTClaude CodeOpenClaw
Where it runsCloudLocal terminalLocal (any OS)
Data privacyServer-side storageLocalLocal
Chat app integrationNoneNoneWhatsApp / Telegram / Discord / iMessage / Feishu / Slack
Access local filesNoYesYes
Custom skillsGPTs (limited)No5,400+ via ClawHub
Always onBrowser requiredTerminal requiredBackground daemon
Multi-agentNoNoMultiple isolated personas
ProactiveNoNoCron / Heartbeat / Task Flow / Webhooks
Primary useGeneral chatCoding assistantPersonal AI assistant

When to use OpenClaw:

  • You want an AI assistant that’s always reachable on your phone
  • You need it to access local files, run commands, and automate tasks
  • You want full data privacy with local execution
  • You need multi-platform access from a single agent
  • You want to extend capabilities with community skills

Ecosystem & Community

The OpenClaw ecosystem extends far beyond the core gateway:

ComponentDescription
ClawHubPublic skill registry with 5,400+ community skills
Control UIWeb-based admin dashboard for managing your gateway
OpenClaw ManagerReact + Tailwind web UI for multi-gateway management
ClawXDesktop app for autonomous agent tasks
ClawPanelTauri v2 management panel
ComposioManaged OAuth integration for 1,000+ external services
MyClawOne-click cloud-hosted OpenClaw instances

Community resources:

  • GitHub: github.com/openclaw/openclaw
  • Discord: discord.com/invite/clawd
  • ClawHub: clawhub.com
  • Skills catalog: github.com/VoltAgent/awesome-openclaw-skills (50k+ stars)

Installation Methods

Choose the installation method that fits your setup:

MethodDifficultyCostBest For
npm (official)MediumFreeFull control, developers
curl installerEasyFreemacOS / Linux users
DockerMediumFreeServer deployment
EasyClawEasyFreeBeginners, zero-config
Cloud VPSEasyPaid24/7 uptime, remote access
Managed (MyClaw)EasiestPaidNo server management
# Requires Node.js 22+
node -v  # verify

# Install globally
npm install -g openclaw@latest

# Run onboarding wizard
openclaw onboard

curl Installer

# macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash

# Windows (PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex

Docker

# Clone the docker-compose template
git clone https://github.com/openclaw/openclaw.git
cd openclaw/docker

# Configure environment
cp .env.example .env
# Edit .env with your API keys

# Start
docker compose up -d

Cloud Deployment Options

ProviderStarting PriceNotes
Tencent Cloud Lighthouse~$3/moPre-built OpenClaw image
Alibaba Cloud WuyingPay-as-you-goCloud desktop with OpenClaw
Volcengine~$1.5/moBudget-friendly VPS
Cloudflare Workers$5/moGlobal CDN, needs R2 config
MyClawManagedOne-click, 24/7 uptime

System Requirements

RequirementMinimumRecommended
Node.js22.x24.x
RAM512 MB2 GB+
Disk200 MB1 GB+ (for skills, memory)
OSmacOS 12+, Ubuntu 20.04+, Windows 10+ (WSL2)macOS, Linux
NetworkInternet (for API calls)Stable broadband

Platform notes:

  • macOS — Best experience. Native launchd daemon support.
  • Linux — Full support. systemd service available.
  • Windows — WSL2 strongly recommended over native PowerShell.
  • ARM (Raspberry Pi) — Works but slower; good for lightweight setups.

Onboarding Wizard

The openclaw onboard command walks you through initial setup in ~5 minutes:

openclaw onboard

The wizard covers 10 steps:

  1. Accept risk disclaimer
  2. Choose setup mode (QuickStart / Advanced)
  3. Select AI model provider (Anthropic / OpenAI / Google / DeepSeek / Ollama / …)
  4. Enter API key
  5. Choose chat platform (Telegram / Feishu / Discord / WhatsApp / …)
  6. Set gateway port (default: 18789)
  7. Select initial skills
  8. Configure additional API keys (web search, etc.)
  9. Enable hooks (optional)
  10. Complete — gateway starts automatically

Manual configuration (skip wizard):

# Configure model provider
openclaw models auth login --provider anthropic

# Add a chat channel
openclaw channels add

# Start gateway
openclaw gateway start

Model Provider Configuration

OpenClaw supports 35+ model providers out of the box:

ProviderModelsNotes
AnthropicClaude 4.5 Sonnet, Claude 4 Haiku, …Recommended for coding
OpenAIGPT-5.4, GPT-5.4-pro, o3, …Via API key or ChatGPT OAuth
GoogleGemini 2.5 Pro, Gemini 2.5 Flash, …Free tier available
DeepSeekDeepSeek-V3, DeepSeek-R1, …Best cost-performance ratio
OllamaLocal models (Llama, Mistral, Qwen, …)Fully offline
MiniMaxMiniMax-Text-01, …Chinese market
Zhipu GLMGLM-4, …Chinese market
QwenQwen-Max, Qwen-Plus, …Alibaba Cloud

Configuration example:

{
  "models": {
    "mode": "merge",
    "providers": {
      "anthropic": {
        "apiKey": "sk-ant-..."
      },
      "openai": {
        "apiKey": "sk-..."
      },
      "ollama": {
        "baseUrl": "http://localhost:11434"
      }
    },
    "defaults": {
      "main": "anthropic/claude-4-5-sonnet",
      "fast": "anthropic/claude-4-haiku"
    },
    "fallback": [
      "openai/gpt-5.4",
      "google/gemini-2.5-pro"
    ]
  }
}

Key concepts:

  • mode: "merge" — keeps built-in providers and adds your custom ones
  • defaults.main — primary model for complex tasks
  • defaults.fast — lightweight model for quick responses (/fast toggle)
  • fallback — automatic failover chain

Gateway Startup & Management

# Start (foreground)
openclaw gateway start

# Start as background daemon
openclaw gateway start --daemon

# Stop
openclaw gateway stop

# Restart (after config changes)
openclaw gateway restart

# Check status
openclaw status

# View logs
openclaw gateway logs

Daemon configuration:

OSMechanismAuto-start
macOSlaunchdopenclaw onboard --install-daemon
Linuxsystemdopenclaw service install
DockerDocker restart policyrestart: unless-stopped

Hot reload: Most config changes in openclaw.json take effect after openclaw gateway restart. Workspace files (SOUL.md, USER.md, etc.) take effect immediately without restart.

Control UI & Dashboard

OpenClaw includes a built-in web interface at http://127.0.0.1:18789/:

FeatureDescription
DashboardOverview of agent status, active sessions, system health
WebChatChat directly with your agent from the browser
ConfigurationView and edit gateway settings
Agent viewInspect agent workspaces, skills, and memory
Session viewBrowse and manage conversation sessions
Command paletteQuick actions via keyboard shortcut
Message exportExport conversation history

Mobile support: The Control UI is responsive — bottom tab navigation on mobile, sidebar on desktop.

Slash commands in WebChat:

  • /status — gateway and agent status
  • /models — list available models
  • /skills — list installed skills
  • /sessions — list active sessions
  • /fast — toggle fast model mode

Sending Your First Message

iOS TestFlight client exchanging messages with an OpenClaw agent The iOS client in conversation with an OpenClaw agent — via openclaw/openclaw

After starting the gateway, you have several ways to interact:

Option 1: WebChat (quickest)

Open http://127.0.0.1:18789/chat in your browser
Type: "Hello! What can you do?"

Option 2: CLI

openclaw chat
# Type your message, get a response

Option 3: Chat platform

Send a DM to your bot on Telegram / Feishu / Discord / etc.

Try these commands:

"What's the weather in San Francisco?"
"List the files in my home directory"
"Create a reminder: buy groceries tomorrow at 5pm"
"Search the web for the latest OpenClaw release notes"
"Summarize my recent emails"

Security & Authentication

Gateway authentication is mandatory — you must explicitly set an auth mode:

# Token-based (recommended)
openclaw config set gateway.auth.mode token
openclaw config set gateway.auth.token "$(openssl rand -hex 24)"

# Or password-based
openclaw config set gateway.auth.mode password
openclaw config set gateway.auth.password "your-strong-password"

openclaw gateway restart

Channel-level security:

{
  "channels": {
    "telegram": {
      "dmPolicy": "pairing",
      "allowFrom": ["your_telegram_user_id"]
    },
    "feishu": {
      "dmPolicy": "pairing"
    }
  }
}
PolicyDescription
pairingUsers must enter a one-time pairing code (default, recommended)
openAnyone can message the bot (use with caution)
allowlistOnly explicitly listed user IDs

Group chat security:

{
  "channels": {
    "telegram": {
      "groupPolicy": "allowlist",
      "groups": {
        "allowed-group-id": {
          "requireMention": true
        }
      }
    }
  }
}

Channel Overview

8+ chat platforms reachable through one OpenClaw gateway One gateway, many chat platforms — via openclaw/openclaw

OpenClaw supports 8+ chat platforms through a unified channel system. Each channel adapter handles platform-specific authentication, message formatting, and media handling.

ChannelSetup DifficultyFeatures
TelegramEasyBot API, inline mode, groups, media
DiscordMediumServers, channels, threads, slash commands
Feishu/LarkMediumInteractive cards, WebSocket, groups, enterprise
WhatsAppHardQR pairing, media, group support
SlackMediumBlock Kit, webhooks, workspace apps
iMessageMediummacOS only, via BlueBubbles
SignalHardPrivacy-first, requires signal-cli
WebChatEasiestBuilt-in, zero config

Common configuration pattern:

{
  "channels": {
    "<channel-name>": {
      "enabled": true,
      "...credentials...": "...",
      "dmPolicy": "pairing",
      "groupPolicy": "disabled"
    }
  }
}

Telegram Configuration

OpenClaw agent posting a PR review to Telegram A code-review notification delivered to Telegram — via openclaw/openclaw

Telegram is the easiest channel to set up — you only need a bot token.

Step 1: Create a bot

1. Open Telegram, search for @BotFather
2. Send /newbot
3. Choose a name and username
4. Copy the bot token

Step 2: Configure OpenClaw

openclaw channels add
# Select "Telegram"
# Paste the bot token

Or edit openclaw.json directly:

{
  "channels": {
    "telegram": {
      "token": "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11",
      "dmPolicy": "pairing"
    }
  }
}

Step 3: Restart and test

openclaw gateway restart
# Send a message to your bot in Telegram

Advanced options:

{
  "channels": {
    "telegram": {
      "token": "...",
      "allowFrom": ["123456789"],
      "groups": {
        "*": { "requireMention": true }
      },
      "streaming": true,
      "replyToMode": "quote"
    }
  }
}

Discord Configuration

Step 1: Create a Discord application

1. Go to discord.com/developers/applications
2. Click "New Application"
3. Go to "Bot" tab → "Add Bot"
4. Copy the bot token
5. Enable "Message Content Intent" under Privileged Gateway Intents
6. Generate an OAuth2 URL with "bot" scope and appropriate permissions
7. Use the URL to invite the bot to your server

Step 2: Configure OpenClaw

{
  "channels": {
    "discord": {
      "token": "your-discord-bot-token",
      "dmPolicy": "pairing"
    }
  }
}

Step 3: Restart

openclaw gateway restart

Feishu / Lark Configuration

Feishu (飞书) is the most popular channel in the Chinese market. It supports interactive message cards, WebSocket-based event subscription, and enterprise-grade security.

Step 1: Create a Feishu app

1. Go to open.feishu.cn
2. Create an enterprise self-built app
3. Enable "Bot" capability
4. Copy App ID and App Secret
5. Configure permissions (batch import recommended)
6. Enable event subscription: WebSocket mode, event: im.message.receive_v1
7. Publish the app

Required permissions:

  • im:message — read messages
  • im:message:send_as_bot — send messages as bot
  • contact:contact.base:readonly — read contact info

Step 2: Install the Feishu plugin

openclaw plugins install @openclaw/feishu

Step 3: Configure

{
  "channels": {
    "feishu": {
      "appId": "cli_xxxxx",
      "appSecret": "xxxxx",
      "dmPolicy": "pairing"
    }
  }
}

Advanced: Streaming output

{
  "channels": {
    "feishu": {
      "appId": "...",
      "appSecret": "...",
      "streaming": true,
      "replyToMode": "quote"
    }
  }
}

Advanced: Interactive cards

Feishu supports rich interactive message cards with buttons, forms, and callback handlers. See the Recipes tab for card implementation examples.

WhatsApp, Signal & iMessage

WhatsApp

WhatsApp requires QR code pairing (similar to WhatsApp Web):

openclaw channels add
# Select "WhatsApp"
# Scan the QR code with your phone
{
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing"
    }
  }
}

Note: WhatsApp uses the unofficial WhatsApp Web protocol. Use a dedicated number to avoid account issues.

Signal

Signal integration requires signal-cli running as a daemon:

# Install signal-cli
# Register or link as a secondary device
# Configure OpenClaw to connect

iMessage (macOS only)

iMessage requires BlueBubbles server running on a Mac:

{
  "channels": {
    "imessage": {
      "blueBubblesUrl": "http://localhost:1234",
      "password": "your-bluebubbles-password"
    }
  }
}

Multi-Channel Routing

When running multiple channels, you can route different channels to different agents:

{
  "bindings": [
    { "channel": "whatsapp", "agentId": "personal" },
    { "channel": "telegram", "agentId": "work" },
    { "channel": "discord",  "agentId": "coding" },
    { "channel": "feishu",   "agentId": "team" }
  ]
}

Binding rules are evaluated in order — first match wins. You can also filter by chat type, group ID, or user ID:

{
  "bindings": [
    {
      "channel": "telegram",
      "agentId": "vip-support",
      "match": { "userId": "vip-user-123" }
    },
    {
      "channel": "telegram",
      "agentId": "general"
    }
  ]
}

Workspace Overview

Each agent has a workspace directory containing configuration files that define its personality, behavior, and knowledge:

~/.openclaw/workspace/
├── SOUL.md        # Core principles and behavioral guidelines
├── IDENTITY.md    # Name, persona, vibe
├── USER.md        # Information about the human
├── AGENTS.md      # Working specifications and rules
├── MEMORY.md      # Long-term curated memory
├── HEARTBEAT.md   # Periodic check task list
├── TOOLS.md       # Local tool configuration notes
├── BOOTSTRAP.md   # First-run initialization instructions
└── skills/        # Agent-specific local skills

Key concept: These files are the agent’s “operating system.” The agent reads them at session start and follows their instructions. Changes take effect immediately — no gateway restart needed.

SOUL.md — Core Principles

SOUL.md is the agent’s constitution — it defines personality, tone, and behavioral boundaries:

# SOUL.md

Be genuinely helpful, not performatively helpful.
Skip the "Great question!" — just help.

Have opinions. An assistant with no personality is just a search engine.

Be resourceful before asking. Try to figure it out first.

Remember you're a guest. Treat access to someone's data with respect.

### Communication Style
- Concise by default, detailed when asked
- Use technical language with developers, plain language with others
- Admit mistakes quickly and fix them

### Safety Rules
- Never expose private data to external services
- Ask before executing destructive commands
- When uncertain, explain the trade-offs and let the human decide

IDENTITY.md — Role Definition

Give your agent a name and persona:

# IDENTITY.md

- **Name**: Jarvis
- **Creature**: AI assistant with a dry sense of humor
- **Vibe**: Reliable, warm, occasionally witty
- **Emoji**: 🤖
- **Language**: Default to English, switch to user's language when they speak

USER.md — User Context

Tell the agent about yourself:

# USER.md

- **Name**: John Doe
- **What to call them**: John
- **Timezone**: America/New_York
- **Occupation**: Software engineer
- **Preferences**:
  - Likes concise answers
  - Prefers TypeScript over JavaScript
  - Uses Vim keybindings
  - Don't disturb after 11pm unless urgent
- **Current projects**:
  - Building a SaaS dashboard (React + Node)
  - Learning Rust on weekends

AGENTS.md — Working Specifications

Define operational rules and session behavior:

# AGENTS.md

### Every Session
1. Read SOUL.md — remember who you are
2. Read USER.md — remember who you're helping
3. Read memory/YYYY-MM-DD.md — recent context

### Safety Rules
- Never leak private data
- Never execute destructive commands without confirmation
- When uncertain, ask before acting

### Group Chat Rules
- Don't reply to every message — quality over quantity
- Only respond when mentioned or when you can add value
- Keep responses shorter in group chats

### Tool Usage
- Prefer built-in tools over skills when possible
- Always verify file paths before writing
- Back up before destructive operations

Active Memory

Active Memory is a blocking memory sub-agent that runs before each response. It retrieves relevant preferences, context, and historical details to enrich the agent’s reply.

How it works:

  1. User sends a message
  2. Active Memory sub-agent runs a semantic search over the memory store
  3. Retrieved memories are injected into the agent’s context
  4. The main agent responds with enriched context

Configuration:

{
  "plugins": {
    "entries": {
      "active-memory": {
        "enabled": true,
        "agents": ["main"],
        "allowedChatTypes": ["direct"],
        "queryMode": "recent",
        "promptStyle": "balanced",
        "timeoutMs": 15000
      }
    }
  }
}
OptionValuesDescription
queryModerecent, semantic, hybridHow to search memories
promptStyleminimal, balanced, verboseHow much memory context to inject
timeoutMsnumberMax time for memory retrieval

Dreaming & Memory Wiki

Dreaming is OpenClaw’s long-term memory consolidation process. Like human sleep, it processes recent experiences and distills them into structured knowledge.

Memory Wiki compiles durable memories into a searchable knowledge vault using a claim / evidence structure:

Claim: "User prefers TypeScript over JavaScript"
Evidence:
  - 2026-01-15: User corrected agent to use .ts extension
  - 2026-02-03: User asked to migrate project to TypeScript
  - 2026-03-10: USER.md updated with TypeScript preference

Wiki commands:

# Initialize the wiki vault
openclaw wiki init

# Ingest memories into the wiki
openclaw wiki ingest

# Compile and resolve contradictions
openclaw wiki compile

# Search the wiki
openclaw wiki search "TypeScript preferences"

# Get a specific claim
openclaw wiki get "user-language-preference"

Configuration:

{
  "plugins": {
    "entries": {
      "memory-wiki": {
        "enabled": true,
        "vaultMode": "isolated",
        "renderMode": "obsidian",
        "search": {
          "backend": "shared"
        }
      }
    }
  }
}

Five-Layer Memory System

OpenClaw’s memory is organized in five layers, from fast/ephemeral to slow/permanent:

LayerNameStorageLifespanUse Case
L0Session contextIn-memorySingle sessionCurrent conversation
L1Daily memorymemory/YYYY-MM-DD.mdDays to weeksWhat happened today
L2Long-term memoryMEMORY.mdPermanentCurated important facts
L3Memory WikiWiki vaultPermanentStructured claims + evidence
L4External knowledgeFiles, databases, webVariesProject docs, web search

Data flow:

Conversation → L0 (session)
    ↓ (end of session)
Daily notes → L1 (memory/YYYY-MM-DD.md)
    ↓ (periodic consolidation)
Curated facts → L2 (MEMORY.md)
    ↓ (wiki compile)
Structured claims → L3 (Memory Wiki)
    ↓ (on demand)
External lookup → L4 (files, web, databases)

Maintenance:

  • Daily: Agent writes to L1 automatically
  • Weekly: Review L1 → promote important items to L2
  • Monthly: Run openclaw wiki compile to consolidate L2 → L3

Multi-Agent Collaboration

For complex workflows, multiple agents can collaborate:

Topology patterns:

PatternDescriptionWhen to Use
StarOne coordinator delegates to N workersGeneral-purpose
SpecialistEach agent owns a domainClear domain boundaries
ReflectorOne agent produces, another reviewsQuality-critical output

Delegation via sessions:

# Agent A delegates to Agent B
sessions_send --agent coding --message "Review this PR"

# Agent A spawns a child agent
sessions_spawn --agent researcher --message "Find the latest benchmarks"

Design principles:

  • Each agent should have a clear, non-overlapping responsibility
  • Use shared workspace files (AGENTS.md) for cross-agent conventions
  • Keep delegation explicit — the user should know when work is handed off
  • Start with one agent; split only when you hit real complexity

Skills Overview

Skills are reusable instruction files that teach your agent how to do specific tasks. They follow the AgentSkills standard and can be installed from ClawHub or written by hand.

Skills vs Tools vs Plugins:

ConceptWhat It IsExample
SkillA methodology / SOP”How to generate a weekly report”
ToolA specific actionexec, read_file, web_search
PluginAdds a capability categoryFeishu plugin, WhatsApp plugin
MCPConnects to external systemsGitHub MCP, Slack MCP

Skill loading priority:

  1. Workspace skills (workspace/skills/)
  2. Global skills (~/.openclaw/skills/)
  3. Bundled skills (shipped with OpenClaw)

ClawHub Ecosystem

ClawHub is the public skill registry for OpenClaw, hosting 5,400+ community skills.

Browsing skills:

# Search for skills
openclaw skills search "web scraping"

# Get info about a specific skill
openclaw skills info deep-research

# List installed skills
openclaw skills list --eligible

Quality filtering: The community-maintained awesome-openclaw-skills list (50k+ stars) applies strict filters:

Filtered OutCount
Spam / bot accounts4,065
Duplicates1,040
Low-quality851
Crypto / finance886
Malicious (security audit)373
Total excluded7,215

Installing & Managing Skills

# Install from ClawHub
openclaw skills install deep-research

# Or via ClawHub CLI (for non-workspace contexts)
npx clawhub install deep-research

# List installed skills
openclaw skills list

# Check a skill for issues
openclaw skills check deep-research

# Update all skills
openclaw skills update --all

# Disable a skill
# In openclaw.json:
# "skills": { "entries": { "deep-research": { "enabled": false } } }

Manual installation:

Copy the skill folder to one of these locations:

ScopePath
Global~/.openclaw/skills/
Workspace<workspace>/skills/

Alternative: Paste a skill’s GitHub URL into your chat and ask the agent to install it.

Skill File Structure

A minimal skill is a single SKILL.md file:

skills/my-skill/
├── SKILL.md          # Required: instructions + frontmatter
├── skill.json        # Optional: metadata
├── scripts/          # Optional: helper scripts
│   └── run.py
└── requirements.txt  # Optional: dependencies

SKILL.md format:

---
name: daily-report
description: Generate a daily work report from git history and task lists
---

# Daily Report Generator

When the user asks for a daily report:

1. Run `git log --since="midnight" --oneline` to get today's commits
2. Check the task list for completed items
3. Format as a structured report:
   - **Completed**: items finished today
   - **In Progress**: items started but not finished
   - **Blocked**: items with unresolved dependencies
   - **Tomorrow**: planned items for next working day
4. Send the report to the configured channel

Environment requirements:

---
name: my-skill
description: My custom skill
metadata:
  openclaw:
    requires:
      bins: ["uv"]
      env: ["API_KEY"]
---

Custom Skill Development

Step 1: Create the skill directory

mkdir -p ~/.openclaw/skills/my-skill

Step 2: Write SKILL.md

---
name: weather-checker
description: Check weather for any city and format a brief forecast
---

# Weather Checker

When asked about weather:

1. Use the `web_search` tool to search for "weather [city] forecast"
2. Extract: temperature, conditions, humidity, wind
3. Format as a brief, readable forecast
4. Include a recommendation (umbrella? sunscreen? jacket?)

Step 3: Test it

Ask your agent: "What's the weather in Tokyo?"

Step 4: Publish to ClawHub (optional)

# Follow the ClawHub publishing guide
# Skills must pass security review before listing

Security & Skill Auditing

Treat third-party skills as untrusted code. Before installing:

  1. Read the sourceopenclaw skills info <skill> shows the skill’s files
  2. Check permissions — does it request access to sensitive tools or env vars?
  3. Run security scan — check the VirusTotal report on ClawHub
  4. Test in isolation — try the skill in a sandboxed workspace first

Recommended security tools:

ToolDescription
VirusTotalBuilt into ClawHub — check each skill’s scan report
Snyk Agent ScannerOpen-source skill security scanner
Agent Trust HubCommunity-maintained trust database

Red flags:

  • Skills that request exec access without clear justification
  • Skills that phone home to unknown endpoints
  • Skills with obfuscated code or encoded strings
  • Skills that request more env vars than their description suggests

Automation Overview

OpenClaw provides four automation pillars that let your agent act proactively:

MechanismMetaphorPrecisionUse Case
CronAlarm clockExact schedule”Every day at 9am”
HeartbeatPeriodic check-inApproximate interval”Check for new emails every 30 min”
Task FlowAssembly lineEvent-driven”When PR is merged → deploy → notify”
WebhooksDoorbellInstant, external trigger”GitHub event → analyze → notify”

Decision guide:

  • Need exact timing? → Cron
  • Multiple checks can batch together? → Heartbeat
  • Multi-step workflow with state? → Task Flow
  • External system triggers the action? → Webhook

Cron Scheduled Tasks

Cron tasks run on a schedule — the most straightforward automation.

Three schedule types:

{
  "cron": {
    "jobs": [
      {
        "name": "one-time-reminder",
        "schedule": { "kind": "at", "at": "2026-06-20T10:00:00+08:00" },
        "payload": { "kind": "agentTurn", "message": "Reminder: team meeting in 30 min" },
        "sessionTarget": "isolated"
      },
      {
        "name": "hourly-check",
        "schedule": { "kind": "every", "everyMs": 3600000 },
        "payload": { "kind": "agentTurn", "message": "Check for new support tickets" },
        "sessionTarget": "isolated"
      },
      {
        "name": "daily-weather",
        "schedule": { "kind": "cron", "expr": "0 7 * * *", "tz": "Asia/Shanghai" },
        "payload": { "kind": "agentTurn", "message": "Check today's weather and send a brief forecast" },
        "sessionTarget": "isolated"
      }
    ]
  }
}

Payload types:

KindDescription
agentTurnRun the agent with a message in an isolated or main session
systemEventInject a system event into the main session

Managing cron jobs:

openclaw cron list              # List all jobs
openclaw cron run --job <id>    # Trigger manually
openclaw cron runs --job <id>   # View execution history

Natural language creation (just tell your agent):

"Create a reminder: every weekday at 9:50am, remind me standup is in 10 minutes"

Heartbeat — Proactive Agent

Heartbeat makes your agent periodically check for things to do, even without user input.

Configure HEARTBEAT.md:

# HEARTBEAT.md

### Checks (rotate through these, don't do all every time)
- [ ] Any urgent unread emails?
- [ ] Calendar events in the next 2 hours?
- [ ] GitHub notifications needing attention?
- [ ] Weather changes worth mentioning?

### Rules
- Only notify the user if something actionable was found
- Stay quiet during 23:00-08:00 unless urgent
- If nothing notable: return HEARTBEAT_OK

Heartbeat vs Cron:

FeatureHeartbeatCron
Timing precisionApproximate (~1 min)Exact
Batch multiple checksYesNo (one task per job)
Session contextShared with main sessionIsolated
Token costLower (batched)Higher (per-job overhead)

Task Flow — Persistent Workflows

Task Flow (v2026.4+) enables multi-step, stateful workflows that survive gateway restarts:

Trigger → Step 1 → Wait for condition → Step 2 → Step 3 → Notify

Example: PR review pipeline

{
  "taskFlow": {
    "name": "pr-review",
    "trigger": { "kind": "webhook", "mapping": "github" },
    "steps": [
      {
        "name": "analyze",
        "action": "agentTurn",
        "message": "Analyze this PR for security issues and code quality"
      },
      {
        "name": "notify",
        "action": "deliver",
        "channel": "telegram",
        "template": "PR Review: {{summary}}"
      }
    ]
  }
}

Key features:

  • State persistence across restarts
  • Error handling with retry policies
  • Conditional branching
  • Human-in-the-loop approval gates

Webhooks — Event Triggers

Webhooks let external systems instantly trigger your agent when events happen.

Setup:

{
  "hooks": {
    "enabled": true,
    "token": "your-secret-token",
    "path": "/hooks",
    "defaultSessionKey": "hook:github",
    "allowedAgentIds": ["main", "hooks"],
    "mappings": [
      {
        "name": "github",
        "action": "agent",
        "agentId": "hooks",
        "deliver": true,
        "channel": "telegram",
        "messageTemplate": "GitHub event: {{action}} on {{repository.full_name}}\nTitle: {{pull_request.title}}{{issue.title}}\nURL: {{pull_request.html_url}}{{issue.html_url}}"
      }
    ]
  }
}

Test with curl:

curl -X POST http://127.0.0.1:18789/hooks/github \
  -H 'Authorization: Bearer your-secret-token' \
  -H 'Content-Type: application/json' \
  -d '{"action":"opened","pull_request":{"title":"Fix auth bug","user":{"login":"alice"},"html_url":"https://github.com/org/repo/pull/42"},"repository":{"full_name":"org/repo"}}'

Security:

  • Generate a random token: openssl rand -hex 24
  • Use nginx reverse proxy to expose /hooks/ path only
  • Inject Authorization: Bearer <token> at the proxy level

Standing Orders

Standing Orders are persistent instructions that apply across all sessions:

# In AGENTS.md or a dedicated file

### Standing Orders
- Always respond in the user's language
- Include code examples in TypeScript unless asked otherwise
- When summarizing, use bullet points, not paragraphs
- Check git status before suggesting file changes

These persist across sessions and restarts, unlike conversation context which is ephemeral.

Tool Profiles

Tool profiles control what tools the agent can use:

ProfileTools EnabledUse Case
messagingChat only, no toolsPure conversation
defaultStandard tools (no exec)Safe daily use
codingCode-related toolsDevelopment work
fullAll tools including execRecommended — full power
allEverything, unrestrictedExperimental
# Switch profile
openclaw config set tools.profile full
openclaw gateway restart

If your agent can chat but can’t execute commands, check that you’re using the full profile.

Deployment Strategies

Choose a deployment strategy based on your needs:

StrategyProsConsBest For
Local laptopSimple, freeNot always onDevelopment, testing
VPS24/7, full controlMonthly cost, maintenanceProduction
DockerPortable, reproducibleSlight overheadAny server
TailscaleSecure remote accessNetwork setupMulti-device
Fly.ioGlobal edge, easy deployCost at scaleLow-latency
Cloud desktopGUI access, managedHigher costEnterprise

Docker Deployment

docker-compose.yml:

version: "3.8"
services:
  gateway:
    image: openclaw/openclaw:latest
    ports:
      - "18789:18789"
    volumes:
      - ./data:/root/.openclaw
    environment:
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    restart: unless-stopped

  cli:
    image: openclaw/openclaw:latest
    volumes:
      - ./data:/root/.openclaw
    profiles:
      - cli
    entrypoint: ["openclaw"]

Best practices:

  • Pin the Docker image tag (don’t use latest in production)
  • Snapshot your skills volume before upgrades
  • Use Docker secrets for API keys instead of environment variables
  • Set resource limits: mem_limit: 2g

Remote Access

# Install Tailscale on both server and client
curl -fsSL https://tailscale.com/install.sh | sh
tailscale up

# Access OpenClaw via Tailscale IP
# http://100.x.y.z:18789

SSH Tunnel

# From your laptop
ssh -L 18789:127.0.0.1:18789 user@your-server

# Then open http://127.0.0.1:18789 locally

nginx Reverse Proxy

server {
    listen 443 ssl;
    server_name claw.yourdomain.com;

    ssl_certificate /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://127.0.0.1:18789;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
}

Health Checks & Monitoring

Home-assistant and Grafana dashboards fed by an OpenClaw agent Agent-driven home automation surfaced in Grafana — via openclaw/openclaw

Quick health check:

openclaw status
# Shows: gateway status, connected channels, active sessions, uptime

Log analysis:

# Real-time logs
openclaw gateway logs --follow

# Filter by level
openclaw gateway logs --level error

# Last 100 lines
openclaw gateway logs --tail 100

Key metrics to monitor:

MetricHealthyWarningCritical
Gateway uptime> 24h< 1hFrequent restarts
API error rate< 1%1-5%> 5%
Memory usage< 500 MB500 MB - 1 GB> 1 GB
Session count< 5050-200> 200
Channel connectivityAll green1 channel down> 1 channel down

Automated health digest:

Configure a Cron job to send a daily health summary to your preferred channel.

Upgrade Process

# Check current version
openclaw --version

# Upgrade to latest
npm update -g openclaw

# Or install specific version
npm install -g [email protected]

# Restart gateway
openclaw gateway restart

Handling breaking changes:

  1. Read the release notes before upgrading
  2. Back up your config: cp -r ~/.openclaw ~/.openclaw.bak
  3. Upgrade in a staging environment first if possible
  4. Check for deprecated config keys after upgrade

Version compatibility:

# Verify CLI and Gateway versions match
openclaw version --check

Backup & Recovery

What to back up:

PathContents
~/.openclaw/openclaw.jsonMain configuration
~/.openclaw/workspace/Agent workspace (SOUL.md, USER.md, memory)
~/.openclaw/agents/Multi-agent state and auth profiles
~/.openclaw/skills/Installed skills

Backup script:

#!/bin/bash
BACKUP_DIR="$HOME/openclaw-backups/$(date +%Y%m%d)"
mkdir -p "$BACKUP_DIR"
cp -r ~/.openclaw/openclaw.json "$BACKUP_DIR/"
cp -r ~/.openclaw/workspace "$BACKUP_DIR/"
cp -r ~/.openclaw/agents "$BACKUP_DIR/" 2>/dev/null
tar czf "$BACKUP_DIR.tar.gz" -C "$HOME/openclaw-backups" "$(basename $BACKUP_DIR)"
rm -rf "$BACKUP_DIR"

Recovery:

# Stop gateway
openclaw gateway stop

# Restore from backup
tar xzf openclaw-backup-20260618.tar.gz -C ~/.openclaw/

# Restart
openclaw gateway start

State Doctor & Troubleshooting

Common issues and fixes:

IssueSymptomFix
Agent is “mute”Can chat but can’t executeSwitch to full tool profile
Gateway won’t startPort already in uselsof -i :18789 → kill process
Channel disconnectedStatus shows offlineCheck credentials, restart gateway
High memory usageAgent slows downClear old sessions, reduce memory retention
API errorsRate limitingCheck API key, switch to fallback model
Session lockAgent stuckopenclaw sessions unlock

Diagnostic flow:

1. openclaw status          → Is gateway running?
2. openclaw gateway logs    → Any errors?
3. Check channel config     → Are credentials valid?
4. Check model config       → Is API key working?
5. Check tool profile       → Is it set to 'full'?

Personal Productivity

Home Assistant integration controlled by an OpenClaw agent Smart-home control delegated to an OpenClaw agent — via openclaw/openclaw

Morning brief:

# HEARTBEAT.md
### Morning (first check after 07:00)
- Check calendar for today's events
- Scan emails for urgent items
- Check weather
- Compile into a single morning brief message

Email triage:

"Check my inbox and categorize emails: urgent (needs reply today), 
important (needs reply this week), and FYI (no action needed). 
Send me a summary of urgent items."

Knowledge capture:

"Save this to my knowledge base: [key insight from conversation]"

Coding Assistant

Codex activity monitored through an OpenClaw agent Monitoring a Codex run through an OpenClaw agent — via openclaw/openclaw

Code review workflow:

"Review the latest PR in my repo. Check for:
1. Security issues
2. Performance problems
3. Code style consistency
4. Missing tests
Give me a structured report."

Project scaffolding:

"Create a new Next.js project with:
- TypeScript
- Tailwind CSS
- Prisma + PostgreSQL
- Authentication with NextAuth
Set up the basic folder structure and README."

Debugging helper:

"I'm getting this error: [paste error]. 
The relevant file is src/auth/middleware.ts. 
Analyze the error, suggest a fix, and explain why it happened."

Creative Applications

Roborock vacuum scheduled by an OpenClaw skill Roborock vacuum choreography driven by a Skill — via openclaw/openclaw

OpenClaw can generate images, videos, music, and speech through the openclaw infer CLI and Skills:

Image generation:

"Generate an image of a sunset over mountains in watercolor style"
# Via CLI
openclaw infer image generate --prompt "sunset over mountains, watercolor" --model nano-banana-pro

Video generation:

openclaw infer video generate --prompt "ocean waves at sunset" --model kling-v2

Text-to-speech:

openclaw infer tts --text "Hello, this is your AI assistant" --voice "alloy"

ComfyUI integration:

For advanced image workflows, connect OpenClaw to a local ComfyUI instance for custom pipelines (ControlNet, IP-Adapter, etc.).

Feishu Integration Recipes

Interactive Cards

Feishu supports rich interactive message cards:

{
  "msg_type": "interactive",
  "card": {
    "header": {
      "title": { "tag": "plain_text", "content": "Daily Report" },
      "template": "blue"
    },
    "elements": [
      {
        "tag": "markdown",
        "content": "**Completed:** 5 tasks\n**In Progress:** 2 tasks\n**Blocked:** 1 task"
      },
      {
        "tag": "action",
        "actions": [
          { "tag": "button", "text": { "tag": "plain_text", "content": "View Details" }, "type": "primary" }
        ]
      }
    ]
  }
}

Weekly Review Card

Automate weekly reviews with a card that shows:

  • Tasks completed this week
  • Tasks planned for next week
  • Blockers and risks
  • One-click approve/reject buttons

Card Callback Handlers

Handle button clicks and form submissions from cards:

{
  "hooks": {
    "mappings": [
      {
        "name": "feishu-card",
        "action": "agent",
        "agentId": "main",
        "messageTemplate": "Card action: {{action.tag}} by {{operator.user_id}} on card {{token}}"
      }
    ]
  }
}

Social Media Automation

Twitter/X monitoring:

# HEARTBEAT.md
### Social media check (every 4 hours)
- Search for mentions of @myaccount
- Check for replies to recent tweets
- If important mention found, notify user with context

Content scheduling:

"Schedule a tweet for tomorrow at 9am: 
'Through the power of OpenClaw, I've automated my morning routine. 
Here's how → [thread]'"

Discord community management:

"Check the #support channel on my Discord server. 
Summarize any unanswered questions from the last 24 hours. 
Draft helpful responses for the top 3 most urgent ones."

Email & Calendar Management

Email automation:

# Cron job: every 2 hours during work hours
{
  "name": "email-check",
  "schedule": { "kind": "cron", "expr": "0 9-18/2 * * 1-5", "tz": "America/New_York" },
  "payload": {
    "kind": "agentTurn",
    "message": "Check my inbox for new emails. Summarize anything urgent. For newsletters, add a one-line summary to my reading list."
  }
}

Smart scheduling:

"Look at my calendar for next week. 
Find a 2-hour block for deep work. 
If there isn't one, suggest reshuffling low-priority meetings."

Voice Integration

OpenClaw can be extended with local TTS for voice output:

Voicebox integration (fully offline):

  1. Install Voicebox TTS engine
  2. Download a TTS model (e.g., Qwen3-TTS)
  3. Set up a FastAPI proxy service
  4. Configure OpenClaw to use the local TTS endpoint

Voice cloning:

1. Collect 10-30 seconds of clean audio sample
2. Upload to Voicebox for voice extraction
3. Configure the cloned voice in OpenClaw's TTS settings

Benefits of local TTS:

  • Zero cost (no API calls)
  • Zero latency (runs on your machine)
  • Full privacy (audio never leaves your device)
  • Custom voice cloning support

Solo Entrepreneur Workflow

OpenClaw can power a one-person business with automated workflows:

Content pipeline:

Topic Research → Draft Writing → Review → Distribution → Analytics
  1. Research: Agent searches trending topics in your niche
  2. Draft: Agent writes a first draft based on your style guide
  3. Review: You review and approve (or request changes)
  4. Distribution: Agent publishes to blog, social media, newsletter
  5. Analytics: Agent tracks engagement and reports weekly

Client delivery:

Client Request → Task Breakdown → Execution → QA → Delivery → Follow-up

Automated invoicing and follow-up:

# Cron: first of every month
"Generate invoices for all billable hours logged last month. 
Send to clients via email. 
Follow up on any unpaid invoices from 30+ days ago."