npm i chat – Unified SDK for multi-platform chatbots
Vercel introduced a new open-source TypeScript SDK that lets developers write chatbot logic once and deploy to Slack, Microsoft Teams, Google Chat, Discord, GitHub, and Linear. The SDK features event-driven architecture, type-safe handlers, JSX-based UI rendering, state management adapters, and AI SDK streaming support.
Building chatbots across multiple platforms traditionally requires maintaining separate codebases and handling individual platform APIs.
Today, we're open sourcing the new 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.Chat SDK
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 functions accept an AI SDK text stream, enabling real-time streaming of AI responses and other incremental content to chat platforms.post()
The framework starts with the core 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.chat
Explore the to learn more.documentation
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
OpenAI Decisions API now available on AI Gateway
OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.
Timestamp attributes now supported in Vercel Flags
Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.
Glyph Cluster now available in stealth on AI Gateway
Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.