Skip to content
PluginStats

@upstash/agentkit-ai-sdk weekly downloads statistics

By upstash (8 listings) · npm · AI SDKs

Upstash AgentKit adapter for the Vercel AI SDK: chat history, memory tools, Redis-Search tools, rate limiting, and cached tools.

View on npm Fresh · Dec 6, 2026

@upstash/agentkit-ai-sdk has 6,159 recorded weekly downloads on npm, a decrease of 60.6% over the past 30 days, ranking #1453 of 3,247 tracked listings.

Weekly downloads
6,159
Official API · Dec 5, 2026
7-day growth
-47.1%
-5.5K weekly downloads
30-day growth
-60.6%
-9.5K weekly downloads
90-day growth
+208%
+4.2K weekly downloads
Rank
#1453
▼ 269 in 7 days

About @upstash/agentkit-ai-sdk

@upstash/agentkit-ai-sdk

Vercel AI SDK adapter for Upstash AgentKit — drop-ins for generateText / streamText. redis defaults to Redis.fromEnv(), so you import only from this package.

ImportFeature
createChatHistoryDurable chat history on Redis Search — save, list, and $smart-search a user's transcripts.
createAgentMemoryMemory provider: memory tools and automatic recall into the instructions via prepareStep.
createMemoryToolsrecall_memory + save_memory tools so the model reads and writes long-term memory.
createSearchToolssearch / aggregate / count tools over a Redis Search index (this is how you do RAG).
createRateLimitA configured Upstash Ratelimit to call before the model.
cachedToolsMemoize a map of AI SDK tools' results in Redis.
pnpm add @upstash/agentkit-ai-sdk @upstash/redis ai

Chat history

A Redis-backed ChatHistory<UIMessage>, the durable source of truth for your conversations. userId comes from your auth session; chatId is the useChat id that the client posts. Save the full transcript from your route's onFinish:

// app/api/chat/route.ts
import { convertToModelMessages, createUIMessageStreamResponse, streamText, toUIMessageStream } from "ai";
import { createChatHistory } from "@upstash/agentkit-ai-sdk";

const history = createChatHistory();

export async function POST(req: Request) {
  const userId = await getSessionUserId(req); // your auth session — never trust a client-sent id
  const { id: chatId, messages } = await req.json(); // useChat posts its chat id + the full transcript

  const result = streamText({ model, messages: convertToModelMessages(messages) });

  return createUIMessageStreamResponse({
    stream: toUIMessageStream({
      stream: result.stream,
      originalMessages: messages,
      onFinish: ({ messages }) =>
        history.saveChat({ userId, sessionId: chatId, messages, title: "New chat" }),
    }),
  });
}

To load a chat, take chatId from the page route and userId from the session, then seed useChat:

const chat = await history.getChat({ userId, sessionId: chatId }); // full transcript, or null
const chats = await history.listChats({ userId, limit: 50 }); // summaries, no messages
const hits = await history.searchChats({ userId, query: "headphones", target: "both", limit: 20 });
// client: useChat({ id: chatId, messages: chat?.messages ?? [] })
<details> <summary>Config &amp; how it's stored</summary>
createChatHistory({
  redis, // optional: defaults to Redis.fromEnv()
  prefix: "agentkit:chat", // optional: setting prefix or indexName gives chats their own index
  ttlSeconds: 60 * 60 * 24 * 30, // optional: per-chat TTL (default: no expiry)
});

Each chat is one JSON doc at agentkit:chat:<userId>:<sessionId> (keyed per user, so two users can't collide on a sessionId). By default chats and memories share one search index (agentkit), so both work on a database that allows only one index. Chats are indexed over userId + sessionId (filters) and userMessages + modelMessages ($smart fuzzy text); the raw messages array rides along unindexed. saveChat overwrites the whole array (no delta merge) — useChat sends the full conversation. Other methods: getChat / deleteChat ({ userId, sessionId }), listChats / searchChats ({ userId }).

</details> <details> <summary>Security: <code>userId</code> is the tenant boundary</summary>

Every method takes a single object; userId is required, non-empty, and may not contain :. Derive it from a verified server-side auth source — the subject/user id from your auth provider (Clerk, Auth.js/NextAuth, Supabase Auth, Auth0, …) — and never from a client-supplied header, query param, or body (read it from the session in your route, not the request the browser controls). A chat can't be read or overwritten under a different userId.

</details>

Agent memory

recall_memory and save_memory tools so the model reads and writes its own long-term memory.

import { createMemoryTools } from "@upstash/agentkit-ai-sdk";
import { generateText, stepCountIs } from "ai";

const tools = createMemoryTools({ userId });

await generateText({ model, tools, stopWhen: stepCountIs(5), prompt: "What do you know about me?" });
<details> <summary>Options &amp; the <code>userId</code> tenant boundary</summary>
  • userId (required) — a string, or (input, options) => string.
  • redis — defaults to Redis.fromEnv().
  • topK — max memories recall returns.
  • minScore — a BM25 floor. Set it to recall by keyword only, above that floor; unset, recall is hybrid.
  • recallToolName / saveToolName — override the tool names.

userId is the only tenant boundary (required, non-empty, no :). Derive it from a verified server-side auth source (Clerk, Auth.js/NextAuth, Supabase Auth, Auth0, …) — never a client-supplied value. Memories are stored at agentkit:memory:<userId>:<id>.

</details>
Memory provider

createAgentMemory is the AI SDK memory provider shape: create it once, then per request give the model the memory tools, inject the memories relevant to the latest user message automatically, or both. The model is not wrapped — recall runs in prepareStep and appends a <memories> block to your instructions on the first step (the override carries forward to later steps). Works with generateText, streamText and ToolLoopAgent.

import { createAgentMemory } from "@upstash/agentkit-ai-sdk";
import { ToolLoopAgent } from "ai";

const memory = createAgentMemory();…

Description from the npm listing.

  • upstash
  • ai-sdk
  • vercel
  • ai
  • agent
  • memory
  • rag
  • llm
  • cache
  • tools

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

@upstash/agentkit-ai-sdk weekly downloads on npm, last 90 days: 6,159 weekly downloads as of Dec 5, 2026, +208% over 90 days.@upstash/agentkit-ai-sdkWeekly downloads on npm · Last 90 days6,159downloads / week+208% over 90 days010K20K30K40K50K60KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@upstash/agentkit-ai-sdk weekly downloads on npm, last 90 days: 6,159 weekly downloads as of Dec 5, 2026, +208% over 90 days.

7/30/90-day growth

@upstash/agentkit-ai-sdk weekly downloads growth on npm: -47.1% over 7 days, -60.6% over 30 days, +208% over 90 days.@upstash/agentkit-ai-sdkWeekly downloads growth on npm6,159downloads / week now7-day growth-5,489 weekly downloads-47.1%30-day growth-9,476 weekly downloads-60.6%90-day growth+4,161 weekly downloads+208%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@upstash/agentkit-ai-sdk weekly downloads growth on npm: -47.1% over 7 days, -60.6% over 30 days, +208% over 90 days.

Ranking history

@upstash/agentkit-ai-sdk npm ranking history: currently #1453 (by weekly downloads).@upstash/agentkit-ai-sdknpm ranking · by weekly downloads · Last 90 days#1453current rank#900#1000#1100#1200#1300#1400#1500Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@upstash/agentkit-ai-sdk npm ranking history: currently #1453 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 73, #13 (overall #1,453)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs378 listings · 19 pages · page 6, #2 (overall #102)
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 @upstash/agentkit-ai-sdk
Date (UTC)Weekly downloadsChange vs. previous
6,159-420
6,579-595
7,174-802
7,976-1.3K
9,294-2K
11,244-772
12,016+368
11,648+218
11,430-1.7K
13,154-651
13,805+367
13,438+1.7K
11,712+1.1K
10,623—

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/@upstash/agentkit-ai-sdk. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.