๐ฑ Telegram โ The Main Channel
Telegram is the default choice for good reasons: stable API, free, file support, inline buttons, groups, and channels. 95% of personal assistant use cases work perfectly on Telegram.
๐ก Polling vs. Webhook
Polling (Recommended for development)
Bot periodically asks Telegram: โAny new messages?โ Simple, no infrastructure. Latency of 1โ2 seconds.
Webhook (For production)
Telegram sends messages directly to your URL. Requires public HTTPS. Zero additional latency. Ideal for VPS.
๐ก Telegram Security
Set TELEGRAM_ALLOWED_USERS to only your IDs. Anyone can message a Telegram bot โ without a whitelist, anyone can control your Jarvis.
๐ BaseChannel โ The Universal Contract
O BaseChannel is the abstraction that lets the Agent be channel-agnostic. It doesnโt matter whether you use Telegram or Discord โ the Agent just calls send(), and the implementation takes care of the rest.
๐งฉ BaseChannel Interface
๐ WhatsApp via Business API
In Brazil, WhatsApp is irreplaceable. The Meta Business API enables official integration โ with no risk of a ban, and with support for approved media and templates.
๐ WhatsApp Integration Flow
Create a Meta Business account and app
Enable the WhatsApp Business API and generate a token
Configure a webhook with token verification
Implement WhatsAppChannel by extending BaseChannel
๐ฌ Discord and Slack
For teams, Discord and Slack are the natural channels. A Jarvis inside the team workspace eliminates the need to leave the platform to ask the assistant questions.
๐ฎ Discord
- โข discord.py with on_message events
- โข Slash commands for structured interaction
- โข One thread per conversation for organization
- โข Reactions for approval/rejection
๐ผ Slack
- โข Bolt SDK with OAuth 2.0
- โข Events API for listening to messages
- โข Mention handler (@atlas)
- โข Block Kit for rich responses
๐ง IMAP Email Channel
Email is the channel with the highest ROI for automation. Triage, categorization, and automatic replies to routine emails saves hours every week without requiring you to change your habits โ Jarvis works in your existing inbox.
๐ฌ Email Flow
๐ค Voice Wake Word
The voice channel turns Jarvis into a truly hands-free assistant. With Whisper for transcription and a configurable wake word, you speak naturally and Jarvis responds by voice.
๐ก Latency Tip
For real-time voice responses, use Whisper tiny (speed) for transcription and a local TTS model for synthesis. Total latency under 1 second is possible with mid-range hardware.
๐ Voice Pipeline
โ Module 2.2 Summary
Next Module:
2.3 โ Memory and Knowledge: SQLite FTS5, BM25, 2 layers, and automatic compaction