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
| Channel | Status | Notes |
|---|---|---|
| Telegram | Live | Full bot registration + webhook |
| Slack | Coming Soon | API model designed, handler in development |
| Planned | — | |
| Discord | Planned | — |
| Web Widget | Planned | — |
Telegram Setup
Create a bot with @BotFather
Open Telegram, search for @BotFather, and use the /newbot command. Copy the bot token it gives you.
Register the bot
Send the bot token to AgentBackend to register it:
curl -X POST https://api.agentbackend.ai/v1/channels/telegram/bots \
-H "Authorization: Bearer ak_..." \
-H "Content-Type: application/json" \
-d '{"token": "BOT_TOKEN"}'Link to an agent
Connect the registered bot to one of your agents:
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_..."}'Done!
Users can now message your Telegram bot and get AI-powered responses from your agent.
Python SDK
bot = ab.channels.register_bot("telegram", "BOT_TOKEN")
ab.channels.link_agent("agent_id", bot["id"])JavaScript SDK
const bot = await ab.channels.registerBot('telegram', 'BOT_TOKEN');
await ab.channels.linkAgent('agent_id', bot.id);Slack SetupComing Soon
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.
Register the bot
Register the Slack bot token with AgentBackend:
curl -X POST https://api.agentbackend.ai/v1/channels/slack/bots \
-H "Authorization: Bearer ak_..." \
-H "Content-Type: application/json" \
-d '{"token": "xoxb-..."}'Link to an agent
Same as Telegram — use POST /v1/agents/:agent_id/channels with the bot ID returned from registration.
Done!
Users can now message the bot in Slack and get AI-powered responses from your agent.
Managing Bots
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/channels/bots | List all bots |
| GET | /v1/channels/bots/:id | Get bot details |
| PATCH | /v1/channels/bots/:id | Update bot |
| DELETE | /v1/channels/bots/:id | Delete bot |
Linking / Unlinking
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/agents/:id/channels | Link agent to bot |
| GET | /v1/agents/:id/channels | List agent channels |
| DELETE | /v1/agents/:id/channels/:bot_id | Unlink 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.