Channels

Channels overview

Caspian speaks eight channels behind one handler. This is the hub: pick a row to see what each channel needs, then open its page for the full walkthrough. Adding any of them is a single connect_*() call. Your on_message handler never changes.

The matrix

Free channels need no signup: mint an anonymous sandbox key and start building. Paid channels run on Caspian's own network and unlock after a one-time sign-in (first sign-in grants $100 in free credit).

Channel Connect method Provider(s) Cost What it needs
Email connect_email SES free Nothing: a real inbox on our domain, or your own.
Slack install_slack / connect_slack Shared app or your own app free One-click authorize, or your app's client id / secret / signing secret.
Discord install_discord / connect_discord Shared bot or your own bot free One-click authorize, or a bot token from discord.com/developers.
Telegram connect_telegram Bot API free A bot token from @BotFather.
WhatsApp connect_whatsapp twilio-whatsapp or meta-whatsapp One-time sign-in; Twilio sandbox for a quick test, or a Meta Embedded Signup popup for your branded number.
SMS & phone connect_phone twilio or telnyx free Your own Twilio/Telnyx account and a number you own there.
X (Twitter) install_x / connect_x Shared X app or your own account Sign in with X, or paste your access token, secret, and numeric user id.
iMessage connect_imessage agentphone-imessage One-time sign-in, nothing else; the gateway owns the number.

Which channels are live on your gateway can vary. Call client.channels() (Python) / client.channels() (JS), or GET /v1/channels, to list what's connectable right now. A channel can appear more than once (one row per provider), and you pass the one you want as provider=.

One handler, every channel

No matter which rows you connect, inbound messages all land at the same on_message handler, and message.reply() routes the answer back on the channel it came from: right thread, right format. Connecting a channel never touches your handler code.

agent.py
from caspian_sdk import CommClient

client = CommClient()                             # reads COMM_API_KEY / COMM_BASE_URL

# Connect whichever channels you want (one line each, no handler changes):
client.connect_email()                            # free, nothing to set up
client.connect_telegram(bot_token="123:abc")      # free, @BotFather token
client.install_slack(display_name="Acme Bot")     # free, one-click authorize_url
client.connect_phone(provider="twilio",           # free, your own number
    account_sid="AC...", auth_token="...", from_number="+1...")
client.connect_imessage()                          # paid, sign in once

@client.on_message
def handle(message):
    message.reply(f"You said: {message.text}")     # routes back on the source channel

client.listen()                                    # one loop, every channel
agent.ts
import { CommClient } from "caspian-sdk";

const client = new CommClient();                        // reads COMM_API_KEY / COMM_BASE_URL

// Connect whichever channels you want (one line each, no handler changes):
await client.connectEmail();                            // free, nothing to set up
await client.connectTelegram({ botToken: "123:abc" });  // free, @BotFather token
await client.installSlack({ displayName: "Acme Bot" }); // free, one-click authorizeUrl
await client.connectPhone({ provider: "twilio",         // free, your own number
  accountSid: "AC...", authToken: "...", fromNumber: "+1..." });
await client.connectImessage();                          // paid, sign in once

client.onMessage(async (message) => {
  await message.reply(`You said: ${message.text}`);      // routes back on the source channel
});

await client.listen();                                   // one loop, every channel

Pick a channel

Email free
A real inbox on our domain or yours. No signup.
Slack free
Shared one-click app, or bring your own.
Discord free
Shared bot or your own bot token.
Telegram free
Bring a @BotFather token; we wire the webhook.
WhatsApp
Twilio sandbox to test, or Meta for your branded number.
SMS & phone free
Two-way SMS on your own Twilio or Telnyx number.
X (Twitter)
Reactive DM bot: sign in with X or bring tokens.
iMessage
Blue-bubble messaging; the gateway owns the number.

Once channels are connected, Behavior guides hand your agent the per-channel etiquette (Slack threads, WhatsApp's 24-hour window, SMS length) to drop straight into its system prompt.

Next steps

Open any channel above, or start with the basics:

Quickstart →
Install, get a key, reply on email in two minutes.
Authentication →
Sandbox keys, sign-in, and free vs paid.