@chat-adapter/web 4.45.0
legitimate chat adapter package
“Web adapter for Chat SDK — browser chat UI over the AI SDK or AG-UI (TanStack AI) stream protocols”
Declares TypeScript development dependencyLicense text starts MIT/ISC/Apache/BSD
SHA-256d3ea986cf557f79a758411a3e09e5b9ba2fe6c009e209d44751f04b147fdcfa2
Evidence
1[](https://chat-sdk.dev/adapters/official/web)
2
3# @chat-adapter/web
4
5> npm package: [`@chat-adapter/web`](https://www.npmjs.com/package/@chat-adapter/web)
6
7[](https://vercel.com/kb/agent-stack)
8[](../../LICENSE)
9
10Web adapter for [Chat SDK](https://chat-sdk.dev). Lets a chat-sdk bot serve a browser chat UI alongside Slack, Teams, Discord, etc. — the same `bot.onDirectMessage(...)` handler fires for every platform.
11
12The adapter speaks the [AI SDK UI message stream protocol](https://ai-sdk.dev/docs/ai-sdk-ui/stream-protocol) by default, so React, Vue, and Svelte AI SDK clients work against the server endpoint. Set `protocol: "ag-ui"` to speak [AG-UI](https://docs.ag-ui.com/concepts/events) instead, for [TanStack AI](#tanstack-ai) and other AG-UI clients. The server has no runtime dependency on either client SDK.
13
14Documentation: [chat-sdk.dev/ …
14:102… ides: [vercel.com/kb/chat-sdk](https://vercel.com/kb/chat-sdk)
15
16## Installation
17
18```bash
19pnpm add @chat-adapter/web
20```
21
22Then install the client packages that match your UI:
23
24| Client | Packages | Import from | `protocol` |
25|--------|----------|--------- …
⋯9 lines
79### Client
80
81#### React
82
83```tsx
84// app/chat/page.tsx
85"use client";
86import { useChat } from "@chat-adapter/web/react";
87
88export default function ChatPage() {
89 const { messages, sendMessage, status, stop } = useChat();
90 // Render with `ai-elements` (<Conversation>, <Message>, <PromptInput>)
91 // or your own components — `messa …
335:39… e return the `Chat` instance directly. Access `chat.messages`, `chat.sendMessage()`, `chat.status`, and `chat.stop()` on that object instead of destructuring.
336
337## Configuration
338
339| Option | Required | Description |
340|--------|----------|----- …
416:69… essage"
417
418- The adapter only handles new user turns. Client-side tool results and automatic resubmits (for example, `useChat`'s `sendAutomaticallyWhen`) send a body ending in an assistant or tool message, which isn't supported.
419
420## AI Coding Agents
421
422If you use an AI coding agent such as OpenAI Codex, Claude Code, or Cursor, install the Chat SDK skill so it knows the SDK APIs, adapter patterns, and project conventions before writing code. …
Showing the top 5 files — 2 more files (18 regions) not shown.
No evidence locations were recorded for this file. Raw result