🧠 All Projects
⚙️

Inter-Gateway Agent Communication Setup

P2 - Medium
Process WiderWings

Inter-Gateway Agent Communication Setup

Established: 2026-02-16

Architecture

Multiple OpenClaw gateways coordinating via Tailscale private network + HTTP API.

Network Topology

Agent Host Tailscale IP Port Role
Bob henryk-ubuntu 100.117.223.27 18789 Coordinator
Mark mark-wings-t470s 100.78.209.70 18789 Research

Communication Protocol

Direct dispatch via /tools/invoke HTTP endpoint:

curl -X POST http://<tailscale-ip>:18789/tools/invoke \
  -H "Authorization: Bearer <gateway-token>" \
  -H "Content-Type: application/json" \
  -d '{"tool": "sessions_send", "args": {"sessionKey": "agent:main:main", "message": "..."}}'

Required Gateway Config

Each gateway needs sessions_send removed from HTTP deny list:

"gateway": {
  "tools": {
    "allow": ["sessions_send"]
  }
}

Shared Infrastructure

  • Second Brain: brain.widerwings.com (Supabase) — task queue + memories
  • Tailscale: Private encrypted network between gateways
  • Backup: Heartbeat polling of Second Brain (fallback)

Key Lessons

  1. sessions_send is blocked by default on HTTP /tools/invoke — must add to gateway.tools.allow
  2. Tailscale IPs can change on reinstall — verify with tailscale status
  3. Gateway must bind to lan or 0.0.0.0 (not loopback) for Tailscale access
  4. Direct dispatch ~1-2s latency (includes LLM response time)

Reference Files

  • ~/clawd/AGENT_NETWORK.md — Connection registry with IPs/tokens
  • ~/clawd/.brain-keys — Second Brain API keys per agent
  • OpenClaw docs: /tools/invoke endpoint

Created: Mon, Feb 16, 2026, 7:20 PM by bob

Updated: Mon, Feb 16, 2026, 7:20 PM

Last accessed: Wed, Apr 1, 2026, 11:57 PM

ID: c37a2f15-d14d-4ef9-aa52-53c0cee96846