← Back to Leaderboard
CTryCaspian

TryCaspian/caspian-sdk

A Python and TypeScript SDK that routes multiple messaging channels to one agent.

AI FrameworkQuickstart ↓
Engineering Health (Methodology)
B · 56/100
Maintenance Activity
● Updated 3mo ago
Latest Release
v0.1.2
Commercial License Check
AGPL-3.0 · Copyleft Warning

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance12/35
Fork Adoption19/25
Release Cadence14/20
License Clarity11/20
DockerSelf-HostedCLIAPI
Total Stars
★ 970
24h Growth
+0
7d Growth
+2
Forks
138

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

TryCaspian/caspian-sdk Star History (2026-07-20 - 2026-12-03) ALL-TIME STAR HISTORY (2026-07 – 2026-12) +969 in 136d · avg +7/day 1k 512 0 2026-07-20: ★ 12026-08-01: ★ 3662026-08-15: ★ 6892026-08-29: ★ 8882026-09-12: ★ 9452026-09-26: ★ 9542026-10-10: ★ 9572026-10-24: ★ 9602026-11-02: ★ 9612026-11-11: ★ 9652026-11-20: ★ 9662026-12-03: ★ 970 ★ 970 07-20 09-26 12-03

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

Caspian is a transport layer for human-facing agents, not a reasoning runtime. Channel adapters verify inbound traffic, normalize payloads into kernel events, and dispatch those events to declarative message or action handlers. Handlers work with a common Thread and Message model; replies use the thread context to reach the originating conversation. Rules are inspectable through cx.app.rules, with overlap policies such as queue, debounce, drop, and parallel affecting what happens when messages arrive while a handler is busy.

The 1.0 facade lives in packages/python and packages/typescript. Hosted bindings poll a gateway; self-hosted bindings run adapters in the application process behind a webhook route or, for supported channels, a socket listener. The root uv workspace links the local Python package and configures pytest against packages/python/tests. The Bun CLI in packages/cli uses the SDK command surface; OpenClaw and OpenCode integrations are separate packages rather than prerequisites for message dispatch.

Key Capabilities & Differentiators

The SDK handles threaded replies, immediate acknowledgements, typing indicators, media, reactions, and callback actions. Streaming is implemented by posting once and editing the message as content arrives. Rich blocks map to native representations such as Slack Block Kit, Discord embeds, and Telegram keyboards, with plain-text fallback where needed. cx.tools(thread) exposes schemas derived from the same command catalog that handlers use; it does not choose or run a model.

Channel availability depends on deployment mode. The 1.0 matrix lists local Telegram bot webhooks or polling, Discord socket inbound, and Slack sockets or webhooks, alongside adapters for channels including email, WhatsApp Business, and Twilio SMS or voice. Linear is listed as self-host only; Bluesky and Instagram DM are listed as hosted only. Inbound verification is provider-specific, including Slack signing secrets, Meta X-Hub-Signature-256, and Telegram's secret header. The offline fakes exercise platform-shaped payloads without live provider calls.

Trade-offs & Limitations

Compared with native channel SDKs, Caspian removes duplicate routing, reply handling, and test scaffolding when several channels share an agent. The cost is an abstraction boundary: rich-message behavior and channel availability still vary, so verify every required channel and feature in the intended mode. The common thread model routes replies, but do not treat it as evidence of automatic identity matching across platforms. For a single-channel application that depends on native features, a direct integration may be simpler.

Hosted mode reduces the inbound infrastructure you operate but adds a gateway dependency and a polling path. Direct self-hosting gives you control over ingress and tokens while leaving endpoint availability, credentials, and socket operations to your team. It does not remove upstream constraints: X DMs require paid API access, and GSM-modem SMS requires a modem, SIM, and attention to carrier rules. Review AGPL-3.0 obligations before modifying and operating the software as a network service.

Hardware & Deployment Guide

The SDK requires Python 3.10+ or, for TypeScript, Node.js 18+ or Bun. For hosted use, configure CASPIAN_API_KEY and run cx.run() to poll the gateway; CASPIAN_BASE_URL can override the endpoint. In-process self-hosting uses platform credentials and your own ingress: route HTTP requests to cx.handle() in Python or the channel webhook handler in TypeScript. Slack and Discord socket inbound can avoid a public webhook URL; the Python Discord listener requires the optional caspian-sdk[discord] extra.

The Docker Compose path is a separate gateway setup. It builds ./server, publishes port 8000, uses PostgreSQL and an inline worker, and defaults to a credential-free fake provider and a development bootstrap key. Replace that key before exposing the service. The v0.1.2 release covers the first public open core, the Compose quickstart still targets CommClient, and the SDK examples describe the 1.0 Caspian rewrite. These are distinct surfaces: pin a matching package and gateway revision before deployment rather than assuming the legacy Compose example works with the 1.0 SDK.

Dispatch: Inspectable cx.app.rules apply channel, chat-kind, and command filters, with acknowledgement and overlap policies.
Ingress: Adapters verify incoming webhooks using platform-specific mechanisms such as Slack signing secrets, Meta HMAC signatures, and Telegram secret headers.
Delivery: Thread supports contextual replies, rich blocks with text fallback, and streaming by editing a posted message.
Testing: Channel fakes accept platform-shaped payloads; the project lists more than 650 Python and TypeScript tests and network-free CI.
Packaging: TypeScript offers per-channel imports such as caspian-sdk/telegram for parse, plan, and execute without the full SDK facade.
Tooling: cx.tools(thread) exposes kernel-derived command schemas; the Bun CLI offers catalog, call, and threads tail.
Best For

Support assistants and community bots that should share handler logic across email, Slack, Telegram, or Discord while replying in the originating thread.

Skip If

You only need one channel's native features, require a channel unavailable in your chosen deployment mode, or need agent-to-agent interoperability rather than human messaging.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

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

Comparison vs. Top Agents & Frameworks Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
caspian-sdk ★970+2PythonAGPL-3.0A Python and TypeScript SDK that routes multiple messaging channels to one agent
browser-use122.7k+477PythonMITPython REPL and CDP for adaptive browser automation
langgraph45.8k+293PythonMITPython graph orchestration for stateful, resumable agents and workflows
langchain150.4k+290PythonMITModular Python framework for building agents across model providers

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/TryCaspian/caspian-sdk.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

TryCaspian/caspian-sdk Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about caspian-sdk

How do I connect an existing agent without rewriting its reasoning loop?

With the 1.0 API, register channels through channels.add() and call your agent from an on_message handler. Use the provided Thread to reply in context. Hosted inbound arrives through cx.run() polling; for an in-process webhook adapter, pass the request body and headers to cx.handle(). For Slack or Discord socket inbound, use cx.listen() where supported.

Does the SDK need a GPU, and how should I size it?

The messaging layer has no documented GPU, CUDA, or VRAM requirement. Size the application process for simultaneous handlers, open connections, and message or media volume. If you run the gateway container, budget separately for PostgreSQL and the inline worker. Any local model inference is a separate sizing problem; no fixed CPU or RAM baseline is established.

Can we self-host Caspian for a commercial product?

The repository is labeled AGPL-3.0, which permits commercial use. If you modify covered software and let users interact with that modified version over a network, the license generally requires offering those users the corresponding source. Review how the gateway and SDK are integrated with proprietary code rather than assuming the same obligations apply to every separate service. Provider terms and fees still apply when you self-host.

When are native channel SDKs or agent-to-agent protocols a better fit?

Use a native platform SDK when you only need one channel or depend on platform-specific events, permissions, or UI behavior. Caspian earns its place when multiple transports would otherwise duplicate session routing, threading, concurrency rules, and test fixtures. A2A and ACP serve a different boundary: communication between agents, not delivery to people on messaging platforms.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining TryCaspian/caspian-sdk? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature TryCaspian/caspian-sdk on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare