Caspian 是一个开源 SDK 和网关,让 AI 代理通过单一处理器在多个渠道(Slack、Discord、Telegram、邮件等)上进行通信,免去每个渠道的适配器代码。

Stars

243

7 天增长

暂无数据

Fork 数

112

开放 Issue

60

开源协议

AGPL-3.0

最近更新

2026-07-25

为什么值得关注

它解决了代理开发中的常见痛点——渠道集成——通过统一接口处理 webhook 验证、线程化和平台差异,基于真实数据(其他代理框架中 8–15% 的问题跟踪器工作量用于渠道相关开发)。

适合谁使用

  • AI 代理开发者
  • 构建多渠道客户支持机器人的团队
  • 希望减少维护开销的开源项目
  • 使用编码代理(Claude Code、Cursor 等)的开发者

典型使用场景

  • 客户支持代理通过同一代码库处理邮件、Slack 和 Instagram 私信
  • 跨 Telegram、邮件和 Slack 拥有单一身份的个人助手
  • 同时运行在 Discord、Slack 和私信中的社区机器人
  • 从一个渠道开始、在另一渠道跟进的销售跟进机器人

项目优势

  • 所有渠道共享一个 on_message 处理器,大幅减少代码重复
  • 自动进行 webhook 验证和签名检查,确保各平台安全
  • 每个渠道都有离线模拟器,使用真实载荷格式,支持 80+ 测试无需网络
  • 行为提示功能让代理动态调整每个渠道的语气和礼仪

使用前须知

  • 部分渠道(X、WhatsApp、iMessage)需要付费订阅或开发者登录
  • Telegram 用户账号自动化违反服务条款,存在封禁风险
  • 默认使用托管网关;自托管需要手动设置 CASPIAN_BASE_URL

README 快速开始

Website · PyPI · npm · llms.txt for agents · Contributing

English · 简体中文

The largest OSS agent frameworks each built 25+ channel adapters — and still spend8–15% of their issue trackers on channel plumbing. Caspian makes it one handler.


Your agent's reasoning decides what to say. Caspian is how it exists on Slack, Discord, Telegram, Instagram, email, X, and beyond — one connect call per channel, one handler for all of them, threading, webhook verification, and platform quirks handled.

Get started in 30 seconds

Building in a coding agent (Claude Code, Codex, Cursor, Kimi, …)? Paste this — it reads the live guide and does the whole integration for you:

Integrate Caspian so my agent can message people on email, Slack, Discord, Telegram, and more.
Read https://api.trycaspianai.com/SKILL.md and follow it end to end.

That's the fastest path — the guide at /SKILL.md is always current, so your agent installs the SDK, mints a key, connects a channel, and writes the handler itself.

Or set it up by hand:

cd your-project
pip install caspian-sdk        # the library (import into your code)
pipx install caspian-cli       # the CLI (gives the `caspian` command) — or: uvx caspian-cli
caspian init                   # mints a key, writes CASPIAN_API_KEY + CASPIAN_BASE_URL to .env
caspian connect email          # free, instant

Then in your code:

from caspian_sdk import CommClient

client = CommClient()  # reads CASPIAN_API_KEY / CASPIAN_BASE_URL from .env
email = client.connect_email(username="example-agent")
print(f"Agent email: {email['address']}")
print("Listening (Ctrl+C to stop).")


@client.on_message
def handle(message):
    sender = (message.sender or {}).get("address", "?")
    print(f" **Node / TypeScript:** the library is `npm install caspian-sdk`. The `caspian` CLI is a
> standalone tool (Python) — run it with `uvx caspian-cli init` / `pipx install caspian-cli`,
> or just use the SDK directly (below); nothing else about the flow changes.

The SDK talks to the **hosted gateway at `https://api.trycaspianai.com`** by default (set `CASPIAN_BASE_URL` to point at a self-hosted one). **Free channels — email, Telegram, Slack, Discord — connect instantly, no sign-in.** Paid channels (X, WhatsApp, iMessage) pro

项目描述

One identity for your AI agent across Slack, Discord, Telegram, WhatsApp, Instagram, email, SMS, X — a single on_message handler. Open-source channel adapters + bot SDK (Python & TypeScript) + CLI.

相关仓库与替代方案

根据分类、Topic 和编程语言匹配的相似项目。

mereyabdenbekuly-ctrl
精选
mereyabdenbekuly-ctrl GitHub avatar

clodex-ide

Clodex is an open-source, local-first agentic IDE that combines persistent AI tasks, code, terminal, browser, Git, models, memory, and governed execution in one Electron workspace, currently in technical preview.

AI 与机器学习AI 智能体
833
NousResearch
精选
NousResearch GitHub avatar

hermes-agent

Hermes Agent is an open-source, self-improving AI agent with a built-in learning loop that creates skills from experience, runs across platforms, and supports any LLM provider.

AI 与机器学习
215,644
lopopolo
精选
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI 与机器学习AI 智能体
2,320