Architecture

One Gateway (BRAIN), many nodes, and how messages and connectivity flow.

Answer a few questions on the home page to get setup suggestions tailored to your budget and goals.

How a message gets a reply

Every message hits the Gateway first; the agent runs and calls your chosen model (API or local).

Request flow

ChannelWhatsApp/TGGateway18789AgentModelAPI / Ollama

One Gateway, many nodes

OpenClaw uses a single Gateway (port 18789) that owns all channels (WhatsApp, Telegram, etc.) and the control plane. Nodes are other machines that connect over WebSocket and provide device capabilities. Run the Gateway on one Mac mini (the BRAIN) and agents on others—that’s chaining.

BRAIN + agent nodes

BRAINGateway :18789Ollama (backup)Mac miniAgent 1Node (WS)Mac / LinuxAgent 2Mac / LinuxClientsWebChat / CLIWhatsApp / TG

BRAIN: backup local model

The BRAIN runs the Gateway and optionally a local model (e.g. Ollama with gpt-oss:20b or llama3.1:8b). If the API is down or you want to stay local, the agent can still reason. One Mac mini = BRAIN = Gateway + optional Ollama; other Macs = agent nodes.

Connectivity: Thunderbolt & LAN

Mac minis have Thunderbolt 4 (40 Gb/s); M4 Pro has Thunderbolt 5 (120 Gb/s). Use TB4/USB4 NVMe enclosures on the BRAIN for fast external model storage. Between machines: Ethernet or Tailscale for the Gateway; no need to expose ports to the internet.

Connectivity (Thunderbolt / LAN)

BRAINMac miniTB4 / EthernetAgentMac miniLAN / Tailscaleor TB4 dock + EthernetExternal NVMe (TB4) on BRAIN
  • Bind the Gateway to LAN: openclaw config set gateway.bind lan
  • Agent machines connect to the BRAIN’s IP (or Tailscale hostname).

Chaining Mac minis

  1. Run Gateway + optional Ollama on one Mac mini (BRAIN).
  2. On other Mac minis, run OpenClaw in node mode, connecting to the BRAIN’s Gateway via LAN or Tailscale.
  3. Use gateway.bind lan so nodes can reach it.

Multi-agent and memory

For 24/7 fleets, use file-based memory (MEMORY.md, IDENTITY.md, daily logs) and per-task sessions. Enable compaction to avoid context overflow. See Best Practices and the multi-agent guide.