Skip to main content
rt.channels manages first-class agent channels such as Telegram and WhatsApp. Use it with rt.secrets to store provider credentials and then connect the channel to an agent.

Connect Telegram

Each Telegram bot can be connected to one agent at a time.

Connect WhatsApp

Paste the returned callback URL and verify token into the Meta app’s WhatsApp webhook settings. Each WhatsApp Business phone number can be connected to one agent at a time.

Privacy

Channels default to approved_only. Unknown chats become pending requests and do not reach the agent.
Approve a pending Telegram chat:
Approve a known conversation directly:
Revoke access:

Product channels

Use product channels when a product built on Runtools needs its own users to chat with an agent over Telegram, WhatsApp, Slack, Discord, iMessage, or another supported channel. The developer connects the channel once. End users do not connect Telegram or create Runtools accounts. Instead, Runtools links the provider sender identity, such as a Telegram user id or phone number, to your product user:
Once linked, channel-triggered agent runs use the same Hosted Connect end-user scope as your web app. If that product user has not connected Gmail, Stripe, Slack, or another data integration, tool execution returns connect_required. It never falls back to builder Connected Apps or org credentials.

Bind a channel to a product app

Create the agent channel normally, then bind it to the product app:
groupPolicy: 'disabled' blocks group chats for product channels. sender_scoped lets the same group contain multiple product users because each message is resolved by sender id.

Product-started linking

When a signed-in product user clicks “Connect Telegram” or “Connect WhatsApp” inside your product, create a short-lived channel link session from your server:
After your product verifies the provider sender id, complete the session from your server:
For backend imports, admin tooling, or provider webhooks where you already trust the sender identity, link directly:

Channel-started linking

If an unknown person messages a product-bound channel, Runtools creates a pending link session and replies with the configured link URL. The message is recorded for audit, but the agent is not called until the sender is linked to a product user. List and revoke links:

Methods