Skip to content
PluginStats

ai-resumable-stream weekly downloads statistics

By zirkelc (4 listings) · npm · AI SDKs

Resume and stop AI SDK streams, backed by S3, Redis, or any store you provide

View on npm Fresh · Dec 6, 2026

ai-resumable-stream has 2,856 recorded weekly downloads on npm, an increase of 121% over the past 30 days, ranking #1756 of 3,247 tracked listings.

Weekly downloads
2,856
Official API · Dec 5, 2026
7-day growth
+26.7%
+601 weekly downloads
30-day growth
+121%
+1.6K weekly downloads
90-day growth
+469%
+2.4K weekly downloads
Rank
#1756
Among tracked npm listings

About ai-resumable-stream

<div align='center'>

ai-resumable-stream

<p align="center">AI SDK: Resume and stop UI message streams</p> <p align="center"> <a href="https://www.npmjs.com/package/ai-resumable-stream" alt="ai-resumable-stream"><img src="https://img.shields.io/npm/dt/ai-resumable-stream?label=ai-resumable-stream"></a> <a href="https://github.com/zirkelc/ai-resumable-stream/actions/workflows/ci.yml" alt="CI"><img src="https://img.shields.io/github/actions/workflow/status/zirkelc/ai-resumable-stream/ci.yml?branch=main"></a> </p> </div>

This library provides resumable streaming for UI message streams created by streamText() in the AI SDK. The library stores chunks as they are produced. Clients can then resume an interrupted stream, and any request can stop an active stream.

You choose where the chunks are stored. The library includes adapters for Redis and S3 Express. You can also write your own adapter by implementing four methods.

Why?

A stream does not keep its data. After a chunk is sent, it is gone. This causes two problems.

Resume: The server does not record which chunks it has sent. When a client disconnects (network drop, page reload, tab switch), the stream continues on the server, but the client misses the chunks that are sent during that time. The server can only replay the missed chunks if they are stored somewhere.

Stop: The request that stops a stream is not the request that started it. When the user clicks "Stop generating", the client sends a new HTTP request, but the stream runs in a different request or process. The two requests need a shared place to pass the stop signal.

Install

npm install ai-resumable-stream

Install the optional peer dependencies for the features you use:

PackageNeeded for
redisai-resumable-stream/adapters/redis
@aws-sdk/client-s3ai-resumable-stream/adapters/s3-express
aiai-resumable-stream/ai-sdk

[!NOTE] Version compatibility:

Quick start

Create one context and reuse it for every stream.

import { createClient } from "redis";
import { createRedisAdapter } from "ai-resumable-stream/adapters/redis";
import { createResumableUIMessageStream } from "ai-resumable-stream/ai-sdk";

const publisher = createClient({ url: process.env.REDIS_URL });
const subscriber = createClient({ url: process.env.REDIS_URL });

// Optional: connect clients immediately or let the library connect on demand
await publisher.connect();
await subscriber.connect();

const context = createResumableUIMessageStream({
  adapter: createRedisAdapter({ publisher, subscriber }),
});

Then use the context in your three routes:

import { createUIMessageStreamResponse, streamText, toUIMessageStream, type UIMessage } from "ai";

// POST /chat/:chatId
export async function send(chatId: string, messages: Array<UIMessage>) {
  const abortController = new AbortController();

  const result = streamText({
    model: openai(`gpt-4o`),
    messages,
    abortSignal: abortController.signal,
  });

  const { stream } = await context.startStream(toUIMessageStream({ stream: result.stream }), {
    streamId: chatId,
    abortController,
  });

  return createUIMessageStreamResponse({ stream });
}

// GET /chat/:chatId/stream
export async function resume(chatId: string) {
  const stream = await context.resumeStream({ streamId: chatId });
  if (!stream) return new Response(null, { status: 204 });

  return createUIMessageStreamResponse({ stream });
}

// POST /chat/:chatId/stop
export async function stop(chatId: string) {
  await context.stopStream({ streamId: chatId });
}

Usage

startStream

Starts a stream and stores the chunks as they are produced. Returns the stream for the client, the stream id and the generation id.

[!TIP] The returned stream is both a ReadableStream and an async iterable, so return stream and yield* stream both work.

import { streamText, toUIMessageStream } from "ai";

async function sendMessage(chatId: string, messages: UIMessage[]) {
  // Optional: `streamText` sees the stop signal and aborts the HTTP request
  const abortController = new AbortController();

  const result = streamText({
    model: openai(`gpt-4o`),
    messages,
    abortSignal: abortController.signal,
  });

  const { stream } = await context.startStream(toUIMessageStream({ stream: result.stream }), {
    // Optional: generates a stream id if not supplied
    streamId: chatId,
    abortController,
  });

  // Return stream to client
  return stream;
}
```…

Description from the npm listing.

  • ai
  • ai-sdk
  • redis
  • resumable
  • resumable-stream
  • s3
  • stream

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

ai-resumable-stream weekly downloads on npm, last 90 days: 2,856 weekly downloads as of Dec 5, 2026, +469% over 90 days.ai-resumable-streamWeekly downloads on npm · Last 90 days2,856downloads / week+469% over 90 days05001K1.5K2K2.5K3K3.5KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
ai-resumable-stream weekly downloads on npm, last 90 days: 2,856 weekly downloads as of Dec 5, 2026, +469% over 90 days.

7/30/90-day growth

ai-resumable-stream weekly downloads growth on npm: +26.7% over 7 days, +121% over 30 days, +469% over 90 days.ai-resumable-streamWeekly downloads growth on npm2,856downloads / week now7-day growth+601 weekly downloads+26.7%30-day growth+1,561 weekly downloads+121%90-day growth+2,354 weekly downloads+469%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
ai-resumable-stream weekly downloads growth on npm: +26.7% over 7 days, +121% over 30 days, +469% over 90 days.

Ranking history

ai-resumable-stream npm ranking history: currently #1756 (by weekly downloads).ai-resumable-streamnpm ranking · by weekly downloads · Last 90 days#1756current rank#400#600#800#1000#1200#1400#1600#1800#2000Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
ai-resumable-stream npm ranking history: currently #1756 (by weekly downloads).

Listing placement

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

Listing placement

AI SDKs378 listings · 19 pages · page 8, #16 (overall #156)
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 ai-resumable-stream
Date (UTC)Weekly downloadsChange vs. previous
2,856+73
2,783-220
3,003-415
3,418+255
3,163-152
3,315+1.1K
2,244-11
2,255+41
2,214+302
1,912+519
1,393+63
1,330+375
955-123
1,078—

Similar npm AI SDKs plugins

All 20 ai-resumable-stream 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/ai-resumable-stream. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.