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.
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.
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.
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.
| File | Purpose |
|---|---|
SOUL.md | Personality and identity |
AGENTS.md | How the workspace works |
USER.md | Who the primary user is |
IDENTITY.md | Name, model, appearance |
TOOLS.md | Tool 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.
Telegram
Discord
Slack
Signal
Web chat
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.