A good mental model is a layer cake:
- Gateway (daemon) = the OS / “app server”
- One long‑lived process that stays connected to chat surfaces (Discord/Telegram/WhatsApp/etc).
- Owns sessions, routing, auth, and the tool RPC surface.
- Also brokers connections from Control UI/CLI and from Nodes over WebSocket.
Docs: https://docs.openclaw.ai/concepts/architecture
- Agent = the “program” (persona + policies + model)
- An agent run is: system prompt + injected workspace context + eligible skills list + tool schemas + the user message.
- The agent decides what to do, and can call tools.
Docs: https://docs.openclaw.ai/concepts/agent and https://docs.openclaw.ai/concepts/agent-loop
- Tools = typed capabilities (the “syscalls”)
- Tools are function calls the model can invoke (browser, web_fetch, message, cron, nodes, exec, etc).
- Tools are implemented by OpenClaw core or by plugins, and are governed by allow/deny policy.
- Key distinction: tools are real capabilities. If something isn’t a tool, the model can’t “do it” except by talking.