Skip to content

Channels

Channels connect OpenMotoko to messaging platforms. Each channel implements the ChannelAdapter interface and translates platform-specific messages into a common format.

ChannelLibraryAuth Method
TelegramgrammyBot token
Discorddiscord.jsBot token
WhatsAppwhatsapp-web.jsQR session
Slack@slack/boltBot + App tokens
Signalsignal-cliPhone number
iMessageBlueBubbles APIServer password
Google ChatGoogle APIsService account
Microsoft TeamsBot FrameworkApp ID + password
Matrixmatrix-js-sdkUser + password
MattermostREST APIBot token
Feishu / LarkFeishu APIApp ID + secret
LINEMessaging APIChannel token + secret
IRCIRC clientServer + nick
WebchatBuilt-inNo external deps

All channels support these slash commands:

CommandDescription
/statusShow agent status
/newStart a new conversation
/resetClear conversation history
/compactSummarize and compress context
/model <name>Switch model
/think <level>Set thinking depth
/costShow token usage and costs
/helpList commands
  1. Create a bot with @BotFather
  2. Set TELEGRAM_BOT_TOKEN in your .env
  3. Enable the Telegram channel in settings or openmotoko.json

The adapter supports DMs, group messages, mention detection, and a 4096-character message limit.

  1. Create an application at the Discord Developer Portal
  2. Add a bot and copy the token
  3. Set DISCORD_BOT_TOKEN
  4. Invite the bot to your server with message read/write permissions

Supports guild and DM messages, mentions, and media attachments (2000-character limit).

  1. Set WHATSAPP_SESSION_PATH (default ./data/whatsapp)
  2. Start OpenMotoko and scan the QR code that appears in the logs
  3. Session persists across restarts
  1. Create a Slack app at api.slack.com/apps
  2. Enable Socket Mode and create an app-level token
  3. Set SLACK_BOT_TOKEN (xoxb-...) and SLACK_APP_TOKEN (xapp-...)
  1. Install signal-cli on your system
  2. Register or link a phone number
  3. Set SIGNAL_CLI_PATH and SIGNAL_PHONE_NUMBER
  1. Run BlueBubbles Server on a Mac
  2. Set BLUEBUBBLES_URL and BLUEBUBBLES_PASSWORD
  1. Create a service account in Google Cloud Console
  2. Enable the Chat API
  3. Set GOOGLE_CHAT_CREDENTIALS_PATH to the JSON key file
  1. Register a bot in the Azure Bot Framework
  2. Set TEAMS_APP_ID and TEAMS_APP_PASSWORD
  1. Create a bot account on your homeserver
  2. Set MATRIX_HOMESERVER, MATRIX_USER, and MATRIX_PASSWORD
  1. Create a bot account in Mattermost
  2. Set MATTERMOST_URL and MATTERMOST_TOKEN
  1. Create an app in the Feishu developer console
  2. Set FEISHU_APP_ID and FEISHU_APP_SECRET
  1. Create a Messaging API channel in the LINE Developer Console
  2. Set LINE_CHANNEL_TOKEN and LINE_CHANNEL_SECRET
  1. Set IRC_SERVER, IRC_PORT, IRC_NICK, and IRC_CHANNEL
  2. Default port is 6697 (TLS)

The built-in webchat channel works out of the box with no external dependencies. It is the web UI’s chat interface.

You can extend OpenMotoko with third-party channel adapters via the plugin system.

const config = {
channelPlugins: [
{
packageName: '@openmotoko/channel-rocketchat',
config: {
url: 'https://chat.example.com',
token: 'bot-token',
},
},
],
}
export default config
MethodPathDescription
GET/api/channel-pluginsList installed plugins
POST/api/channel-plugins/installInstall by package name
DELETE/api/channel-plugins/:idRemove a plugin

Each channel supports a per-channel policy in openmotoko.json:

{
"channels": {
"telegram": {
"enabled": true,
"policy": {
"dmPolicy": "allowlist",
"allowFrom": ["123456789"],
"requireMention": true
}
}
}
}
PolicyDescription
openAccept messages from anyone
pairingRequire a pairing code
allowlistOnly accept from listed IDs