chat  by vercel

Unified SDK for cross-platform chat bots

Created 2 months ago
788 stars

Top 44.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

A unified TypeScript SDK, Vercel Chat simplifies building chat bots by enabling developers to write bot logic once and deploy it across multiple platforms including Slack, Microsoft Teams, Google Chat, Discord, GitHub, and Linear. This approach significantly reduces development effort and maintenance overhead for cross-platform bot applications.

How It Works

The SDK utilizes a core Chat class coupled with platform-specific adapters. Developers define bot interactions and logic in a single TypeScript codebase, abstracting away the intricacies of each chat platform. A notable design choice is the use of JSX for declaratively defining interactive UI components like cards, offering a familiar development paradigm for rich user experiences. The system also incorporates AI streaming capabilities, providing native support where available and a fallback mechanism for broader compatibility.

Quick Start & Requirements

Installation is performed via npm: npm install chat. Platform-specific adapters, such as @chat-adapter/slack or @chat-adapter/teams, must be installed separately. Core prerequisites include Node.js and TypeScript. Deployment will require obtaining API credentials and configuring webhooks for each target chat platform. Comprehensive documentation is available at chat-sdk.dev/docs.

Highlighted Details

  • Cross-Platform Unification: Enables a single codebase for Slack, Microsoft Teams, Google Chat, Discord, GitHub, and Linear.
  • AI Streaming: Supports streaming LLM responses, featuring native integration for Slack and a post+edit fallback.
  • Declarative UI: Leverages JSX for creating interactive cards compatible with various platform formats (Block Kit, Adaptive Cards, Google Chat Cards).
  • Rich Event Handling: Manages a wide array of events including mentions, messages, reactions, button clicks, slash commands, and modals.
  • Platform Features: Includes type-safe emoji support, file uploads, direct messages, and ephemeral messages.

Maintenance & Community

No specific details regarding maintainers, community channels (e.g., Discord, Slack), or roadmap were provided in the README snippet.

Licensing & Compatibility

The project is licensed under the MIT license, which is highly permissive and generally allows for commercial use and integration into closed-source applications without significant restrictions.

Limitations & Caveats

Feature support varies across platforms. Microsoft Teams offers read-only reactions, and Modals are not supported on Teams, Google Chat, or Discord. AI streaming relies on a post+edit fallback for platforms other than Slack. The GitHub and Linear adapters present a more limited feature set compared to the others.

Health Check
Last Commit

15 hours ago

Responsiveness

Inactive

Pull Requests (30d)
86
Issues (30d)
15
Star History
825 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.