Skip to content
PluginStats

@chat-adapter/web weekly downloads statistics

By chat-adapter (14 listings) · npm · AI SDKs

Web adapter for Chat SDK — browser chat UI over the AI SDK or AG-UI (TanStack AI) stream protocols

View on npm Fresh · Dec 6, 2026

@chat-adapter/web has 115,553 recorded weekly downloads on npm, an increase of 362% over the past 30 days, ranking #623 of 3,247 tracked listings.

Weekly downloads
115,553
Official API · Dec 5, 2026
7-day growth
+99.7%
+57.7K weekly downloads
30-day growth
+362%
+90.5K weekly downloads
90-day growth
+312%
+87.5K weekly downloads
Rank
#623
▲ 108 in 7 days

About @chat-adapter/web

Web adapter for Chat SDK

@chat-adapter/web

npm package: @chat-adapter/web

Agent Stack MIT License

Web adapter for Chat SDK. Lets a chat-sdk bot serve a browser chat UI alongside Slack, Teams, Discord, etc. — the same bot.onDirectMessage(...) handler fires for every platform.

The adapter speaks the AI SDK UI message 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 instead, for TanStack AI and other AG-UI clients. The server has no runtime dependency on either client SDK.

Documentation: chat-sdk.dev/adapters/official/web · Guides: vercel.com/kb/chat-sdk

Installation

pnpm add @chat-adapter/web

Then install the client packages that match your UI:

ClientPackagesImport fromprotocol
AI SDK + React / Next.jsai, @ai-sdk/react@chat-adapter/web/react"ai-sdk" (default)
AI SDK + Vue / Nuxtai, @ai-sdk/vue@chat-adapter/web/vue"ai-sdk" (default)
AI SDK + Svelte / SvelteKitai, @ai-sdk/svelte@chat-adapter/web/svelte"ai-sdk" (default)
TanStack AI@tanstack/ai-react (or another TanStack AI framework package)@tanstack/ai-react"ag-ui"

Scaffold with the CLI

To scaffold a new browser chat bot with the Web adapter preselected:

npx create-chat-sdk@latest my-bot --adapter web memory

Visit the adapters directory to see other available official and vendor-official adapters.

Quick start

Server
// lib/bot.ts
import { Chat } from "chat";
import { createWebAdapter } from "@chat-adapter/web";
import { createMemoryState } from "@chat-adapter/state-memory";

export const bot = new Chat({
  userName: "mybot",
  adapters: {
    web: createWebAdapter({
      userName: "mybot",
      getUser: (req) => ({ id: getUserIdFromCookie(req) }),
    }),
  },
  state: createMemoryState(),
});

bot.onDirectMessage(async (thread, message) => {
  await thread.post(`You said: ${message.text}`);
});
// app/api/chat/route.ts
import { after } from "next/server";
import { bot } from "@/lib/bot";

export async function POST(request: Request): Promise<Response> {
  return bot.webhooks.web(request, {
    waitUntil: (task) => after(() => task),
  });
}
Client
React
// app/chat/page.tsx
"use client";
import { useChat } from "@chat-adapter/web/react";

export default function ChatPage() {
  const { messages, sendMessage, status, stop } = useChat();
  // Render with `ai-elements` (<Conversation>, <Message>, <PromptInput>)
  // or your own components — `messages`, `sendMessage`, `status` are the
  // standard `@ai-sdk/react` API.
}
Vue
<!-- components/Chat.vue -->
<script setup lang="ts">
import { useChat } from "@chat-adapter/web/vue";

const chat = useChat({ api: "/api/chat" });
</script>

<template>
  <div v-for="msg in chat.messages" :key="msg.id">
    <template
      v-for="(part, index) in msg.parts"
      :key="`${msg.id}-${part.type}-${index}`"
    >
      <p v-if="part.type === 'text'">{{ part.text }}</p>
    </template>
  </div>
</template>
Svelte
<!-- Chat.svelte -->
<script lang="ts">
  import { useChat } from "@chat-adapter/web/svelte";

  const chat = useChat({ api: "/api/chat" });
</script>

{#each chat.messages as msg (msg.id)}
  {#each msg.parts as part, index (`${msg.id}-${part.type}-${index}`)}
    {#if part.type === "text"}<p>{part.text}</p>{/if}
  {/each}
{/each}
TanStack AI

Set protocol: "ag-ui" on the adapter, then point TanStack AI's useChat at the route with fetchServerSentEvents:

createWebAdapter({
  userName: "mybot",
  getUser: (req) => ({ id: getUserIdFromCookie(req) }),
  protocol: "ag-ui",
});
// app/chat/page.tsx
"use client";
import { fetchServerSentEvents, useChat } from "@tanstack/ai-react";

export default function ChatPage() {
  const { messages, sendMessage, isLoading, stop } = useChat({
    connection: fetchServerSentEvents("/api/chat"),
    threadId: "support-1",
  });
  // Text parts carry their text in `part.content`.
}

threadId becomes the conversation id in the chat-sdk thread id. Each thread.post call arrives as its own assistant message, and handler errors end the run with a RUN_ERROR event.

Authentication

getUser is the security boundary for the Web adapter. Unlike Slack/Teams where the platform signs every webhook, web requests come straight from a browser — you must identify the caller yourself. Returning null causes the adapter to respond with HTTP 401 and no handler runs.

Plug in whatever your app already uses:

// NextAuth
createWebAdapter({
  userName: "mybot",
  getUser: async (req) => {
    const session = await getServerSession(authOptions);
    if (!session?.user) return null;
    return { id: session.user.id, name: session.user.name };
  },
});

// Clerk
createWebAdapter({
  userName: "mybot",
  getUser: async (req) => {
    const { userId, sessionClaims } = await auth();
    if (!userId) return null;
    return { id: userId, name: sessionClaims?.name as string | undefined };
  },
});…

Description from the npm listing.

  • chat
  • chat-sdk
  • chatbot
  • web
  • react
  • vue
  • svelte
  • useChat
  • ai-sdk
  • ag-ui
  • tanstack-ai
  • ai-agent
  • bot
  • adapter
  • vercel

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@chat-adapter/web weekly downloads on npm, last 90 days: 115,553 weekly downloads as of Dec 5, 2026, +312% over 90 days.@chat-adapter/webWeekly downloads on npm · Last 90 days115,553downloads / week+312% over 90 days020K40K60K80K100K120KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@chat-adapter/web weekly downloads on npm, last 90 days: 115,553 weekly downloads as of Dec 5, 2026, +312% over 90 days.

7/30/90-day growth

@chat-adapter/web weekly downloads growth on npm: +99.7% over 7 days, +362% over 30 days, +312% over 90 days.@chat-adapter/webWeekly downloads growth on npm115,553downloads / week now7-day growth+57,692 weekly downloads+99.7%30-day growth+90,541 weekly downloads+362%90-day growth+87,533 weekly downloads+312%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@chat-adapter/web weekly downloads growth on npm: +99.7% over 7 days, +362% over 30 days, +312% over 90 days.

Ranking history

@chat-adapter/web npm ranking history: currently #623 (by weekly downloads).@chat-adapter/webnpm ranking · by weekly downloads · Last 90 days#623current rank#300#400#500#600#700#800#900#1000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
@chat-adapter/web npm ranking history: currently #623 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 32, #3 (overall #623)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 3, #3 (overall #43)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for @chat-adapter/web
Date (UTC)Weekly downloadsChange vs. previous
115,553+332
115,221+6.6K
108,659+11.2K
97,476+6.5K
91,023+10.9K
80,132+12K
68,119+10.3K
57,861+3.3K
54,512+2.5K
51,987+1.1K
50,927+5.2K
45,725+141
45,584-1.7K
47,331—

Similar npm AI SDKs plugins

All 20 @chat-adapter/web alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@chat-adapter/web. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.