How OpenClaw Works: Architecture and Core Concepts
Understand OpenClaw's gateway architecture, message routing, and how channels connect to AI models.
Architecture Overview
OpenClaw follows a gateway architecture. At its core, a single Node.js process acts as a bridge between your messaging channels and AI models.
The Gateway
The gateway is the heart of OpenClaw. It:
- Listens for incoming messages from connected channels (WhatsApp, Telegram, etc.)
- Processes each message through the AI model with context from memory and skills
- Responds back through the same channel
- Executes any tool calls or automations triggered by the conversation
Core Components
Channels
Channels are the messaging platforms OpenClaw connects to. Each channel has its own adapter that handles authentication, message formatting, and delivery. You can run multiple channels simultaneously from a single gateway.
AI Model Integration
OpenClaw connects to AI models through providers like OpenRouter, giving you access to Claude, GPT, Gemini, and dozens of other models. You can switch models at any time without reconfiguring your channels.
Memory System
OpenClaw uses a file-based memory system:
- MEMORY.md — Long-term facts and preferences the AI remembers
- USER.md — Information about you that personalizes responses
- Conversation history — Recent messages for context continuity
Skills
Skills are markdown-based instruction files that teach OpenClaw new capabilities. They define triggers, available tools, and step-by-step instructions — no coding required.
Tools
Tools are the actions OpenClaw can perform:
- read / write / edit — File operations
- web_search / web_fetch — Internet access
- shell — Command execution
- browser — Full web automation
- canvas — Visual rendering
Message Flow
User sends message on WhatsApp
→ Gateway receives via WhatsApp adapter
→ Message added to conversation context
→ AI model processes with memory + skills
→ Response generated
→ Any tool calls executed
→ Final response sent back to WhatsApp
Configuration
OpenClaw stores configuration in openclaw.json, typically located in your workspace directory or ~/.openclaw/. This file controls channel settings, model selection, skill loading, and security permissions.
Ready for your AI assistant?
Get started with Claw for All today. No setup, no terminal, just sign up and go.
Get StartedRelated Guides
What Is OpenClaw? A Complete Beginner's Introduction
Learn what OpenClaw is, how it differs from other AI assistants, and why running your own personal AI agent matters.
Installing OpenClaw on Any Operating System
Step-by-step installation guide for OpenClaw on macOS, Linux, and Windows (WSL2).
Using the OpenClaw Onboarding Wizard
A walkthrough of the openclaw onboard command that configures channels, models, and skills.