Skip to main content

One identity for your AI agent across every channel — email, Slack, Discord, WhatsApp, SMS, X, Telegram, iMessage — behind a single on_message handler.

Project description

caspian-sdk

Give your AI agent one identity that reaches any human, on whatever app they already use — email, Slack, Discord, WhatsApp, SMS, X, Telegram, iMessage — all behind a single on_message handler.

You write the handler once. Caspian handles the provider quirks, threading, delivery, and dedup for every channel.

pip install caspian-sdk

Quickstart

from caspian_sdk import CommClient

client = CommClient(api_key="YOUR_KEY")

# Connect any channel — email needs nothing; others take a token or one-click OAuth.
inbox = client.connect_email()
print("Agent address:", inbox["address"])

@client.on_message
def handle(message):
    # The same handler answers every channel you connect.
    message.reply(f"Thanks! You said: {message.text}")

client.listen()  # one loop, every channel

Channels

Connect
Email connect_email() — default domain or your own
Slack install_slack() (one-click) or connect_slack(...)
Discord install_discord() (one-click) or connect_discord(...)
X / Twitter install_x() (one-click) or connect_x(...)
WhatsApp connect_whatsapp(...) (Caspian hosted)
SMS / phone connect_phone(...) — own GSM modem, or Caspian hosted
Telegram connect_telegram(bot_token=...)
iMessage connect_imessage() (Caspian hosted)

Rich messages

Send one provider-neutral blocks payload and each channel gets its best rendering — Slack, Discord and Telegram render natively, email gets rich HTML, and text-only channels degrade to clean text automatically.

from caspian_sdk import blocks as b

message.reply(blocks=[
    b.card(
        title="Order #1024 shipped",
        subtitle="Arriving Thursday",
        buttons=[
            {"label": "Track", "url": "https://example.com/track/1024"},
            {"label": "Get help", "value": "help:1024"},  # callback
        ],
    ),
])

Block types: heading, text, divider, image, fields, list, buttons, card. A button with a url is a link; a button with a value is a callback.

How it works

  • One handler, every channel. Adding a channel is another connect_*() call — never new handler code.
  • message.reply() answers in the right thread on the right channel automatically.
  • message.typing() shows a "typing…" indicator while your agent thinks (where the platform supports it).
  • client.listen() is resilient — a handler error or a dropped poll won't stop the loop.

Docs

Point your coding agent at the setup guide and it does the whole integration for you. Full docs and your API key: trycaspianai.com.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

caspian_sdk-0.4.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

caspian_sdk-0.4.0-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file caspian_sdk-0.4.0.tar.gz.

File metadata

  • Download URL: caspian_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for caspian_sdk-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c1a7f511efc2ab86571be002ee489f7f0fcf4ab9a3a385544b6892135efd94f7
MD5 c7a40971c66bf0add5d075adb0e56cb6
BLAKE2b-256 ec0edf019286932c3319fd86ab1e9c1a50abb9867dcbaf27019ac278526cd0b6

See more details on using hashes here.

File details

Details for the file caspian_sdk-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: caspian_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for caspian_sdk-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a667bba8a0b23101ff3f59b0bff55dda64f5cd7f8ee6b32c2f73b03669ac719
MD5 1a9ad29a8bdab32f8585fda0ff6c7fca
BLAKE2b-256 24965d86d903b23a43cb6cd094fb316ba7c8b3241cec60b17d66daf36e81d635

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page