Spark Learn

Explainer · ORCHESTRATION / DEEP

Inside OpenClaw

An operating system for agents, not a chatbot. One gateway, many agents, every channel. See how the pieces fit and how a message flows through them.

Updated 2026-05-29 Spark Learn

OpenClaw is an operating system for agents, not a chatbot framework. One long-running gateway runs many isolated agents across every channel you use. Here is how the pieces fit.

GATEWAY one process CHANNELS where users are AGENTS isolated workspaces SESSIONS conversation state TOOLS the agent's hands MEMORY just files

The gateway is the one process always running. Everything else, channels in, tools and replies out, hangs off it.

How a message flows

From a message on WhatsApp to a reply, every message takes the same path. Step through it.

01 / 08

Message

A user sends a message on whatever channel they already use.

Memory is just files

No database, no proprietary format. An agent’s memory is Markdown files it reads and writes, in two layers.

MEMORY.md

Long-term memory: preferences, relationships, persistent facts. The agent updates it as it learns.

memory/YYYY-MM-DD.md

Daily logs: one file per day, auto-created. Good for “what did we discuss yesterday?”.

workspace/
├── MEMORY.md              // long-term memory
└── memory/
    ├── 2026-05-28.md      // daily log
    └── 2026-05-29.md

Retrieval is hybrid (keyword + vector) search over those chunks. Before the context window compacts, the agent flushes what matters back to disk.

An agent is a workspace

Each agent is a workspace plus state plus its own sessions, fully isolated from every other agent. A handful of Markdown files define who it is.

FilePurpose
SOUL.mdPersonality and identity
AGENTS.mdHow the workspace works
USER.mdWho the primary user is
IDENTITY.mdName, model, appearance
TOOLS.mdTool usage notes

Bindings route incoming messages to the right agent by channel, account, and peer pattern:

{ channel: "whatsapp", accountId: "31612345678" }
{ channel: "telegram", peer: "jonas_*" }   // peer pattern

Lives on every channel

One gateway, many channels at once. An agent reaches you where you already are.

WhatsApp

End-to-end encrypted messaging

Telegram

Bot API with rich formatting

Discord

Server and DM support

Slack

Workspace integration

Signal

Privacy-focused messaging

Web chat

Browser-based interface

The agent’s tools

Tools are the agent’s hands. Beyond chat, an agent can act:

exec        # run shell commands       browser     # control a web browser
read        # read files               web_search  # search the web
write       # write files              message     # send messages
nodes       # control paired devices   canvas      # present UI to the user

It can also spawn sub-agents for background work and run cron jobs: morning briefings, overnight queues, weekly reviews.