Caspian Agent Communication SDK

One handler and one identity for your AI agent across email, Slack, Discord, Telegram, WhatsApp and SMS — instead of N per-channel adapters.

Stars
★ 970
Last updated
3mo ago
FARS reviewed
Sep 10, 2026
License
AGPL-3.0
Primary language
Python

At a glance

Works with
Universal · cross-platformCodex · Claude Code
You'll need
Python 3.10+Node.js 18+Bun (for the Caspian CLI)Caspian API key for hosted modePer-channel bot tokens (Telegram, Slack, Discord, etc.)Shell / CLINetwork accessLocal filesystem
Typical use
Customer support: answer where the customer opened the thread — email, Slack or Instagram DM — and hand off to a human without losing context.
Main limitation
1.0 is not compatible with the 0.6.x CommClient API and the README states there is no drop-in migration path; existing integrations must be rewritten.
Website
trycaspianai.com ↗ set on GitHub
Maintenance
Commits in the last 6 monthslast commit 2026-08-25

What does this agent do, and when should you use it?

Caspian is an agent communication SDK shipped as caspian-sdk on PyPI (Python 3.10+) and npm (TypeScript / Node 18+ / Bun). It treats messaging channels as transports rather than identities: you write a single set of @cx.on_message rules filtered by channel, chat kind, command and overlap policy, bind each channel with one cx.channels.add() call, and every inbound event is normalized into a Thread / Message model that thread.post(), thread.reply(), thread.stream() and thread.send_blocks() answer in the right place. It runs hosted — cx.run() polls the Caspian gateway at api.trycaspianai.com — or self-hosted, where your own process holds the bot tokens and an HTTP route calls cx.handle() or cx.listen(). Version 1.0 is a full rewrite of the 0.6.x CommClient API with no drop-in migration path. The repository also contains a Bun CLI, per-channel TypeScript subpath exports, OpenClaw and OpenCode plugins, and one runnable example folder per channel.

After cx.channels.add("telegram", bot_token="...") registers a channel, the adapter receives inbound traffic and verifies it per platform — Slack signing secret, Meta X-Hub-Signature-256, Telegram secret header, X CRC, signed email webhooks — rejecting mismatches. Verified events are normalized into Thread / Message and dispatched against the declarative rules in cx.app.rules (channel, kind, command, overlap); the queue / debounce / drop / parallel overlap policies serialize concurrent conversations. Handlers write back into the same thread via thread.post(), thread.reply(), thread.typing(), thread.stream() (post once, edit as it writes), thread.send_media() and thread.send_blocks(), where one payload renders as Slack Block Kit, Discord embeds or Telegram keyboards and degrades to text on plain channels. cx.on_action handles callback buttons, and cx.tools(thread) exposes the command catalog (post, react, send-photo, …) as schema-bearing tools for a model. In hosted mode cx.run() polls the gateway; in self-host mode your HTTP route calls cx.handle("telegram", body, headers), or cx.listen("discord") / cx.listen("slack") holds a socket open. A Bun CLI (caspian init, channels add, catalog, call, threads tail) drives the same surface from the terminal.

  1. Customer support: answer where the customer opened the thread — email, Slack or Instagram DM — and hand off to a human without losing context.
  2. Sales and lead follow-up: first touch on the channel the lead used, later nudges where they actually reply, with no rewrite of the handler rules.
  3. Personal or executive assistant: one assistant identity across your inbox, Telegram and Slack instead of three disconnected bots.
  4. Community and product bots: the same agent serving a Discord server, a Slack community and members' DMs, with overlap policies preventing crossed conversations.
  5. Existing LangChain or CrewAI agents that need to reach people: keep the reasoning layer, hand send/receive to Caspian's Thread API.
  6. Solo builders in Claude Code or Codex: paste the SKILL.md prompt and let the coding agent read the live guide and perform the integration end to end.
  7. Self-hosted or compliance-sensitive deployments: run adapters in your own process with your own tokens rather than through the vendor gateway.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install caspian-sdk # Python 3.10+
  • npm install caspian-sdk # TypeScript / Node 18+ / Bun
  • pip install "caspian-sdk[discord]"
Environment variables
CASPIAN_API_KEY TELEGRAM_BOT_TOKEN
Config files
~/.caspian/.env
Runtime
Python 3.10+ · Node.js 18+

How do you install or deploy this agent?

Install the SDK for Python 3.10+ or Node 18+ / Bun.

pip install caspian-sdk        # Python 3.10+
npm install caspian-sdk        # TypeScript / Node 18+ / Bun

Hosted mode needs an API key from dashboard.trycaspianai.com, exported as CASPIAN_API_KEY or passed to the constructor.

export CASPIAN_API_KEY="your-key"

Discord socket inbound needs the optional extra:

pip install "caspian-sdk[discord]"

Self-host mode needs no Caspian key — instead bring each platform's bot token plus a publicly reachable webhook URL. The CLI lives in packages/cli (TypeScript + Bun) and can mint a key for you:

caspian init                 # mint a key → ~/.caspian/.env or project .env

How do you use this agent?

Hosted quickstart — the gateway owns inbound and your process polls for events:

from caspian import Caspian

cx = Caspian(api_key="...")                          # or CASPIAN_API_KEY in .env
cx.channels.add("telegram", bot_token="...")         # Telegram is BYO BotFather token

@cx.on_message({"overlap": "queue", "ack": "On it…"})
def handle(thread, msg, ctx):
    thread.post(f"You said: {msg.text}")

cx.run()   # polls the gateway — Ctrl+C to stop

Self-host — adapters run in your process and your HTTP route forwards the webhook:

cx = Caspian()
cx.channels.add("telegram", via="self-host", bot_token="...",
                webhook_url="https://your.server/telegram")

@cx.on_message({"channel": "telegram"})
def handle(thread, msg, ctx):
    thread.post(f"You said: {msg.text}")

# from your HTTP route:
results = cx.handle("telegram", request_body, request_headers)

Discord and Slack can skip a public URL by holding a socket open (Discord needs the optional extra):

cx.listen("discord")

The TypeScript client exposes the same contract in camelCase:

import { Caspian } from "caspian-sdk"

const cx = new Caspian()

await cx.channels.add("telegram", {
  via: "self-host",
  botToken: process.env.TELEGRAM_BOT_TOKEN!,
  webhookUrl: "https://your.server/telegram",
})

cx.onMessage({ channel: "telegram", overlap: "queue" }, async (thread, msg) => {
  await thread.post(`You said: ${msg.text}`)
})

// POST your webhook route → cx.webhooks.telegram(req)

CLI equivalents for binding a channel and inspecting a thread:

caspian channels add telegram --via self-host --bot-token "$TG" \
  --webhook-url https://myapp.example.com/hook
caspian call post --thread telegram:123:456 --text "shipping now"
caspian threads tail telegram:123:456

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Not found in source — apply before daily use
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • One @cx.on_message rule set covers every channel; adding a channel is one more channels.add() call, not a new handler.
  • Inbound verification is built in for each platform (Slack signing secret, Meta X-Hub-Signature-256, Telegram secret header, X CRC, signed email webhooks), and mismatched requests are rejected.
  • Hosted and self-host modes share the same handler rules, so you can keep your own bot tokens and webhook routes in your own process.
  • Adapters consume each platform's real payload shapes; Python and TypeScript carry 650+ tests with zero network calls in CI, and rules in cx.app.rules are inspectable data.
  • thread.stream() posts once and edits as it writes, while send_blocks() renders one payload as Slack Block Kit, Discord embeds or Telegram keyboards and degrades on text-only channels.
  • Beyond the SDK there is a Bun CLI, an OpenClaw channel plugin, an OpenCode plugin and a runnable example per channel, so adoption isn't limited to one path.
Limitations
  • 1.0 is not compatible with the 0.6.x CommClient API and the README states there is no drop-in migration path; existing integrations must be rewritten.
  • The default hosted mode routes inbound events through the Caspian gateway at api.trycaspianai.com, which means registering an API key and depending on that cloud service.
  • X DM send/receive needs a paid X API subscription on your own developer app, and GSM modem SMS needs your own hardware plus carrier A2P compliance.
  • License metadata conflicts: the repository is listed as AGPL-3.0, while the README says Apache-2.0 for the repository and MIT for the PyPI package — confirm before adopting.
  • Self-hosting is not zero-config: every channel still needs its own bot token, signing secret, public webhook URL or socket extra.
  • The MCP server, Reddit/LinkedIn adapters and agent-native payments are roadmap items, not shipped features.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Caspian Agent Communication SDK This agent 46 · Major gaps — ★ 970 3mo ago Python Codex · Claude Code
Qwen Code 73 · Some gaps CLIFree + model costs ★ 31k today TypeScript OpenAI API · Claude API
Strands Agents 60 · Some gaps Library / SDKFree + model costs ★ 9.3k today TypeScript OpenAI API · Claude API
Mirascope 50 · Major gaps Library / SDKFree + model costs ★ 1.5k 3d ago Python Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
46/ 100 5-point scale 2.3 / 5
Trust 8/29
Reliability 6/14
Adaptability 12/18
Convention 10/18
Effectiveness 7/13
Verifiability 3/8
Why each dimension lost points
Trust8 / 29 · 1.4/5

CI uses minimal permissions (contents: read, persist-credentials: false) and SECURITY.md states adapters must never log or persist credentials — thin but positive. However, hosted mode (the default) routes all inbound messages through the vendor gateway at api.trycaspianai.com with only brief mention; no data retention, encryption, or compliance documentation. No evidence of user-confirmation mechanisms or rollback paths anywhere. The contradictory license statements also weigh here. Deductions: insufficient data-flow transparency, no rollback/confirmation evidence.

Reliability6 / 14 · 2.1/5

CI tests Python 3.10–3.12 matrices and pins TypeScript/CLI installs with --frozen-lockfile, supporting dependency availability. But the license self-contradiction (README badge says Apache-2.0, the LICENSE file is AGPL-3.0, and the text claims the PyPI package is MIT) caps self_consistency at 1. Error-message design (codes, retries, backoff) has no evidence in the provided files.

Adaptability12 / 18 · 3.3/5

Use cases are clearly enumerated (support, sales, assistants, community bots); hosted/self-host dual modes, Python + TypeScript, explicit Python 3.10+/Node 18+ requirements, declarative filters (channel/kind/command/overlap) show good trigger precision, and 'The fine print' discloses X API costs and GSM compliance limits. Not full marks because deeper environment fit (proxies, offline operation) lacks code-level evidence.

Convention10 / 18 · 2.8/5

Clean repo layout (packages/, per-channel examples/, starter templates), complete install notes (pip/npm, CLI, uv dev flow), and a 0.6.x migration table earn credit. But naming stability is poor (full 1.0 rewrite, no drop-in migration path), the LICENSE file (AGPL-3.0) directly contradicts README statements (Apache-2.0 / PyPI MIT), scoring 1; maintenance responsibility rests on a single personal email address with no governance or release-process file and no CHANGELOG evidence.

Effectiveness7 / 13 · 2.7/5

Normalized Thread/Message model, streaming replies, rich-message degradation, and offline fakes point to good output usability; the delete-your-adapter-layer value proposition is concrete and plausible. But cost/benefit is opaque: hosted-mode pricing, data residency, and gateway-dependency risk are all unspecified — deducted.

Verifiability3 / 8 · 1.9/5

Key claims ('650+ tests', 'we measured 42 open-source projects', '8–15% of issue trackers') are not traceable within the provided files — no citations or methodology. Cross-source corroboration is limited to PyPI/npm badges with no independent confirmation. Marketing prose blends with factual statements; facts and inference are not separated. CI config and test files are the few verifiable anchors but insufficient to raise the whole.

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • License information is seriously inconsistent: the repository LICENSE file is AGPL-3.0, the README badge says Apache-2.0, and the text claims the PyPI package is MIT. Obtain written confirmation of the actual license per distribution channel before enterprise adoption; AGPL carries copyleft obligations for closed-source integration.
  • The default hosted mode (via="hosted") routes all inbound messages and platform token metadata through the third-party gateway at api.trycaspianai.com and requires an account/key on their dashboard; assess data residency and compliance risk for sensitive business communications, or use self-host mode.
  • Publisher is unverified; vulnerability reporting goes to a single personal email ([email protected]) with no institutional security response process.
  • 1.0 is a full rewrite with no drop-in migration path from 0.6.x; verify the current API surface (Caspian, not CommClient) before integrating.
  • Quantitative claims ('650+ tests', '42 projects measured') are not traceable within the repository and should not drive procurement; this static review executed no tests.
  • X requires a paid API subscription and GSM modem SMS compliance is on the user — check the fine-print limits before making feature commitments.
Evidence confidence: Low Reviewed Sep 10, 2026 Reviewed revision 718a96d6d04c
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/caspian-sdk.svg)](https://followagents.com/en/agents/caspian-sdk)
<a href="https://followagents.com/en/agents/caspian-sdk"><img src="https://followagents.com/badge/caspian-sdk.svg" alt="FARS review"></a>
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts