Channels

Channels let you deploy agents to messaging platforms. Users message your bot → AgentBackend routes the message to the linked agent → the agent responds through the bot.

Channel Status

ChannelStatusNotes
TelegramLiveFull bot registration + webhook
SlackComing SoonAPI model designed, handler in development
WhatsAppPlanned
DiscordPlanned
Web WidgetPlanned

Telegram Setup

1

Create a bot with @BotFather

Open Telegram, search for @BotFather, and use the /newbot command. Copy the bot token it gives you.

2

Register the bot

Send the bot token to AgentBackend to register it:

bash
curl -X POST https://api.agentbackend.ai/v1/channels/telegram/bots \
  -H "Authorization: Bearer ak_..." \
  -H "Content-Type: application/json" \
  -d '{"token": "BOT_TOKEN"}'
3

Link to an agent

Connect the registered bot to one of your agents:

bash
curl -X POST https://api.agentbackend.ai/v1/agents/:agent_id/channels \
  -H "Authorization: Bearer ak_..." \
  -H "Content-Type: application/json" \
  -d '{"bot_id": "bot_..."}'
4

Done!

Users can now message your Telegram bot and get AI-powered responses from your agent.

Python SDK

python
bot = ab.channels.register_bot("telegram", "BOT_TOKEN")
ab.channels.link_agent("agent_id", bot["id"])

JavaScript SDK

javascript
const bot = await ab.channels.registerBot('telegram', 'BOT_TOKEN');
await ab.channels.linkAgent('agent_id', bot.id);

Slack SetupComing Soon

1

Create a Slack app

Go to api.slack.com and create a new app. Enable the chat:write bot scope and install it to your workspace.

2

Register the bot

Register the Slack bot token with AgentBackend:

bash
curl -X POST https://api.agentbackend.ai/v1/channels/slack/bots \
  -H "Authorization: Bearer ak_..." \
  -H "Content-Type: application/json" \
  -d '{"token": "xoxb-..."}'
3

Link to an agent

Same as Telegram — use POST /v1/agents/:agent_id/channels with the bot ID returned from registration.

4

Done!

Users can now message the bot in Slack and get AI-powered responses from your agent.

Managing Bots

MethodEndpointDescription
GET/v1/channels/botsList all bots
GET/v1/channels/bots/:idGet bot details
PATCH/v1/channels/bots/:idUpdate bot
DELETE/v1/channels/bots/:idDelete bot

Linking / Unlinking

MethodEndpointDescription
POST/v1/agents/:id/channelsLink agent to bot
GET/v1/agents/:id/channelsList agent channels
DELETE/v1/agents/:id/channels/:bot_idUnlink agent from bot

One agent can be linked to multiple bots. One bot can only be linked to one agent at a time.

Webhook Flow

When a message arrives on the messaging platform, the platform's webhook forwards it to AgentBackend. AgentBackend looks up which agent is linked to the bot, runs the agent with the incoming message, and sends the response back through the platform's API. All of this happens automatically once the bot is registered and linked — no additional webhook configuration is needed on your end.