Skip to main content

Messaging Channels

Wunderland agents can communicate across 37 messaging and social platforms through the unified Channel system. Each platform is backed by a ChannelAdapter that normalizes messages into a common ChannelMessage format, allowing your agent to handle conversations identically regardless of the source.

For a complete reference of all 37 platforms including capabilities, required secrets, and setup instructions, see the Complete Channel Reference.

Architecture Overview

User Message (Telegram, Discord, etc.)
|
ChannelAdapter (platform-specific)
|
ChannelRouter (routes to bound agents)
|
StimulusRouter (channel_message stimulus)
|
AgentOS Pipeline (inference, tools, guardrails)
|
ChannelRouter.sendMessage()
|
ChannelAdapter (platform-specific reply)

All channel bindings are stored in the wunderland_channel_bindings database table. Sessions are tracked in wunderland_channel_sessions.

Platform Tiers

Platforms are organized into priority tiers:

TierPlatformsDescription
P0 CoreTelegram, WhatsApp, Discord, Slack, WebChatFirst-class messaging support, fully tested
P0 SocialTwitter/X, Instagram, Reddit, YouTubeFirst-class social media channels
P1 ExtendedSignal, iMessage, Google Chat, TeamsSupported with tested adapters
P1 SocialPinterest, TikTokExtended social media channels
P2 CommunityMatrix, Zalo, Email, SMSCommunity-contributed, well-tested
P3 ExperimentalNostr, Twitch, LINE, Feishu, Mattermost, NextCloud Talk, Tlon, IRC, Zalo PersonalExperimental, community adapters
Sandbox policies

Some adapters require network access (external APIs) and some require host-side CLI execution (for example Signal and Zalo Personal via zca-cli). In the Wunderland runtime, these can be allowed/blocked via security tiers and permission sets.


P0 Core Platforms

Telegram

Full-featured Telegram bot integration via the Bot API.

Required Secrets:

VariableDescription
TELEGRAM_BOT_TOKENBot token from @BotFather

Capabilities: Text, images, files, inline keyboards, reply markup, typing indicators, group chats, message editing.

Setup:

  1. Message @BotFather on Telegram
  2. Send /newbot and follow the prompts
  3. Copy the bot token
  4. Add the token to your Wunderland config:
wunderland channels add telegram --token "1234567890:ABCdef..."

Or set TELEGRAM_BOT_TOKEN in ~/.wunderland/.env.


WhatsApp

WhatsApp integration via the Baileys library (WhatsApp Web protocol).

Required Secrets:

VariableDescription
WHATSAPP_SESSION_DATASerialized session credentials from Baileys

Capabilities: Text, images, files, typing indicators, read receipts, group chats, reactions.

Setup:

  1. Run wunderland channels add whatsapp
  2. Scan the QR code with your WhatsApp mobile app
  3. The session data is automatically saved and encrypted
warning

WhatsApp does not provide an official bot API. This integration uses the WhatsApp Web protocol via Baileys. Use at your own risk and ensure compliance with WhatsApp's Terms of Service.


Discord

Discord bot integration via the Discord.js library.

Required Secrets:

VariableDescription
DISCORD_BOT_TOKENBot token from the Discord Developer Portal

Capabilities: Text, embeds, files, reactions, threads, slash commands, typing indicators, voice channels (audio only).

Setup:

  1. Go to the Discord Developer Portal
  2. Create a new application and add a bot
  3. Enable the Message Content privileged intent
  4. Copy the bot token
  5. Generate an invite URL with the required permissions (Send Messages, Read Message History, Attach Files)
  6. Add to Wunderland:
wunderland channels add discord --token "MTIzNDU2..."

Slack

Slack bot integration via Socket Mode (real-time) or webhooks.

Required Secrets:

VariableDescription
SLACK_BOT_TOKENBot OAuth token (xoxb-*) from Slack API
SLACK_APP_TOKENApp-level token (xapp-*) for Socket Mode
SLACK_SIGNING_SECRETSigning secret for webhook verification

Capabilities: Text, blocks (rich formatting), files, threads, reactions, typing indicators, slash commands, interactive messages.

Setup:

  1. Create a new Slack app at api.slack.com/apps
  2. Enable Socket Mode and generate an app-level token
  3. Add the bot to your workspace with required OAuth scopes:
    • chat:write, channels:history, groups:history, im:history, files:read
  4. Add to Wunderland:
wunderland channels add slack \
--bot-token "xoxb-..." \
--app-token "xapp-..." \
--signing-secret "abc123..."

WebChat

Built-in web-based chat widget served by the Wunderland HTTP server.

Required Secrets: None (built-in).

Capabilities: Text, markdown rendering, file uploads, typing indicators, streaming responses.

Setup:

WebChat is automatically available when you start the Wunderland server:

wunderland start
# WebChat available at http://localhost:3777/chat

No additional configuration is required. The WebChat interface connects via WebSocket to the Wunderland gateway.


P0 Social Platforms

Twitter / X

Twitter/X integration via the official API v2.

Required Secrets:

VariableDescription
TWITTER_BEARER_TOKENBearer token for read-only API access
TWITTER_API_KEYAPI key for OAuth 1.0a (write access)
TWITTER_API_SECRETAPI secret
TWITTER_ACCESS_TOKENUser access token
TWITTER_ACCESS_SECRETUser access secret

Capabilities: Text, images, video, polls, threads, hashtags, engagement metrics, scheduling, content discovery, reactions (likes).

Tools: twitter.post, twitter.reply, twitter.quote, twitter.like, twitter.retweet, twitter.search, twitter.trending, twitter.timeline, twitter.dm, twitter.analytics, twitter.schedule, twitter.thread

Setup:

  1. Apply for a Twitter Developer account
  2. Create a project and app, generate API keys
  3. Add to Wunderland:
wunderland channels add twitter \
--bearer-token "AAA..." \
--api-key "..." --api-secret "..." \
--access-token "..." --access-secret "..."

Instagram

Instagram integration via the Graph API for business accounts.

Required Secrets:

VariableDescription
INSTAGRAM_ACCESS_TOKENInstagram Graph API access token

Capabilities: Text, images, video, stories, reels, carousels, hashtags, DM automation, engagement metrics, content discovery.

Tools: instagram.post, instagram.reel, instagram.story, instagram.dm, instagram.like, instagram.comment, instagram.follow, instagram.hashtags, instagram.explore, instagram.analytics

Setup:

  1. Create a Facebook Developer app linked to an Instagram Business account
  2. Generate a long-lived access token
  3. Add to Wunderland:
wunderland channels add instagram --access-token "IGQV..."

Reddit

Reddit integration via the official API (OAuth2).

Required Secrets:

VariableDescription
REDDIT_CLIENT_IDOAuth2 client ID from Reddit apps
REDDIT_CLIENT_SECRETOAuth2 client secret
REDDIT_USERNAMEReddit account username
REDDIT_PASSWORDReddit account password

Capabilities: Text, rich text, images, video, polls, threads, voting, subreddit channels, engagement metrics, content discovery.

Tools: reddit.post, reddit.comment, reddit.vote, reddit.search, reddit.trending, reddit.subscribe, reddit.inbox, reddit.analytics

Setup:

  1. Go to reddit.com/prefs/apps and create a "script" app
  2. Note the client ID and secret
  3. Add to Wunderland:
wunderland channels add reddit \
--client-id "..." --client-secret "..." \
--username "..." --password "..."

YouTube

YouTube integration via the Data API v3.

Required Secrets:

VariableDescription
YOUTUBE_API_KEYYouTube Data API key

Capabilities: Video upload, YouTube Shorts, comments, search, trending, playlists, analytics, scheduling.

Tools: youtube.upload, youtube.short, youtube.comment, youtube.search, youtube.trending, youtube.analytics, youtube.playlist, youtube.schedule

Setup:

  1. Enable the YouTube Data API v3 in the Google Cloud Console
  2. Create an API key (or OAuth credentials for upload)
  3. Add to Wunderland:
wunderland channels add youtube --api-key "AIza..."

P1 Social Platforms

Pinterest

Pinterest integration via the API v5.

Required Secrets:

VariableDescription
PINTEREST_ACCESS_TOKENPinterest API access token

Capabilities: Images, video, carousels, hashtags, engagement metrics, content discovery, scheduling.

Tools: pinterest.pin, pinterest.board, pinterest.search, pinterest.trending, pinterest.analytics, pinterest.schedule


TikTok

TikTok integration via the API for Business.

Required Secrets:

VariableDescription
TIKTOK_ACCESS_TOKENTikTok API access token

Capabilities: Video upload, reels, reactions, hashtags, engagement metrics, content discovery.

Tools: tiktok.upload, tiktok.trending, tiktok.search, tiktok.analytics, tiktok.engage, tiktok.discover


P1 Extended Platforms

Signal

Signal messenger integration via signal-cli.

Required Secrets:

VariableDescription
SIGNAL_PHONE_NUMBERPhone number registered with Signal for signal-cli

Capabilities: Text, images, files, typing indicators, group chats, reactions, disappearing messages.

Setup:

  1. Install signal-cli: brew install signal-cli or download from GitHub
  2. Register or link a phone number:
signal-cli -u +1234567890 register
signal-cli -u +1234567890 verify 123456
  1. Add to Wunderland:
wunderland channels add signal --phone "+1234567890"

iMessage

iMessage integration via BlueBubbles server (macOS only).

Required Secrets:

VariableDescription
BLUEBUBBLES_SERVER_URLURL of the BlueBubbles server
BLUEBUBBLES_PASSWORDBlueBubbles server password

Capabilities: Text, images, files, tapbacks (reactions), typing indicators, read receipts, group chats.

Setup:

  1. Install BlueBubbles server on a Mac (requires macOS and an Apple ID with iMessage)
  2. Configure the server and note the URL and password
  3. Add to Wunderland:
wunderland channels add imessage \
--server-url "http://192.168.1.50:1234" \
--password "your-password"
tip

BlueBubbles requires a Mac to be running continuously. Consider using a Mac Mini as a dedicated server.


Google Chat

Google Chat integration via a service account and the Google Chat API.

Required Secrets:

VariableDescription
GOOGLE_CHAT_SERVICE_ACCOUNTService account credentials JSON

Capabilities: Text, cards (rich formatting), threads, slash commands, typing indicators.

Setup:

  1. Create a Google Cloud project and enable the Chat API
  2. Create a service account with Chat permissions
  3. Download the service account JSON key
  4. Add to Wunderland:
wunderland channels add google-chat \
--service-account-file "/path/to/service-account.json"

Microsoft Teams

Teams bot integration via the Bot Framework.

Required Secrets:

VariableDescription
TEAMS_APP_IDApplication ID from the Teams bot registration
TEAMS_APP_PASSWORDApplication password/secret

Capabilities: Text, adaptive cards, files, typing indicators, threads, @mentions.

Setup:

  1. Register a bot in the Azure Bot Service
  2. Configure the messaging endpoint to point to your Wunderland instance
  3. Add the bot to your Teams organization
  4. Add to Wunderland:
wunderland channels add teams \
--app-id "your-app-id" \
--app-password "your-app-password"

P2 Community Platforms

Matrix

Matrix protocol integration via the Matrix Client-Server API.

Required Secrets:

VariableDescription
MATRIX_HOMESERVER_URLMatrix homeserver URL (e.g., https://matrix.org)
MATRIX_ACCESS_TOKENAccess token for the bot account

Capabilities: Text, formatted messages (HTML), files, reactions, threads, E2EE rooms (with key management).

Setup:

  1. Create a bot account on your Matrix homeserver
  2. Generate an access token:
curl -X POST "https://matrix.org/_matrix/client/v3/login" \
-H "Content-Type: application/json" \
-d '{"type":"m.login.password","user":"@bot:matrix.org","password":"..."}'
  1. Add to Wunderland:
wunderland channels add matrix \
--homeserver "https://matrix.org" \
--access-token "syt_..."

Zalo

Zalo Official Account integration via the Zalo API.

Required Secrets:

VariableDescription
ZALO_APP_IDApplication ID from Zalo Developers
ZALO_SECRET_KEYSecret key for the Zalo Official Account API

Capabilities: Text, images, files, quick replies, rich messages.

Setup:

  1. Register a Zalo Official Account at oa.zalo.me
  2. Create an app in the Zalo Developer Portal
  3. Add to Wunderland:
wunderland channels add zalo \
--app-id "your-app-id" \
--secret-key "your-secret-key"

Email

Email integration via SMTP (outbound) and IMAP/webhook (inbound).

Required Secrets:

VariableDescription
SMTP_HOSTSMTP server hostname
SMTP_USERSMTP authentication username
SMTP_PASSWORDSMTP authentication password

Capabilities: Text, HTML, attachments, CC/BCC, reply threading.

Setup:

wunderland channels add email \
--smtp-host "smtp.gmail.com" \
--smtp-user "[email protected]" \
--smtp-password "your-app-password"
tip

For Gmail, use an App Password rather than your account password.


SMS

SMS integration via Twilio.

Required Secrets:

VariableDescription
TWILIO_ACCOUNT_SIDTwilio account SID
TWILIO_AUTH_TOKENTwilio authentication token
TWILIO_PHONE_NUMBERTwilio phone number for sending SMS

Capabilities: Text, MMS (images), delivery receipts.

Setup:

  1. Create a Twilio account and purchase a phone number
  2. Add to Wunderland:
wunderland channels add sms \
--account-sid "ACxxxxxxxx" \
--auth-token "your-auth-token" \
--phone-number "+15551234567"

Managing Channels

Listing Channels

# List all configured channel bindings
wunderland channels list

Removing a Channel

# Remove a channel binding by ID
wunderland channels remove <binding-id>

Testing a Channel

# Send a test message through a channel
wunderland channels test <binding-id> --message "Hello from Wunderland!"

Gateway Events

The channel system emits and listens to WebSocket gateway events:

EventDirectionDescription
subscribe:channelClient -> ServerSubscribe to channel updates
channel:sendClient -> ServerSend a message through a channel
channel:messageServer -> ClientIncoming message notification
channel:statusServer -> ClientChannel connection status update