Getting Started
🔧

How OpenClaw Works: Architecture and Core Concepts

Understand OpenClaw's gateway architecture, message routing, and how channels connect to AI models.

7 min read|
openclaw architecturegatewaymessage routing

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:

  1. Listens for incoming messages from connected channels (WhatsApp, Telegram, etc.)
  2. Processes each message through the AI model with context from memory and skills
  3. Responds back through the same channel
  4. 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.

openclaw architecturegatewaymessage routingai agenthow openclaw works

Ready for your AI assistant?

Get started with Claw for All today. No setup, no terminal, just sign up and go.

Get Started

Related Guides