OpenClaw Gateway

OpenClaw Gateway

The Gateway is the central control plane in OpenClaw's hub-and-spoke architecture. It routes messages from all inbound sources (channel adapters, control interfaces) to the Agent Runtime and returns responses.

Binding & Network

Hub-and-Spoke Design

Channel Adapters ─┐
                  ├─→ Gateway (control plane) ─→ Agent Runtime
Control Interfaces┘

openclaw-arch-hub-and-spoke.png

All traffic passes through the Gateway; adapters and interfaces do not talk to the runtime directly.

Channel Adapters

Platform-specific connectors that handle:

Supported platforms: WhatsApp, Telegram, Discord, Slack, iMessage, and others.

Control Interfaces

Human-facing surfaces that connect to the Gateway:

Six-Phase Execution Flow

Each inbound message traverses these phases inside the Gateway + Runtime:

Phase Description
1. Ingestion Message received from channel adapter or control interface
2. Access control & routing Auth check, channel allowlist, session lane assignment
3. Context assembly Session history + system prompts + memory retrieval (see Context Assembly)
4. Model invocation Assembled context sent to LLM
5. Tool execution Tool calls dispatched, results collected
6. Response delivery Formatted reply routed back through originating adapter

openclaw-arch-end-to-end-message-flow.png

Plugin System

Extension points exposed by the Gateway for channels, memory systems, tools, and provider plugins.

openclaw-arch-plugin-system.png

Multi-Agent Routing

Different channels can be routed to isolated agent instances with independent workspaces and models.

openclaw-arch-multi-agent-routing.png