Channel Overview

xbot supports 13 channel backends. Configure via the interactive CLI or edit config.json manually.

xbot config --channel       # Interactive setup
xbot channels list          # List all channels
xbot channels status        # Show enabled/disabled
xbot channels setup slack   # Credential instructions

Delivery Configuration

Global delivery behavior settings applying to all channels:

{
  "channels": {
    "sendProgress": true,
    "sendToolHints": false,
    "sendMaxRetries": 3
  }
}
SettingDefaultDescription
sendProgresstrueSend task progress updates to channel
sendToolHintsfalsefalse = muted notice on first tool call + batch every 10; true = every tool call
sendMaxRetries3Exponential backoff retry count (1s, 2s, 4s...)

Slack

Slack supports two modes: Socket Mode (no public URL needed) and Webhook mode.

Obtaining Credentials

  1. Go to api.slack.com/apps and create an app

  2. Under OAuth & Permissions, add Bot Scopes: chat:write, channels:read, channels:history

  3. Install to workspace, copy Bot Token (xoxb-...)

  4. Socket Mode: Enable on Socket Mode page and create App Token (xapp-...)

Socket Mode (Recommended)

{
  "channels": {
    "slack": {
      "enabled": true,
      "mode": "socket",
      "allowFrom": ["*"],
      "botToken": "xoxb-...",
      "appToken": "xapp-...",
      "replyInThread": true,
      "groupPolicy": "mention"
    }
  }
}
Tip

Socket Mode does not require signingSecret or a public webhook URL.

Telegram

Obtaining Credentials

  1. Find @BotFather in Telegram

  2. Send /newbot to create a bot, receive the token

  3. Set webhook URL to https://<your-domain>/telegram/webhook

{
  "channels": {
    "telegram": {
      "enabled": true,
      "allowFrom": ["*"],
      "token": "<bot-token>",
      "webhookPath": "/telegram/webhook",
      "webhookSecret": "optional-secret",
      "replyToMessage": true,
      "groupPolicy": "mention"
    }
  }
}

Discord

Obtaining Credentials

  1. Go to discord.com/developers/applications, create an app

  2. Bot page → Add Bot → copy token

  3. Enable Message Content Intent (Privileged Gateway Intents)

  4. OAuth2 URL Generator → bot scope + Send Messages → invite to server

{
  "channels": {
    "discord": {
      "enabled": true,
      "allowFrom": ["*"],
      "botToken": "<bot-token>",
      "groupPolicy": "mention"
    }
  }
}

Feishu (Lark)

Obtaining Credentials

  1. Go to open.feishu.cn and create a custom app

  2. Copy App ID and App Secret

  3. Configure request URL in event subscription

{
  "channels": {
    "feishu": {
      "enabled": true,
      "allowFrom": ["*"],
      "appId": "cli_xxx",
      "appSecret": "...",
      "verificationToken": "...",
      "webhookPath": "/feishu/events",
      "groupPolicy": "mention",
      "replyToMessage": true,
      "reactEmoji": "THUMBSUP"
    }
  }
}

DingTalk

  1. Go to open-dev.dingtalk.com and create a robot app

  2. Copy Client ID (AppKey), Client Secret (AppSecret), and Robot Code

{
  "channels": {
    "dingtalk": {
      "enabled": true,
      "allowFrom": ["*"],
      "clientId": "<AppKey>",
      "clientSecret": "<AppSecret>",
      "robotCode": "<Robot Code>"
    }
  }
}

Matrix

  1. Create a bot account on your Matrix homeserver

  2. Obtain access token (e.g., via Element: Settings > Help & About)

  3. Invite the bot to rooms where it should respond

{
  "channels": {
    "matrix": {
      "enabled": true,
      "allowFrom": ["*"],
      "homeserverUrl": "https://matrix.example.com",
      "accessToken": "<token>",
      "userId": "@bot:example.com"
    }
  }
}
Note

End-to-end encrypted rooms (m.room.encrypted) are not supported.

WeCom (Enterprise WeChat)

  1. Log in to work.weixin.qq.com admin console

  2. App Management → Create self-built application

  3. Copy Corp ID, Agent ID, and Secret

{
  "channels": {
    "wecom": {
      "enabled": true,
      "allowFrom": ["*"],
      "corpId": "<corp-id>",
      "agentId": "<agent-id>",
      "secret": "<secret>"
    }
  }
}

WeChat (Personal)

WeChat uses HTTP long-poll with QR code login. No token needed upfront.

  1. Enable the channel in config.json

  2. Run xbot channels login weixin — a QR code URL will be printed

  3. Scan the QR code in WeChat to authorize

{
  "channels": {
    "weixin": {
      "enabled": true,
      "allowFrom": ["*"]
    }
  }
}

QQ

  1. Go to q.qq.com and register as QQ Bot developer

  2. Create bot application, obtain App ID and Secret

{
  "channels": {
    "qq": {
      "enabled": true,
      "allowFrom": ["*"],
      "appId": "<app-id>",
      "secret": "<secret>"
    }
  }
}

MoChat

{
  "channels": {
    "mochat": {
      "enabled": true,
      "allowFrom": ["*"],
      "baseUrl": "https://your-instance.com",
      "clawToken": "<token>",
      "sessions": ["session-id-1"],
      "panels": []
    }
  }
}

Email

Email uses IMAP polling for receiving + SMTP for sending. No public webhook needed.

{
  "channels": {
    "email": {
      "enabled": true,
      "allowFrom": ["*"],
      "imapHost": "imap.example.com",
      "imapPort": 993,
      "imapUsername": "bot@example.com",
      "imapPassword": "...",
      "imapUseSsl": true,
      "smtpHost": "smtp.example.com",
      "smtpPort": 587,
      "smtpUsername": "bot@example.com",
      "smtpPassword": "...",
      "smtpUseTls": true,
      "fromAddress": "bot@example.com",
      "pollIntervalSeconds": 30
    }
  }
}

WhatsApp

WhatsApp connects via a Node.js Baileys bridge over WebSocket.

  1. Install Node.js v18+

  2. Clone Baileys bridge: git clone https://github.com/nicepkg/whatsapp-bridge

  3. cd whatsapp-bridge && npm install && npm start

  4. Scan the QR code displayed in the bridge terminal

{
  "channels": {
    "whatsapp": {
      "enabled": true,
      "allowFrom": ["*"],
      "bridgeUrl": "ws://localhost:3001",
      "bridgeToken": "",
      "groupPolicy": "open"
    }
  }
}
Important

The Baileys bridge must be running before xbot run.