How OpenClaw Works

The short technical version: one gateway, many channels, persistent workspaces, and tools that can actually do things.

OpenClaw works by routing messages from your preferred chat app into an always-on gateway that adds memory, skills, tools, and workspace rules before asking a selected AI model to answer or execute the task.

OpenClaw is not just an LLM in a chat window. It is an agent runtime that receives messages, keeps context, calls tools, routes models, and executes work inside a real workspace.

Architecture at a glance

Channels (Telegram / Slack / Discord / CLI / ...)
        ↓
Gateway daemon
        ↓
Sessions + memory + workspace rules
        ↓
Tools + skills + browser + shell + APIs
        ↓
Model providers / local models
        ↓
Responses, actions, automations

Core layers

01

Channels in, actions out

OpenClaw sits between your messaging apps and the tools you already use. Telegram, Slack, Discord, WhatsApp, CLI, browser, shell, files, and paired devices all connect through one runtime.

02

Gateway as the control plane

The gateway daemon receives events, maintains session state, exposes RPCs, manages tools, and orchestrates model calls. It is the always-on boundary between humans, channels, and execution.

03

Workspace-driven behavior

Agent behavior is shaped by files like SOUL.md, AGENTS.md, USER.md, and MEMORY.md. The assistant is not a generic chatbot; it is a workspace-specific operator with persistent context.

04

Skills and tools as capabilities

SKILL.md files teach the assistant when and how to use tools. Shell, browser, file editing, APIs, voice, and mobile-node actions are composed rather than hard-coded into one monolith.

05

Model routing without lock-in

OpenClaw can route work across providers and local models. You choose the model strategy that fits cost, latency, privacy, and task complexity.

Why the workspace matters

OpenClaw becomes useful when the assistant can read local rules and state instead of starting from zero every time. A typical workspace looks like this:

SOUL.md

Identity, tone, values, and behavioral defaults for the agent.

AGENTS.md

Workspace rules, safety boundaries, memory policy, and collaboration norms.

USER.md

Lightweight human context: preferences, timezone, naming, priorities.

MEMORY.md

Curated long-term memory that survives fresh sessions.

HEARTBEAT.md

Periodic background checks and proactive maintenance instructions.

This file-based design makes behavior inspectable, versionable, and easy to evolve over time.

Execution model

  • Messages arrive from channels or the CLI.
  • The gateway binds them to a session and loads the right context.
  • The assistant decides whether to answer, use tools, or spawn a sub-agent.
  • Tool calls operate on real files, browsers, services, and devices.
  • Results are written back into the session, and important learnings can be persisted.

That is the real difference versus a generic chatbot: OpenClaw can move from text to action without leaving your operating environment.

Next steps

If you want the quick explainer, start with the overview page. If you want hands-on setup, go straight to the install flow.