Channels
A channel is a messaging connector. Talon normalizes inbound messages from every channel into a common format, routes them to the bound persona, and converts responses back to the channel’s native formatting.
Common options
Section titled “Common options”Every channel entry accepts these fields regardless of type:
| Field | Default | Description |
|---|---|---|
name | required | Unique identifier. Used in bindings and capability labels |
type | required | Connector type: telegram, slack, whatsappBaileys, whatsappBusiness, discord, email, or terminal |
enabled | true | Disable a channel without removing it from config |
showToolCalls | false | Send a status message on each tool call (useful for debugging) |
config | {} | Connector-specific settings (see below) |
channels: - name: my-slack type: slack enabled: true showToolCalls: true # sends a message like "Using Brave Search: web search" on each tool call config: botToken: ${SLACK_BOT_TOKEN} appToken: ${SLACK_APP_TOKEN} signingSecret: ${SLACK_SIGNING_SECRET}The channel name browser-voice is reserved when voice.enabled is true. Talon uses it for the internal voice channel and rejects a config that gives an ordinary channel that name. See Browser Voice.
Replies, threads and reactions
Section titled “Replies, threads and reactions”Telegram, WhatsApp Baileys and WhatsApp Business support native replies and emoji reactions in both directions.
The agent sees a reply or a reaction as one bracketed line at the top of the message:
[Replying to your message (id 4521): "Shall I book the 14:00 slot?"]yes please
[Reaction: the user reacted with 👍 to your message (id 4521): "Shall I book the 14:00 slot?"]The (id …) value is the channel’s own message ID. The agent passes it to channel_react, or to channel_send as replyTo.
| What | How it works |
|---|---|
| A user replies to a message | The target is resolved from Talon’s message ledger and shown in the header |
| Talon answers as a reply | Controlled per connector by replyToTrigger. Only the first message of an answer quotes |
| Talon reacts | The channel_react tool, gated by the channel.react:* capability |
| Talon stays silent | A response that is only NO_REPLY is not delivered |
| A user reacts to a Talon message | Starts an agent run with the reaction as the message. Disable with inboundReactions: false |
Limits:
- Only reactions on messages Talon sent are forwarded. Reactions on other messages, and removed reactions, are ignored.
- Messages sent or received before the message ledger existed cannot be resolved. A reply to one is shown as “an earlier message”, and a reaction on one is ignored.
- Each forwarded reaction costs one agent run.
See channel_react in the host tools reference.
Telegram
Section titled “Telegram”Long-polling connector using the Telegram Bot API. Create a bot with @BotFather and get a token.
channels: - name: my-telegram type: telegram enabled: true config: botToken: ${TELEGRAM_BOT_TOKEN} pollingTimeoutSec: 30 allowedChatIds: - '123456789' # your Telegram chat ID, as a string| Config field | Description |
|---|---|
botToken | Bot token from @BotFather |
pollingTimeoutSec | Long-poll timeout in seconds (default: 30) |
allowedChatIds | Allowlist of chat IDs that can message the bot. Write the IDs as strings |
allowGroupChats | Allow group and supergroup chats (default: false) |
requireMention | Whether a group message must address the bot with an @mention, a trigger word, or a reply to the bot (default: true). Set false to answer every message in the allowed groups |
triggerWords | Prefix words that trigger a response. Talon strips the matched prefix before the message reaches the agent |
replyToTrigger | When an answer is sent as a native reply to the message that triggered it: groups (default), always, or never |
inboundReactions | Forward user reactions on Talon’s messages to the agent (default: true) |
chats | Per-chat overrides of requireMention and replyToTrigger, keyed by chat ID or by <chat_id>:<topic_id> for one topic. The topic entry wins over the chat entry. Does not admit the chat |
Format: MarkdownV2. Bold, italic, inline code, and code blocks render natively in Telegram.
Thread mapping: Each Telegram chat_id is a separate conversation thread with its own memory. A message inside a forum topic uses <chat_id>:<topic_id>, so every topic is its own conversation. To use a forum group as a set of separate conversations, with an optional persona per topic, follow the Telegram topic workspaces guide.
Replies and reactions: Native replies and emoji reactions work in both directions. See Replies, threads and reactions. Telegram delivers user reactions in private chats, and in groups only where the bot is an administrator.
/chatid: Send /chatid (or /chatid@YourBotName) and the bot answers with the chat ID, the topic ID and the Talon thread key. The connector answers it. The agent never sees it.
Images: Talon accepts photos and image documents, with or without a caption. See Images.
Group chats
Section titled “Group chats”Add the bot to a Telegram group or community and have it respond only when addressed:
channels: - name: my-telegram type: telegram enabled: true config: botToken: ${TELEGRAM_BOT_TOKEN} allowGroupChats: true triggerWords: - '@Talon' - '!talon'In groups, the bot only responds when:
- It is @mentioned by username. Talon detects this through Telegram’s
entitiesarray for exact matching (@talondoes not match@talon2). - A
triggerWordsprefix matches. This is the fallback when there is no mention. - Someone replies to one of the bot’s own messages. A native reply addresses the bot in the same way as a mention.
With requireMention: false the bot answers every message in the allowed groups. Two conditions apply:
- The bot must be a group administrator, or Group Privacy must be off in BotFather. Otherwise Telegram does not deliver ordinary group messages.
- Set
allowedChatIdstogether with it, or the bot answers in any group it is added to.
A group that sends messages while allowGroupChats is off is reported one time in the log, with its chat ID.
Talon strips the matched mention or trigger word before the message reaches the agent, so @Talon what's the weather? becomes what's the weather?.
In direct messages, triggerWords also applies when configured. Otherwise all messages pass through.
Event-driven connector using Slack’s Socket Mode. Requires a Slack app with the appropriate OAuth scopes.
channels: - name: my-slack type: slack enabled: true config: botToken: ${SLACK_BOT_TOKEN} appToken: ${SLACK_APP_TOKEN} signingSecret: ${SLACK_SIGNING_SECRET}| Config field | Description |
|---|---|
botToken | Bot user OAuth token (xoxb-...). Needs chat:write, app_mentions:read |
appToken | App-level token (xapp-...) for Socket Mode. Needs connections:write |
signingSecret | Signing secret for request verification |
defaultChannel | Optional fallback channel ID for cross-channel sends that do not include a Slack channel ID |
botUserId | Optional bot user ID (U...). Validated against auth.test at startup and used for shared-channel @mention filtering |
Required Slack app permissions:
- OAuth scopes:
app_mentions:read,channels:history,chat:write,im:history,im:write - Event subscriptions:
message.im,app_mention - Enable Socket Mode in your app settings
Format: Slack mrkdwn (*bold*, _italic_, `code`).
Thread mapping: channel_id:thread_ts. Slack threads map to Talon threads.
Shared-channel behavior
Section titled “Shared-channel behavior”When multiple Slack bots share the same channel, Talon keeps them from all replying at once:
- Top-level channel messages are only processed if they @mention that connector’s own bot user ID
- Thread replies always pass through without requiring a fresh @mention
- DMs always pass through without requiring an @mention
- Messages from bots are always dropped
If you know the bot user ID up front, set botUserId in config. Talon validates the token-to-bot mapping during startup and fails fast if they do not match:
channels: - name: slack-engineer type: slack enabled: true config: botToken: ${SLACK_ENGINEER_BOT_TOKEN} appToken: ${SLACK_ENGINEER_APP_TOKEN} signingSecret: ${SLACK_ENGINEER_SIGNING_SECRET} botUserId: U01XXXXXXXWhatsApp Baileys
Section titled “WhatsApp Baileys”WhatsApp Web bridge via the Baileys library. It needs no Meta Business account and authenticates like a regular WhatsApp Web client.
Baileys is an optional dependency. Install it before using this connector:
npm install @whiskeysockets/baileys| Config field | Description |
|---|---|
authDir | Directory for the saved session credentials (default: ./baileys-auth) |
allowedSenders | Allowlist of bare sender IDs. When empty or omitted, all senders are accepted |
selfChat | Listen only in your own “Message Yourself” thread (default: false) |
triggerWords | Case-insensitive prefixes that must start a message. Talon strips the matched prefix |
allowGroupChats | Allow group chats (default: false). Requires triggerWords |
markOnlineOnConnect | Mark the account as online when connecting (default: false) |
browser | Optional [clientName, browserName, version] tuple shown in the Linked Devices list |
replyToTrigger | When an answer quotes the message that triggered it: groups (default), always, or never |
inboundReactions | Forward user reactions on Talon’s messages to the agent (default: true) |
Replies and reactions: Quoted replies and emoji reactions work in both directions. See Replies, threads and reactions.
Images: Talon accepts images and image documents. See Images.
Dedicated number
Section titled “Dedicated number”Use a second WhatsApp number as the bot account. Others message the bot number directly.
channels: - name: my-whatsapp type: whatsappBaileys enabled: true config: authDir: ./baileys-auth allowedSenders: - '96490886312027' # sender ID from logs (see below)Self-chat mode
Section titled “Self-chat mode”Use your personal WhatsApp number. The bot only responds in your “Message Yourself” thread. allowedSenders is not used in this mode.
channels: - name: my-whatsapp type: whatsappBaileys enabled: true config: authDir: ./baileys-auth selfChat: true triggerWords: - '@Talon' # optional: only process messages starting with this wordWith triggerWords, the trigger is stripped before the message reaches the agent. @Talon what's the weather? becomes what's the weather?.
Authentication
Section titled “Authentication”Authenticate by scanning a QR code before starting the daemon:
npx talonctl whatsapp-auth --auth-dir ./baileys-auth
# Custom timeout in seconds (default: 120)npx talonctl whatsapp-auth --auth-dir ./baileys-auth --timeout 180Scan the QR code in WhatsApp on your phone. Credentials are saved to authDir. The daemon uses them automatically on startup and shows no QR code at runtime.
To re-authenticate, delete the authDir folder and run the command again.
Finding sender IDs
Section titled “Finding sender IDs”WhatsApp uses opaque LID identifiers (96490886312027@lid) that don’t match phone numbers directly. To find them:
- Set
logLevel: debugintalond.yaml - Restart the daemon
- Send a test message from the phone you want to allow
- Find the log line
whatsapp-baileys: inbound message received. Thejidfield shows the full ID - Copy the part before the
@intoallowedSenders - Set
logLevel: infoand restart
Group chats
Section titled “Group chats”Add the bot to a WhatsApp group and have it respond only when a message starts with a configured trigger word:
channels: - name: my-whatsapp type: whatsappBaileys enabled: true config: authDir: ./baileys-auth allowGroupChats: true triggerWords: - '@Talon' allowedSenders: - '31612345678'WhatsApp Baileys has no native mention entity format, so group messages require at least one trigger word. Messages without a matching trigger are silently dropped. If you enable allowGroupChats without configuring triggerWords, the connector logs a warning and drops all group messages.
For group messages, allowedSenders checks the individual sender’s JID (from key.participant), not the group JID. This means you can restrict which group members the bot responds to, even in a large community.
All messages in the same WhatsApp group share one conversation thread.
WhatsApp Business
Section titled “WhatsApp Business”Meta Cloud API connector with an embedded webhook HTTP server for inbound events. Requires a Meta Business account with a WhatsApp-enabled phone number.
channels: - name: my-whatsapp-business type: whatsappBusiness enabled: true config: phoneNumberId: '123456789' accessToken: ${WHATSAPP_ACCESS_TOKEN} verifyToken: ${WHATSAPP_VERIFY_TOKEN} appSecret: ${WHATSAPP_APP_SECRET} webhookPort: 3000 webhookHost: '0.0.0.0' webhookPath: '/webhook'| Config field | Description |
|---|---|
phoneNumberId | WhatsApp Business phone number ID |
accessToken | Cloud API access token |
verifyToken | Webhook verify token. Must match the token in the Meta App Dashboard |
appSecret | App secret. When set, Talon starts the webhook server and validates the HMAC-SHA256 signature on inbound events |
apiVersion | Cloud API version (default: v18.0) |
webhookPort | Webhook server port (default: 3000) |
webhookHost | Webhook bind address (default: 0.0.0.0) |
webhookPath | Webhook URL path (default: /webhook) |
replyToTrigger | When an answer is sent as a contextual reply to the message that triggered it: groups (default), always, or never. The Cloud API has no group chats, so the default never quotes. Use always to quote every answer |
inboundReactions | Forward user reactions on Talon’s messages to the agent (default: true) |
The webhook server needs a public URL. Put a reverse proxy in front of it, or use a tunnel for local development.
Thread mapping: The sender’s phone number.
Replies and reactions: Contextual replies and emoji reactions work in both directions. See Replies, threads and reactions.
Images: Talon accepts images and image documents. See Images.
If you run more than one WhatsApp Business connector with inbound webhooks, give each a unique webhookPort.
Terminal
Section titled “Terminal”WebSocket-based channel for direct CLI access. Connect with talonctl chat from any machine.
channels: - name: my-terminal type: terminal enabled: true config: port: 7700 host: 0.0.0.0 token: ${TERMINAL_TOKEN}| Config field | Description |
|---|---|
port | WebSocket server port. Required. The connector has no default |
host | Bind address (default: 127.0.0.1) |
token | Shared secret for authentication |
Connect:
export TERMINAL_TOKEN=your-secret-token
talonctl chat --host localhost --port 7700talonctl chat --host 10.0.1.95 --port 7700 --persona researchertalonctl chat --host localhost --port 7700 --client-id my-laptop--persona switches which persona handles the session. --client-id gives your client a stable identity. Reconnecting with the same ID resumes the same thread.
The client renders Markdown via marked-terminal and shows a spinner while the agent is working.
Discord
Section titled “Discord”Send is implemented through the Discord REST API. Inbound reception is not complete: the connector accepts Gateway events through an internal feed method, but the daemon has no Gateway WebSocket client to receive them from Discord.
channels: - name: my-discord type: discord enabled: true config: botToken: ${DISCORD_BOT_TOKEN} applicationId: '123456789' allowedChannelIds: - '987654321'| Config field | Description |
|---|---|
botToken | Bot token from the Discord developer portal |
applicationId | Discord application ID |
guildId | Optional guild (server) restriction |
allowedChannelIds | Optional allowlist of channel IDs |
intents | Optional Gateway intents bitmask (default: 33280, which is GUILD_MESSAGES plus MESSAGE_CONTENT) |
IMAP polling for inbound mail and SMTP for replies.
channels: - name: my-email type: email enabled: true config: imapHost: imap.gmail.com imapPort: 993 imapUser: agent@example.com imapPass: ${EMAIL_PASSWORD} imapSecure: true smtpHost: smtp.gmail.com smtpPort: 587 smtpUser: agent@example.com smtpPass: ${EMAIL_PASSWORD} smtpSecure: false fromAddress: 'Talon <agent@example.com>' # Optional allowedSenders: - 'alice@example.com' requireDmarcPass: true trustedAuthServId: 'mx.example.com' pollingIntervalMs: 30000 mailbox: 'INBOX'| Config field | Description |
|---|---|
imapHost, imapPort, imapUser, imapPass, imapSecure | IMAP settings for inbound mail |
smtpHost, smtpPort, smtpUser, smtpPass, smtpSecure | SMTP settings for outbound mail |
fromAddress | From address for outbound mail |
allowedSenders | Optional allowlist of sender addresses, matched against the From header |
requireDmarcPass | Accept mail only when your provider reports dmarc=pass for the sender’s domain (default: false) |
trustedAuthServId | The authserv-id your mail provider writes in its Authentication-Results header. Required for requireDmarcPass |
pollingIntervalMs | Delay between IMAP polls (default: 30000) |
mailbox | IMAP folder to poll (default: INBOX) |
Inbound: Talon polls unseen messages, up to 20 per poll, oldest first. It marks each message as read after it parses. Poll errors back off exponentially up to 60 seconds.
Outbound: HTML converted from Markdown, with a plain-text alternative.
Thread mapping: The thread anchor is the root of the References chain. Talon falls back to In-Reply-To, then to Message-ID. Every reply in a conversation maps to one Talon thread. Replies carry a matching Re: subject and the In-Reply-To and References headers.
Images: Talon accepts image attachments. See Images.
Sender checks
Section titled “Sender checks”The From header is easy to forge, so allowedSenders alone is weak. Set requireDmarcPass: true when you use allowedSenders.
requireDmarcPass only works together with trustedAuthServId. Without it, Talon drops every message. The check reads the Authentication-Results and ARC-Authentication-Results headers and trusts only values whose authserv-id equals trustedAuthServId. Talon ignores values from other hosts because a sender can forge them. The first trusted value must contain dmarc=pass and a header.from= that matches the sender’s domain.
To find your provider’s authserv-id:
- Open the raw headers of a message you received in the mailbox.
- Find the
ARC-Authentication-ResultsorAuthentication-Resultsline. - Copy the first token after
i=1;, or after the header name when there is noi=tag. InARC-Authentication-Results: i=1; mx.example.com; spf=pass ...the value ismx.example.com.
Limits
Section titled “Limits”- Talon skips messages larger than 10 MiB and marks them as read, so it does not retry them.
- Talon marks a message as read before the agent handles it. If the daemon crashes in between, that message is not processed.
Images
Section titled “Images”Telegram, WhatsApp Baileys, WhatsApp Business, and email accept inbound images. Slack, Discord, and terminal do not.
Talon stores each accepted image, converts it to a bounded JPEG, and exposes it to the persona as text metadata. A persona with the vision sub-agent can ask questions about the image. Sender, chat, group, and trigger rules stay the same. An image-only message can start a run, and Talon keeps captions and text.
See Images and Vision for accepted formats, limits, retention, and setup.
Signal (coming soon)
Section titled “Signal (coming soon)”Signal support is finished on a feature branch and will ship in an upcoming release. It is not available in a released version yet, so this section describes the design only.
Talon will not run Signal itself. You run a signal-cli bridge, and Talon connects to its Unix socket. Each Signal channel uses one of two account modes. In personal mode the bridge is linked as an additional device on your own account, replies come from your identity, and every text you send to Note to Self is a command. In dedicated mode a separate account acts as the agent. In selected DMs and groups, a message must start with a trigger prefix (default !talon) and come from an authorized sender. The allowlists are empty by default, which denies everything. The channel handles text only: Talon replies in plain text, splits long replies into ordered chunks, and ignores attachments.
Multi-connector setup
Section titled “Multi-connector setup”You can run multiple instances of the same connector type, for example two Telegram bots or three Slack bots. Each has its own credentials and persona binding. Channels are keyed by name (unique), not by type, so Talon treats them as independent connectors.
Use cases
Section titled “Use cases”- Virtual team: deploy per-persona bots in a single Slack workspace:
pm-bot,dev-bot,content-bot, each responding in character. - Per-persona Telegram bots: multiple bots in a shared group, each bound to a different persona.
- Environment separation: a
staging-slackandproduction-slackconnector bound to different personas.
Configuration
Section titled “Configuration”Add multiple entries of the same type under channels:, give each a unique name, and bind each to a persona:
channels: - name: slack-pm type: slack enabled: true config: botToken: ${SLACK_PM_BOT_TOKEN} appToken: ${SLACK_PM_APP_TOKEN} signingSecret: ${SLACK_PM_SIGNING_SECRET}
- name: slack-dev type: slack enabled: true config: botToken: ${SLACK_DEV_BOT_TOKEN} appToken: ${SLACK_DEV_APP_TOKEN} signingSecret: ${SLACK_DEV_SIGNING_SECRET}
bindings: - persona: product-manager channel: slack-pm isDefault: true - persona: developer channel: slack-dev isDefault: trueBot-self filtering
Section titled “Bot-self filtering”Connectors filter bot messages automatically to prevent feedback loops. No configuration is needed:
| Connector | How it filters |
|---|---|
| Slack | Drops bot messages. In shared channels, top-level messages must @mention the connector’s own bot user ID. DMs and thread replies always pass |
| Discord | Drops all messages from author.bot accounts |
| Telegram | Resolves its own bot identity on startup via getMe, then drops messages where from.is_bot is true or the sender ID matches a sibling Talon bot |
| WhatsApp Baileys | JID-based self-detection |
| Email / Terminal | Not applicable |
When multiple Telegram connectors run in the same daemon, Talon automatically distributes sibling bot IDs across all Telegram instances so each bot ignores the others. This also runs on hot-reload.
Sending from the agent
Section titled “Sending from the agent”Normal replies go back to the chat the message came from. For anything else, the agent uses three host tools. All three need a channel.send capability grant. Emoji reactions use a fourth tool, channel_react, with its own channel.react:* capability. See Replies, threads and reactions.
| Tool | Purpose |
|---|---|
channel_send | Send a message through one channel |
channel_list | List the channels bound to the persona and the chats it can deliver to |
channel_broadcast | Send one message to every chat the persona is bound to |
channel_send
Section titled “channel_send”channel_send takes a channelId, the content in Markdown, an optional replyTo, and an optional externalChatId. replyTo is a message ID, the (id …) value from a [Replying to …] or [Reaction: …] header. Talon sends the message as a native reply to it.
channelId is the channel name. A persona bound to slack-pm sends via the PM bot identity, and a persona bound to slack-dev sends via the Dev bot identity.
The agent can also pass a connector type such as telegram instead of a name. Talon resolves that alias to the channel the current conversation arrived on, if that channel has that type. Three rules apply:
- An exact channel name always wins over a type alias.
- Talon does not resolve an alias when
externalChatIdis set. - Talon does not resolve an alias on a schedule thread.
Talon picks the recipient chat in this order:
externalChatId, when it is set and not blank. This is the chat ID on the target channel, for example a Telegram chat ID or a Slack channel ID.- The chat a scheduled task was created from.
- The chat of the current thread.
If none of these gives a recipient, channel_send returns an error. This happens for scheduled tasks created with talonctl add-schedule, because they have no originating chat. The error tells the agent to pass externalChatId, or to use channel_list and channel_broadcast.
channel_list
Section titled “channel_list”channel_list takes no arguments. It returns one entry per binding with channelName, channelType, threadId, and externalChatId. Use an externalChatId from the result as the target for channel_send.
channel_broadcast
Section titled “channel_broadcast”channel_broadcast takes content and sends it to every chat the persona is bound to. It returns a { delivered, skipped, failed } summary. Channel-default bindings have no chat attached, so the tool skips them and reports the reason no_thread_binding. A failed send to one chat does not stop the others.
See Host tools and Scheduling.
Managing channels
Section titled “Managing channels”# Add a channel entry to talond.yaml, then fill in its config fieldsnpx talonctl add-channel --name my-telegram --type telegram
# List all configured channelsnpx talonctl list-channels
# Remove a channel and the bindings that reference itnpx talonctl remove-channel --name old-slack
# Disable without removing (edit talond.yaml: enabled: false)