Skip to content
sonapersonal assistant
Channels

Channels

A channel is one way you talk to Sona. None of them except the terminal is required. sona chat works after sona init with only an LLM key.

Sona starts every channel listed under channels: in ~/.sona/sona.yml at boot. Add one later:

sona channel add telegram|slack|discord|whatsapp|email

Shipped

  • CLIsona chat in this terminal (or sona chat --json for scripts). No bot, no extra account.
  • Telegram — optional. Long-poll Bot API. Create a bot with BotFather only when you want the phone.
  • Email (IMAP/SMTP) — async inbox + SMTP send.
  • Slack, Discord, WhatsApp — same sona channel add flow. Tokens already in the environment are stored as ${ENV} refs.

Telegram is not enabled out of the box. Press Enter at the Telegram prompt in sona init to skip it.

How channels compose

Every adapter sits behind the same ChannelAdapter SPI:

  1. Adapter receives a platform-specific message (stdin line, Telegram update, Slack event, …).
  2. Adapter translates it into a UnifiedMessage with a channelId and a senderId.
  3. Gateway routes by (channelId, senderId) to a session; the session runs the agent.
  4. Gateway hands the reply back as a UnifiedResponse; adapter renders it to the platform.

How It Works traces one message end-to-end. Only the first and last hops change per channel.

Writing your own

The framework Channels reference covers the SPI. Sona auto-discovers ChannelAdapter implementations on the classpath at boot.

To use a custom adapter, drop the JAR into ~/.sona/lib/, restart the daemon, and add its channels: block to sona.yml.