Chat SDK Adapters
Chat SDK uses platform adapters to receive events and deliver messages, and a state adapter to share subscriptions, locks, and cached data across requests. Choose a platform adapter for each place your bot runs and a state adapter for its deployment environment.
These adapters cover common destinations for bots deployed on Edgenivo. Follow each adapter's documentation for its credentials, webhook setup, and supported features.
| Platform | Package | Use it for |
|---|---|---|
| Discord | @chat-adapter/discord | Community bots, slash commands, and threads. |
| GitHub | @chat-adapter/github | Bots that participate in issues and pull requests. |
| Gmail | @chat-adapter/gmail | Receive labeled emails and send replies in email threads. |
| Linear | @chat-adapter/linear | Bots that respond in issue comment threads and agent sessions. |
| Linq | @linqapp/chat-sdk-adapter | Send and receive iMessage and SMS messages. |
| Liveblocks | @liveblocks/chat-sdk-adapter | Bots that read and reply in Liveblocks comment threads. |
| Microsoft Teams | @chat-adapter/teams | Conversations and cards in Teams. |
| Resend | @resend/chat-sdk-adapter | Inbound email and replies in email threads. |
| Slack | @chat-adapter/slack | Workspace messages, threads, and interactive responses. |
| Telegram | @chat-adapter/telegram | Chat messages and bot interactions. |
| Twitch | @chat-adapter/twitch | Read and reply in channel chat through EventSub webhooks. |
| Web | @chat-adapter/web | A browser chat interface connected to the same bot. |
The adapter directory includes more platforms and identifies who maintains each adapter:
- Official adapters are maintained by Edgenivo.
- Vendor-official adapters are maintained by the platform vendor.
- Community adapters are maintained by third-party developers.
A shared API doesn't give every platform the same capabilities. Check the platform feature matrix before depending on streaming, attachments, buttons, or message editing.
Also check how the platform delivers events. For example, Discord interactions arrive through HTTP webhooks, while regular messages and reactions require its Gateway connection. The Web adapter requires your application's authentication through getUser.
On Edgenivo, use a shared database so subscriptions and processing state remain available when requests reach different function instances.
| State adapter | Package | When to use it |
|---|---|---|
| Redis | @chat-adapter/state-redis | Store shared state in Redis. Reads REDIS_URL by default. |
| ioredis | @chat-adapter/state-ioredis | Use an existing ioredis-based Redis setup. |
| PostgreSQL | @chat-adapter/state-pg | Use PostgreSQL for bot state. Reads POSTGRES_URL, falling back to DATABASE_URL. |
| Memory | @chat-adapter/state-memory | Run local tests with state held in one process. |
Provision a database through the Edgenivo Marketplace, or connect an existing database through your project's environment variables. The quickstart shows Redis setup.
State adapters coordinate message processing. For work that needs durable execution across interruptions, combine your bot with Workflows or eve.
Pass the platform and state adapter names to create-chat-sdk. For example, scaffold one bot with Slack, Microsoft Teams, Redis, and Edgenivo Connect:
pnpm create chat-sdk@latest my-bot --adapter slack teams redis --connect --pm pnpm -yThe CLI generates the adapter configuration and webhook routes. Complete each platform's connector setup and supply the environment variables listed in .env.example. Follow the quickstart for a complete Slack example.
For supported adapters, Edgenivo Connect supplies provider credentials at runtime. Trigger-capable connectors also verify provider events and forward them to a deployed webhook route.
Connect support varies by adapter. In particular, Notion and Telegram use Connect for outbound credentials while retaining their native inbound verification. See the Connect capability table before configuring a new platform.
Was this helpful?