Yesterday's Top Poster

Introducing npm i chat – One codebase, every chat platform

  • Thread starter Thread starter Hayden Bleasel, Malte Ubl, Fernando Rojo, John
  • Start date Start date
Building chatbots across multiple platforms traditionally requires maintaining separate codebases and handling individual platform APIs.

Today, we're open sourcing the new Chat SDK in public beta. It's a unified TypeScript library that lets teams write bot logic once and deploy it to Slack, Microsoft Teams, Google Chat, Discord, GitHub, and Linear.

The event-driven architecture includes type-safe handlers for mentions, messages, reactions, button clicks, and slash commands. Teams can build user interfaces using JSX cards and modals that render natively on each platform.

The SDK handles distributed state management using pluggable adapters for Redis, ioredis, and in-memory storage.


You can post messages to any provider with strings, objects, ASTs and even JSX!


Chat SDK post() functions accept an AI SDK text stream, enabling real-time streaming of AI responses and other incremental content to chat platforms.


The framework starts with the core chat package and scales through modular platform adapters. Guides are available for building a Slack bot with Next.js and Redis, a Discord support bot with Nuxt, a GitHub bot with Hono, and automated code review bots.

Explore the documentation to learn more.



Read more

Continue reading...
 
Back
Top