The web adapter for Chat SDK brings your agent to the browser. Define a bot on your server, then stream agent responses with @aisdk's ๐๐๐๐ฒ๐๐๐ hook. https://t.co/LKvMe52O3h
Vercel Chat SDK Adds Web Adapter to Bring Agents into the Browser
Vercel, a frontend cloud platform, added web and Messenger adapters to its Chat SDK โ a TypeScript library for building multi-platform AI agents. The web adapter lets developers define a bot on the server and stream responses to a browser UI using the
useChat hook (a React utility for managing conversational state).This shift unifies in-product assistants with third-party bots. Previously, developers often maintained separate logic for their website's chat widget and Vercel's multi-platform agentic bots. By centralizing event handlers, teams can now deploy consistent agent behavior across Slack, Discord, and their own web properties without duplicating code.
You can implement the web adapter by importing createWebAdapter and wiring it into your server-side bot definition. The Messenger adapter is also live, supporting media, reactions, and postback buttons. Both adapters are available now in the Chat SDK, which remains Vercel's open-source Chat SDK for cross-platform AI development.
Vercel Developers
@vercel_dev
9retweets78likes
View on XStill wondering? A few quick answers below.
The web adapter is a new component for Vercel's Chat SDK that allows developers to integrate AI agents directly into browser-based applications. It connects a server-side bot definition to a frontend chat interface, enabling features like in-product assistants or support agents. This allows teams to use the same backend logic for web chat as they do for third-party platforms.
Developers can integrate the web adapter by using the useChat hook from the Vercel AI SDK. After defining the bot and its web adapter on the server, the hook allows the React application to stream agent responses and manage chat state. This setup provides the same event handlers and streaming capabilities used for integrations like Slack or Discord.
The Messenger adapter enables AI agents to interact with users on Facebook Messenger. It supports a variety of interaction types beyond simple text, including reactions, media attachments, and postback buttons. This allows developers to build more interactive and rich conversational experiences within the Messenger ecosystem using the unified Chat SDK framework and a single codebase.
With the latest updates, the Vercel Chat SDK supports a wide range of platforms including web browsers, Facebook Messenger, Slack, Discord, and Microsoft Teams. This multi-platform support allows developers to write their bot logic once and deploy it across various communication channels using specialized adapters for each service, ensuring consistent agent behavior regardless of where the user is interacting.
The web adapter includes a configuration option to identify users during a chat session. When creating the adapter on the server, developers can define a function to retrieve user information, such as an ID, from the incoming request. For example, this can be done by extracting a user identifier from a browser cookie to maintain session persistence and context.




