Messaging Channels

S
Slack
3 workspaces
D
Discord
2 servers
T
Telegram
5 chats
W
WhatsApp
8 contacts
M
Teams
1 tenant

Quick Messages

A2A Pattern
Event Log
Sessions

Agent-to-Agent Gateway

OpenClaw operates a local WebSocket gateway at ws://127.0.0.1:18789 that bridges 25+ messaging platforms with a fleet of specialized AI agents.

How It Works

1. A message arrives from any connected channel (Slack, Discord, Telegram, etc.) via its platform adapter.

2. The gateway deserializes the message and routes it to the appropriate agent based on intent classification and session state.

3. Agents can invoke tools (calendar, email, web search) through the MCP protocol. Sensitive tool calls require user approval.

4. Agents broadcast beliefs and share task boards for coordination. The gateway acts as a supervisor, routing between specialized agents.

Key Concepts

Session -- Each user-channel pair maintains a persistent session with shared state across agents.

MCP Protocol -- Structured data exchange format enabling agents to call tools and share results.

Event Streaming -- Real-time SSE/WebSocket streams let agents observe and react to each other's actions.

Approval Workflow -- Destructive or sensitive tool calls pause for human-in-the-loop confirmation.

Tool Call Approval