Skip to content
PluginStats

@21st-sdk/nextjs weekly downloads statistics

By 21st-sdk (2 listings) · npm · AI SDKs

Next.js integration for 21st Agents chat

View on npm Outdated · Oct 31, 2026

@21st-sdk/nextjs has 1,360 recorded weekly downloads on npm, an increase of 222% over the past 30 days, ranking #1989 of 3,247 tracked listings.

Weekly downloads
1,360
Official API · Dec 5, 2026
7-day growth
+204%
+912 weekly downloads
30-day growth
+222%
+938 weekly downloads
90-day growth
+71.9%
+569 weekly downloads
Rank
#1989
▲ 196 in 7 days

About @21st-sdk/nextjs

@21st-sdk/nextjs

Next.js integration for 21st Agents AI agent chat. Provides a server-side token handler so your API key never reaches the client.

Install

npm install @21st-sdk/nextjs @21st-sdk/react ai @ai-sdk/react

Quick Start

1. Set your API key
# .env.local
API_KEY_21ST=an_sk_your_key_here

Get your API key from the API keys page.

2. Create the token route (one line)
// app/api/agent/token/route.ts
import { createTokenHandler } from "@21st-sdk/nextjs/server"

export const POST = createTokenHandler({
  apiKey: process.env.API_KEY_21ST!,
})
3. Use in your page
// app/page.tsx
"use client"

import { useChat } from "@ai-sdk/react"
import { AgentChat, createAgentChat } from "@21st-sdk/nextjs"
import "@21st-sdk/react/styles.css"
import { useMemo } from "react"

export default function Chat() {
  const chat = useMemo(
    () => createAgentChat({
      agent: "your-agent-slug",
      tokenUrl: "/api/agent/token",
    }),
    [],
  )

  const { messages, sendMessage, status, stop, error } = useChat({ chat })

  return (
    <AgentChat
      messages={messages}
      onSend={(msg) =>
        sendMessage({ parts: [{ type: "text", text: msg.content }] })
      }
      status={status}
      onStop={stop}
      error={error}
    />
  )
}

That's it. Your an_sk_ API key stays on the server. The client only receives short-lived JWTs.

How It Works

Browser                     Your Next.js Server              Relay
  |                                |                            |
  |-- POST /api/agent/token ------>|                            |
  |                                |-- POST /v1/tokens -------->|
  |                                |   (with an_sk_ key)        |
  |                                |<-- { token, expiresAt } ---|
  |<-- { token, expiresAt } ------|                            |
  |                                                             |
  |-- POST /v1/chat/:agent ------(with short-lived JWT)------->|
  |<-- streaming response -----(SSE)---------------------------|

License

MIT

Description from the npm listing.

  • nextjs
  • react
  • ai
  • agent
  • chat
  • ai-sdk
  • 21st
  • 21st.dev

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

@21st-sdk/nextjs weekly downloads on npm, last 90 days: 1,360 weekly downloads as of Dec 5, 2026, +71.9% over 90 days.@21st-sdk/nextjsWeekly downloads on npm · Last 90 days1,360downloads / week+71.9% over 90 days02004006008001K1.2K1.4KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@21st-sdk/nextjs weekly downloads on npm, last 90 days: 1,360 weekly downloads as of Dec 5, 2026, +71.9% over 90 days.

7/30/90-day growth

@21st-sdk/nextjs weekly downloads growth on npm: +204% over 7 days, +222% over 30 days, +71.9% over 90 days.@21st-sdk/nextjsWeekly downloads growth on npm1,360downloads / week now7-day growth+912 weekly downloads+204%30-day growth+938 weekly downloads+222%90-day growth+569 weekly downloads+71.9%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@21st-sdk/nextjs weekly downloads growth on npm: +204% over 7 days, +222% over 30 days, +71.9% over 90 days.

Ranking history

@21st-sdk/nextjs npm ranking history: currently #1989 (by weekly downloads).@21st-sdk/nextjsnpm ranking · by weekly downloads · Last 90 days#1989current rank#1500#1600#1700#1800#1900#2000#2100#2200#2300Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 22 observations · Updated Dec 5, 2026pluginstats.com
@21st-sdk/nextjs npm ranking history: currently #1989 (by weekly downloads).

Listing placement

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

Listing placement

AI SDKs378 listings · 19 pages · page 11, #4 (overall #204)
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 (170)
Recent weekly downloads observations for @21st-sdk/nextjs
Date (UTC)Weekly downloadsChange vs. previous
1,360-22
1,382+147
1,235+270
965+475
490+82
408-35
443-5
448-99
547-34
581-24
605+1
604-28
632+6
626—

Similar npm AI SDKs plugins

All 20 @21st-sdk/nextjs 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/@21st-sdk/nextjs. First seen Oct 16, 2026; last successful collection Oct 31, 2026. See the methodology.