Cortask

Channels

Channels are messaging platform integrations that let you chat with Cortask agents from external apps like Telegram, Discord, and WhatsApp. Instead of using the web UI, you send a message in your preferred app and get a response from the agent directly in that conversation.

Architecture

Every channel follows the same adapter pattern:

  1. A channel adapter connects to the external platform and listens for incoming messages.
  2. When a message arrives, the adapter checks access control (allowed users, guilds, or trusted contacts).
  3. Authorized messages are routed to the mapped workspace, where the configured agent processes the request.
  4. The agent's response is sent back through the adapter to the originating chat.

All adapters implement the ChannelPlugin interface, which defines a consistent lifecycle (start, stop, isRunning) and message handling contract (onMessage, sendMessage).

Each inbound message carries a channelId, userId, userName, chatId, and text field, giving the agent enough context to maintain per-user or per-chat conversation threads.

Supported Channels

ChannelTransportAuth Method
TelegramBot API (polling)Bot token (BotFather)
DiscordGateway WebSocketBot token (Dev Portal)
WhatsAppWhatsApp WebQR code scan

Channel-to-Workspace Mapping

Each channel is associated with a workspace. When a message arrives on that channel, it runs against the workspace's configured agent, model, and enabled skills. This means you can have different channels pointing to different workspaces -- for example, a Telegram bot for personal tasks and a Discord bot for a team workspace.

Configure channel-to-workspace mappings in the Cortask web UI under the workspace's channel settings.