# Channel Routing

OpenClaw's channel routing system deterministically directs replies back to their originating channel. The system uses agents as isolated workspaces that handle messages across multiple platforms including WhatsApp, Telegram, Discord, Slack, Signal, iMessage, and WebChat.

## Key Components

### Channels & Session Management

The platform organizes conversations through session keys that vary by context. Direct messages use a main session structure (`agent:main:main`), while group conversations and threaded discussions receive isolated keys incorporating channel and conversation identifiers.

### Routing Priority

Message routing follows a hierarchical matching system:
1. Exact peer match (highest priority)
2. Guild/team matching
3. Account-level routing
4. Channel-level defaults
5. Fallback to the primary agent configuration

### Multi-Agent Broadcasting

For scenarios requiring simultaneous agent responses, the broadcast groups feature enables "parallel" execution across multiple agents for a single message - useful for support workflows combining human agents with logging systems.

## Storage & Configuration

Session data persists in `~/.openclaw/agents/<agentId>/sessions/`, supporting both JSON session stores and JSONL transcripts.

Configuration relies on two primary structures:
- `agents.list` for agent definitions
- `bindings` for mapping inbound channels to specific agents

### WebChat Integration

WebChat instances attach to selected agents and default to main sessions, enabling cross-channel context visibility within a single interface.
