TryCaspian/caspian-sdk

Agent communication SDK. The open-source agent communication layer for AI agents — email, WhatsApp, Slack, Discord, Telegram, SMS. Python & TypeScript.

What it solves

Caspian provides a unified communication layer for AI agents, eliminating the need for developers to build and maintain separate adapters for every messaging platform. It solves the problem of "channel plumbing"—the tedious work of managing webhooks, authentication, and platform-specific payload formats for services like Slack, Discord, and Telegram—allowing developers to focus on the agent's reasoning rather than its connectivity.

How it works

Caspian acts as a normalized interface between the AI agent and various communication channels. It uses a single handler model where messages from any supported channel are converted into a standard Thread and Message format. Developers can use declarative rules to filter and handle messages based on the channel, command, or chat type. The SDK supports two deployment modes:

  • Hosted: Uses the Caspian gateway to handle inbound messages, which the agent then polls for events.
  • Self-host: Runs adapters directly in the agent's process using the developer's own platform tokens and webhooks.

Who it’s for

It is designed for developers building AI agents that need to interact with humans across multiple platforms, such as customer support bots, sales lead follow-up agents, personal assistants, and community management bots.

Highlights

  • Unified API: One channels.add() call per channel allows an agent to exist on multiple platforms with a single handler.
  • Crosspoint Identity: Treats channels as transports rather than identities, enabling a single agent identity across different platforms.
  • Rich Messaging: Supports native rich elements like buttons, blocks, and streaming replies that degrade gracefully to text-only channels.
  • Comprehensive Security: Built-in webhook verification for platforms like Slack, Meta, and Telegram.
  • Flexible Deployment: Supports both gateway-managed (hosted) and self-managed (self-host) infrastructure.
  • Broad Channel Support: Includes adapters for Telegram, Discord, Slack, Email, WhatsApp, X, and more.

Related

  • Project
  • Project
  • Project
  • Dispatch
  • Project