Channels Overview
Channels are messaging platform connections that route incoming messages to your Snippbot agents and send the agent’s reply back through the same platform. Instead of interacting with agents through the web UI, users can chat with them directly in Slack, Telegram, Discord, or any other supported platform.
Supported Platforms
Section titled “Supported Platforms”| Platform | Setup Complexity | Notes |
|---|---|---|
| Slack | Medium | Requires a Slack app with bot token and Events API |
| Discord | Medium | Requires a Discord application and bot token |
| Telegram | Easy | Bot created via @BotFather in ~2 minutes |
| High | Requires Meta Business API approval and verified business account | |
| Microsoft Teams | High | Requires Azure AD app registration and Teams admin consent |
| Google Chat | Medium | Requires Google Cloud project and Chat API configuration |
Architecture
Section titled “Architecture”When you start the channel adapter, Snippbot runs a lightweight webhook server alongside the main API:
Messaging Platform │ │ Webhook (HTTP POST) ▼┌──────────────────────────────────┐│ Channel Adapter (port 18790) ││ ││ /webhook/slack ││ /webhook/discord ││ /webhook/telegram ││ /webhook/teams ││ ... │└──────────────┬───────────────────┘ │ Route via binding ▼┌──────────────────────────────────┐│ Snippbot Core API (port 18781) ││ POST /api/chat/stream │└──────────────┬───────────────────┘ │ Agent response ▼┌──────────────────────────────────┐│ Platform API ││ (Slack Web API / Telegram Bot ││ API / Discord REST / etc.) │└──────────────────────────────────┘The channel adapter server runs on port 18790 and handles all inbound webhooks from messaging platforms. Each incoming message is matched against the channel bindings table to determine which agent should respond. The adapter then calls the Snippbot chat API, waits for the response, and posts it back via the platform’s API.
Channel Bindings
Section titled “Channel Bindings”A channel binding maps a specific messaging context (a Slack channel, a Telegram chat ID, a Discord server/channel pair) to a specific agent. When a message arrives, the adapter looks up the binding for that context and routes the message to the correct agent.
Binding rules
Section titled “Binding rules”- One binding per channel/context (you cannot route the same channel to two agents simultaneously)
- Bindings can be scoped to a specific channel, DM, or workspace-wide
- If no binding exists for an incoming message context, the adapter uses the default agent if one is configured, or drops the message
Managing bindings
Section titled “Managing bindings”Bind a channel to an agent
Section titled “Bind a channel to an agent”- Open Settings → Channels → Bindings in the Snippbot UI
- Click New Binding
- Select the platform channel (e.g.,
#research) - Select which agent handles messages from that channel
- Set access mode and click Save
All binding management is done through the Snippbot UI under Settings → Channels → Bindings.
Starting the Channel Adapter
Section titled “Starting the Channel Adapter”snippbot channel startThe adapter reads channel configurations from ~/.snippbot/config.toml and starts listening on port 18790.
Navigate to Settings > Channels in the Snippbot UI and click the Start Adapter toggle. The adapter status is shown in the header.
To run the adapter as a persistent background service on Linux with systemd:
[Unit]Description=Snippbot Channel AdapterAfter=network.target snippbot.service
[Service]ExecStart=/usr/local/bin/snippbot channel startRestart=on-failureUser=snippbotEnvironment=HOME=/home/snippbot
[Install]WantedBy=multi-user.targetsudo systemctl enable --now snippbot-channelsNetwork Requirements
Section titled “Network Requirements”For messaging platforms to deliver webhooks to Snippbot, port 18790 must be reachable from the internet. Options:
- Public VPS: open port 18790 in your firewall and use your server’s public IP or domain
- ngrok:
ngrok http 18790gives you a temporary public HTTPS URL for development - Reverse proxy: route
https://yourdomain.com/webhooks/tolocalhost:18790via nginx or Caddy