Channels Overview
CodeSpar's channel-agnostic architecture normalizes messages across WhatsApp, Slack, Discord, Telegram, and CLI into a unified interface.
Channel Architecture
CodeSpar is channel-agnostic by design. Every messaging platform — WhatsApp, Slack, Discord, Telegram, and CLI — normalizes into the same internal format. Agents never know (or care) which channel a message came from. The same @codespar syntax works everywhere.
Core Concept
The channel layer sits between the messaging platform and the agent system. Each channel has an adapter that:
- Connects to the platform's API or webhook
- Normalizes incoming messages into a
NormalizedMessage - Sends agent responses back through the platform's native format
This means adding a new channel requires only implementing a single adapter — no changes to agent logic.
NormalizedMessage Interface
Every message from every channel is transformed into this common shape before reaching any agent:
The metadata field carries platform-specific data (thread IDs in Slack, reply-to references in Telegram, etc.) without polluting the core interface.
ChannelAdapter Interface
Every channel implements this adapter contract:
Channel Capabilities
Not all platforms support the same features. The getCapabilities() method returns what each adapter can do:
Same Syntax, Every Channel
The @codespar mention works identically across all platforms:
Each channel has its own native mention mechanism (Slack's @app, WhatsApp's keyword trigger, Discord's @bot, Telegram's @bot), but the agent receives the same normalized command regardless of origin.
Channel Comparison
| Channel | Threads | Reactions | Rich Text | File Upload | Edit Messages |
|---|---|---|---|---|---|
| Slack | Yes | Yes | Yes | Yes | Yes |
| No | No | Partial | Yes | No | |
| Discord | Yes | Yes | Yes | Yes | Yes |
| Telegram | Yes | Yes | Yes | Yes | Yes |
| CLI | No | No | Yes | No | No |
Enabling Channels
Each channel is toggled independently via environment variables. You can run one channel or all five simultaneously:
The CLI channel is always available and requires no configuration.
Message Flow
Cross-Channel Operations
Because agents are channel-agnostic, operations can span channels. A deploy approval requested in Slack can be approved from WhatsApp. An incident detected via CI webhook can notify the team on Discord. The agent tracks state internally — the channel is just a transport layer.
Next Steps
- Slack Setup — Socket Mode, scopes, and configuration
- WhatsApp Setup — Evolution API, QR code, and webhooks
- Discord Setup — Bot creation, intents, and permissions
- Telegram Setup — BotFather, polling, and group commands