LeoYeAI/agent-master-skills / skills/bengii-gemini-fix
openclaw
FlaggedComprehensive guide for installing, configuring, operating, and troubleshooting OpenClaw — a self-hosted, multi-channel AI agent gateway. Use when the user asks about OpenClaw setup, configuration, channel management (WhatsApp/Telegram/Discord/Slack/iMessage/etc.), model provider setup, Gateway operations, multi-agent routing, security hardening, troubleshooting, or any maintenance task related to their local OpenClaw installation. Also use when encountering errors from `openclaw` CLI commands or the Gateway daemon.
references/channel_routing.md
View on GitHub# Channel Routing Reference
> Source: https://docs.openclaw.ai/channels/channel-routing
## Key Terms
| Term | Meaning |
|---|---|
| **Channel** | `whatsapp`, `telegram`, `discord`, `slack`, `signal`, `imessage`, `webchat`, `mattermost`, `bluebubbles` |
| **AccountId** | Per-channel account instance (when supported) |
| **AgentId** | Isolated workspace + session store ("brain") |
| **SessionKey** | Bucket key for context and concurrency control |
### Default Account
- `channels.<channel>.defaultAccount` chooses which account is used when outbound path has no `accountId`.
- In multi-account setups: must set explicit default (`defaultAccount` or `accounts.default`).
## Session Key Shapes
| Pattern | Example |
|---|---|
| Main DM | `agent:main:main` |
| Group | `agent:main:whatsapp:group:<id>` |
| Channel/Room | `agent:main:discord:channel:<id>` |
| Slack/Discord thread | `...base:thread:<threadId>` |
| Telegram forum topic | `...group:<id>:topic:<topicId>` |
Examples:
```
agent:main:telegram:group:-1001234567890:topic:42
agent:main:discord:channel:123456:thread:987654
```
## Main DM Route Pinning
- Controlled by `session.dmScope` (default: `main`).
- `lastRoute`: uses last DM route.
- When `allowFrom` has exactly one non-wildcard entry that can be normalized to a concrete sender ID, and the inbound DM sender doesn't match — the DM is pinned to that owner.
## Routing Rules (Agent Selection)
Resolution order (first match wins):
1. **Exact peer match** — `bindings` with `peer.kind` + `peer.id`
2. **Parent peer match** — thread inheritance
3. **Guild + roles match** (Discord) — `guildId` + `roles`
4. **Guild match** (Discord) — `guildId`
5. **Team match** (Slack) — `teamId`
6. **Account match** — `accountId` on the channel
7. **Channel match** — any account on that channel (`accountId: "*"`)
8. **Default agent** — `agents.list[].default`, else first list entry, fallback to `main`
## Broadcast Groups (Multiple Agents)
Run multiple agents for the same conversation:
```json5
{
broadcast: {
strategy: "parallel",
"120363403215116621@g.us": ["alfred", "baerbel"],
"+15555550123": ["support", "logger"],
},
}
```
## Mattermost Channel
> Source: https://docs.openclaw.ai/channels/mattermost
### Setup
```bash
openclaw plugins install @openclaw/mattermost
```
```json5
{
channels: {
mattermost: {
enabled: true,
botToken: "mm-token",
baseUrl: "https://chat.example.com",
dmPolicy: "pairing",
},
},
}
```
### Features
- Native slash commands via plugin
- Access control for DMs (pairing/allowlist)
- Channel/group support
- Reactions and interactive buttons via message tool
- Directory adapter for user resolution
- Multi-account support
## BlueBubbles (iMessage) Channel
> Source: https://docs.openclaw.ai/channels/bluebubbles
### Overview
- Runs on macOS via BlueBubbles helper app ([bluebubbles.app](https://bluebubbles.app))
- Recommended: macOS Sequoia (15); macOS Tahoe (26) works with known limitations
- Communicates via REST API
- Incoming via webhooks; outgoing via REST calls
### Quick Start
```json5
{
channels: {
bluebubbles: {
enabled: true,
serverUrl: "http://192.168.1.100:1234",
password: "example-password",
webhookPath: "/bluebubbles-webhook",
},
},
}
```
Point BlueBubbles webhooks to: `https://your-gateway-host:3000/bluebubbles-webhook?password=<password>`
### Security
- Webhook authentication is always required.
- OpenClaw rejects webhook requests without matching `channels.bluebubbles.password`.
- Password checked before reading/parsing webhook bodies.
### Features
- Typing + read receipts
- Reactions (surfaced as system events)
- Edit, unsend, reply threading
- Message effects
- Group management
- Block streaming support
- Media + limits (per WhatsApp-style pipeline)
## See Also
- [channels.md](channels.md) — All channel setup guides
- [channel_troubleshooting.md](channel_troubleshooting.md) — Per-channel troubleshooting
- [multi_agent.md](multi_agent.md) — Multi-agent routing configuration
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |