Overview
OpenClaw is an open-source, local-first autonomous AI agent platform. It runs as a background process on your hardware, connects to your messaging apps of choice, and executes real tasks via a modular Skills system.
The core architecture has three layers:
Channels
Your messaging apps: Telegram, WhatsApp, Discord, Slack. How you talk to the agent.
Gateway
The local control plane. Manages sessions, routes messages, and dispatches tasks.
Skills
Markdown-defined capabilities stored in your workspace. What the agent can do.
Gateway
The Gateway is the central process of OpenClaw. It listens on port 18789 by default and acts as the orchestration layer â receiving messages, managing agent context, dispatching skill execution, and returning responses.
Managing the Gateway
Dashboard
The dashboard (http://localhost:18789/ui) provides a visual interface for managing sessions, viewing conversation logs, checking agent status, and editing configuration without touching the CLI.
Channels
Channels are the connections between your messaging apps and your OpenClaw agent. You can connect multiple channels to the same agent, or route different channels to different agents.
Adding a channel
Supported channels
Workspace
Each agent has a workspace directory â a local folder containing configuration files that define the agent's persona, behavior, and capabilities.
File structure
workspace/
âââ SOUL.md â Agent persona and system instructions
âââ AGENTS.md â Agent configuration and model settings
âââ skills/
âââ research.md
âââ outreach.md
âââ dev-ops.md
SOUL.md
The SOUL.md file defines your agent's identity, tone, and core behaviors. Think of it as your agent's system prompt â but persistent and version-controlled.
Skills
Skills are Markdown files with YAML frontmatter that define a capability for your agent. Drop a file in workspace/skills/ and your agent automatically discovers it.
Skill anatomy
Available tools
web_search â Search the web for information
web_browser â Browse and extract from URLs
file_read â Read local files
file_write â Create and write files
shell â Execute shell commands
http_request â Call external APIs
Multi-Agent Routing
OpenClaw supports multiple isolated agents on a single installation. You can route different channels to different agents â for example, a "work" agent on Slack and a "personal" agent on Telegram.
Each agent has its own workspace directory, SOUL.md, and skills folder â completely isolated.
Heartbeat Scheduler
The heartbeat system allows your agent to perform tasks autonomously on a schedule â without you sending a message. Define recurring tasks directly in your SOUL.md.
CLI Reference
openclaw onboard
Run the interactive setup wizard
openclaw gateway status
Check gateway health and status
openclaw channels add
Add a new messaging channel
openclaw agents bind
Bind a channel to a specific agent
openclaw doctor
Run full health check and diagnostics
openclaw dashboard
Open the browser-based control panel
Security Best Practices
- Always use dedicated bot accounts â never your personal Telegram/WhatsApp/Discord
- Run on isolated hardware or a sandboxed VM for production use
- Review skills before activating them, especially those using the
shelltool - Run
openclaw doctorregularly to detect misconfigured DM policies - Use the Dashboard to audit agent activity and review conversation logs
- Rotate API keys periodically and use environment variables rather than hardcoding