Channels
Talk to an agent from Telegram, WeChat, Feishu and Slack
Channels let you talk to an agent from the chat apps you already use. Open Agents, select an agent, then select Manage and Channels.
Each bot or app belongs to you and serves one agent. An agent can connect one account per platform. TokenFlux stores the tokens and secrets for that agent only. It never shows them again and never passes them into the sandbox.
| Platform | How to connect | Chats |
|---|---|---|
| Telegram | Create a bot in Telegram, or paste a bot token | Private chats, groups and topics |
| Scan a QR code with WeChat | Private chats only | |
| Feishu | Scan a QR code, or enter an App ID and secret | Private chats, groups and topics |
| Slack | Paste an app-level token and a bot token | Direct messages and channels |
How a chat works
Link a chat first. A chat that is not linked cannot use the agent. To link a chat, select Create link or Create code on the Channels page, then follow the instructions it shows. A link or code works once and expires in 10 minutes.
One chat, one conversation. A linked chat has its own conversation with the
agent. The chat's first message creates the conversation, and it appears under
Conversations in the web app. /new makes the next message start another
conversation. Linking the chat again also starts a new conversation.
Group access. By default, only the person who linked the chat can run the
agent. It ignores other people. The person who linked the whole group can send
/members on in that group to open it to every member, or /members off to
allow only the person who linked it again. This command cannot change access
from a topic.
With /members on, every task is billed to the owner. Anyone in the group gets full control of the agent: its workspace, its API key, its
automations and its memory. Use this only on a TokenFlux account set up for this team. /members off stops new requests from others; it
does not undo anything already done. Requests already accepted still run.
In groups, the agent reads messages that mention or reply to it. Topic follow
works only in Feishu and Slack. When a top-level message mentions the bot and
starts a topic, that topic follows by default when the platform permits it.
Later messages from authorized users can start paid tasks without a mention.
Send /follow off in the topic to require mentions again. To turn follow back
on, send @bot /follow on. A plain /follow on is ignored while follow is off.
Follow does not change who can use the agent. Requests already accepted still
run. Telegram does not support /follow.
Replies. While a task runs, the chat shows that the agent is working. The reply streams in with each platform's own method:
- Telegram: a draft in a private chat, and a message edited in place in a group. The final answer is sent as new messages.
- Feishu: a card that fills in as the reply grows and becomes the answer.
- Slack: a streamed message that becomes the answer.
- WeChat: a typing indicator, then the final answer.
Long answers are split into several messages. In Telegram and WeChat, a very long answer is shortened and points to the full result in the web app.
Steering. A message sent while the chat's task runs steers that task.
Text only. Chat apps send text to the agent. Images and files in a chat are not read. Use the web app to send images.
Start, stop, replace and disconnect. Stop keeps the account and its linked chats, but the agent ignores messages until you start it again. Replacing the account or disconnecting it unlinks all its chats. Unlink removes one chat. Deleting the agent disconnects all its channels.
Chat commands
Send these commands in a linked chat. In Slack, mention the bot first, for
example @bot /new, because Slack handles messages that start with /.
| Command | What it does |
|---|---|
/new | The next message starts a new conversation. |
/stop | Stops the task of this chat's conversation. Tasks from the web app keep running. |
/compact | Compresses this conversation's context. It can spend model tokens. |
/model [ID] | Shows the available models, or sets the model of this conversation. |
/thinking [level] | Shows or sets the thinking level of this conversation. |
/session | Shows the conversation's usage. |
/members [on|off] | In the whole group, the person who linked it sets who can use the agent. |
/follow [on|off] | Feishu and Slack topics only. After off, send @bot /follow on to turn it back on. |
/help | Lists the commands. |
Model and thinking changes apply from the next message.
Telegram
Create a bot. If the Channels page shows Create bot, open the link on the device where you use Telegram. Select Create bot in Telegram and confirm. Telegram creates a bot that you own, TokenFlux connects it, and your private chat is linked automatically. You do not need to paste a token or create a link for this private chat. Send the bot a message to start.
Use a bot token. To use a bot you already have, select Already have a bot? Use its token. The page shows the token form directly when Create bot is not available.
- In Telegram, open @BotFather.
- Send
/newbotand choose a name. BotFather replies with a token. - Paste the token and select Connect and start.
The bot must not have a webhook and must not serve another agent.
Link a chat. For the token path, select Create link, open the link or scan its QR code, then press Start in Telegram to link the private chat. The auto-create path has already linked the private chat. To link a group, select Add @bot to a group and choose the group.
- In a forum group, each new topic gets its own conversation.
- Converting a group to a supergroup changes its chat ID. Link it again.
- Disconnecting a bot does not delete it in Telegram.
- Select Show QR code.
- Scan it with WeChat on your phone, not with the camera app, and confirm.
- Your private chat is linked. Send the bot a message to start.
WeChat can deliver a bot message only after you send the bot a message. Until
then, the chat shows Cannot receive messages yet. To link another WeChat
chat, select Create code and send link CODE to the bot. To reconnect after
an error, select Scan again.
Feishu
Scan a QR code.
- Select Show QR code.
- Scan it with Feishu on your phone. Create a new app or choose one of yours.
- The app connects and greets you in a private chat. Reply there to start.
Enter an App ID and App Secret. Select Enter an App ID and App Secret instead.
- In the Feishu Open Platform, create a custom app and add the bot capability.
- Grant these tenant permissions for basic chat use:
im:chat,im:message,im:message.group_at_msg:readonly,im:message.p2p_msg:readonlyandcardkit:card:write. These permissions let the app read chat details, send messages, receive private messages and group mentions, and create or update cards for streamed replies. - To use topic follow, also grant
im:message.group_msg. It lets the app read topic history and receive topic replies without a mention. A tenant admin must approve this permission. Basic chat use does not require it. - Set event delivery to a long connection and subscribe to
im.message.receive_v1. - Paste the App ID and App Secret and select Connect and start.
Link a chat. Select Create code. Send link CODE to the bot in a
private chat, or mention the bot with link CODE in a group. In a group, the
agent answers messages that mention or reply to it. In topics that follow,
it can also answer authorized users without a mention.
Slack
Slack connects through a Socket Mode app that you create in your workspace.
- Create an app from scratch at api.slack.com/apps.
- Turn on Socket Mode and create an app-level token (
xapp-) with theconnections:writescope. - Add these bot token scopes:
chat:write,reactions:write,users:read,channels:read,groups:read,im:read,channels:history,groups:historyandim:history. - Subscribe to the bot events
message.channels,message.groupsandmessage.im, then install the app. - Paste the app-level token and the bot token (
xoxb-) and select Connect and start.
Link a chat. Select Create code. Send link CODE to the bot in a direct
message, or post it in a channel that the bot is in. Linking a channel links
the whole channel. In a channel, each top-level message that mentions the bot
starts a thread with its own conversation.
If the Channels page shows an error, the platform rejected the token or the app. Fix it on the platform, then select Start again or replace the credentials.