OpenClaw System Architecture
Self-hosted AI assistant platform — Gateway-centric control plane
v1.0 — February 2026
Derived from source & docs
External
Users & LLMs
👤End UsersPhone / Desktop / Web
🤖LLM ProvidersAnthropic · OpenAI · Google · OpenRouter · Local
🌐External ServicesBrave Search · Gmail · Webhooks
🔑Auth / OAuthAPI Keys · OAuth tokens · Codex
Platform APIs · HTTPS · E2EE
Messaging
Channels
Inbound / Outbound
📱WhatsAppBaileys · QR pair
✈️TelegramgrammY · Bot API
💬DiscordBot API + Gateway
🏢SlackBolt SDK
🔒Signalsignal-cli
🍎iMessageBlueBubbles
📧Google ChatHTTP webhook
🖥️WebChatGateway WS
⌨️TUITerminal UI
🔌Plugin ChannelsMS Teams · LINE · Matrix · Mattermost · Nostr · Twitch · Zalo …
Normalized messages · Media · Reactions · Channel routing
Gateway
Control Plane
WebSocket :18789
Core Services
WebSocket ServerJSON protocol · TypeBox schemas
🔀Protocol Routerreq/res · events · idempotency
🛡️Auth & PairingToken · Password · Device pairs
Orchestration
📋Session Storesessions.json · routing
🗓️Cron SchedulerJobs · heartbeat
Clients
🖥️macOS App
⌨️CLI
🌐Control UI
📊Dashboard
Multi-Agent
🧠Agent RouterBindings · channel mapping
📨Queue LanesPer-session serialization
Network
🔗Tailscale / VPN
📡Bonjour / mDNS
agent RPC · runEmbeddedPiAgent() · streaming events
Agent
Runtime
Pi SDK embedded
Agent Loop (pi-coding-agent)
🔄AgentSessioncreateAgentSession()
📝System PromptbuildAgentSystemPrompt()
📊Context AssemblySkills · bootstrap · workspace
Model Layer (pi-ai)
🎯Model RegistryResolve · failover chain
🔑Auth ProfilesRotation · cooldown · pin
Tool Execution
⚙️execShell · background
📂read / write / edit
🌍browserCDP · Chromium
💬message
🔍web_search
🖼️image
Session
📜SessionManagerJSONL transcripts · tree
🗜️CompactionAuto + manual
node.invoke · canvas.* · camera.* · system.run
Peripherals
Nodes & Canvas
Node Devices
🖥️macOS NodeMenubar · exec · camera
📱iOS NodeCanvas · camera · location
📱Android NodeCanvas · camera · location
🖧Headless HostRemote exec · build
Canvas & A2UI
🎨Canvas Host :18793HTML · A2UI v0.8
🖌️WKWebView RendererDeclarative JSON UI
Skills · Hooks · Plugins · Memory index
Extensions
Skills · Plugins
Hooks · Memory
📘SkillsAgentSkills-compat · SKILL.md
🔌Plugin RegistrySDK + Runtime API
Hooks EngineLifecycle · commands · events
🧠Memory SearchBM25 + vector · hybrid
📦ClawHubSkills registry
🐙LobsterWorkflow runtime
Filesystem I/O · SQLite
Persistence
~/.openclaw/
⚙️openclaw.jsonConfiguration
📋sessions.jsonSession metadata
📜*.jsonlTranscripts (tree JSONL)
📝workspace/AGENTS · SOUL · MEMORY
🔑auth-profiles.jsonKeys · OAuth · per-agent
🗄️memory/*.sqliteVector index · FTS5
🗓️cron/jobs.jsonScheduled jobs
Legend
Channels
Gateway
Agent Runtime
Peripherals
Extensions
Persistence
Core component
Bidirectional data flow