Skip to content
PluginStats

@cascade-flow/ai-sdk weekly downloads statistics

By cascade-flow · npm · AI SDKs

Checkpoint-based persistence for Vercel AI SDK in CascadeFlow workflows

View on npm Fresh · Oct 18, 2026

@cascade-flow/ai-sdk has 1,471 recorded weekly downloads on npm, a decrease of 15.3% over the past 30 days, ranking #1383 of 2,322 tracked listings.

Weekly downloads
1,471
Official API · Oct 18, 2026
7-day growth
-21.2%
-396 weekly downloads
30-day growth
-15.3%
-266 weekly downloads
90-day growth
+12.9%
+168 weekly downloads
Rank
#1383
Among tracked npm listings

About @cascade-flow/ai-sdk

@cascade-flow/ai-sdk

Drop-in replacement for Vercel AI SDK's generateText with automatic checkpoint support. Each LLM call in the agentic loop is wrapped in a checkpoint, so on retry the loop continues from where it left off.

Installation

bun add @cascade-flow/ai-sdk ai

Usage

Just import generateText from @cascade-flow/ai-sdk instead of ai. All AI SDK options work as expected:

import { defineStep } from "@cascade-flow/workflow";
import { generateText } from "@cascade-flow/ai-sdk";
import { openai } from "@ai-sdk/openai";
import { tool, stepCountIs } from "ai";
import { z } from "zod";

const getWeather = tool({
  description: "Get weather for a location",
  parameters: z.object({ location: z.string() }),
  execute: async ({ location }) => {
    return { location, temperature: 72, conditions: "sunny" };
  },
});

export const step = defineStep({
  name: "weather-agent",
  maxRetries: 3,
  fn: async ({ ctx }) => {
    const result = await generateText({
      model: openai("gpt-4"),
      system: "You are a helpful weather assistant.",
      prompt: ctx.input.query,
      tools: { getWeather },
      stopWhen: stepCountIs(5),
      checkpoint: ctx.checkpoint,
      // All AI SDK options work: temperature, maxTokens, etc.
    });

    return {
      response: result.text,
      stepsExecuted: result.totalSteps,
    };
  },
});

How It Works

The function implements an agentic loop where LLM calls and tool executions are checkpointed separately:

// Loop continues until stopWhen conditions are met
for (let stepIndex = 0; stepIndex < MAX_ITERATIONS; stepIndex++) {
  // 1. Checkpoint the LLM call only (no tool execution)
  const llmResult = await checkpoint("agent-llm", async () => {
    return generateText({ model, messages, tools: toolSchemas, stopWhen });
  });

  if (llmResult.finishReason !== "tool-calls") {
    return llmResult;
  }

  // 2. Execute all tools in parallel, each in its own checkpoint
  const toolPromises = llmResult.toolCalls.map((toolCall) =>
    checkpoint(`agent-tool-${toolCall.toolCallId}`, async () => ({
      toolCallId: toolCall.toolCallId,
      toolName: toolCall.toolName,
      result: await tools[toolCall.toolName].execute(toolCall.args),
    }))
  );
  const toolResults = await awaitCheckpoints(toolPromises);

  // 3. Build messages and continue
  messages = [...messages, assistantMessage, toolResultMessage];
}
Key Design: Separate LLM and Tool Checkpoints

The LLM call and tool executions are in separate checkpoints. This means:

  • LLM calls are expensive - if a tool fails, we don't want to re-run the LLM
  • Tool failures restart from the tool - the cached LLM result is reused
  • Each tool is independently checkpointed - fine-grained retry control
  • Tools run in parallel - uses awaitCheckpoints for concurrent execution
On Retry
  1. Cached LLM checkpoint returns instantly (no LLM call)
  2. Cached tool checkpoints return instantly
  3. Only failed/new steps make actual calls

API Reference

generateText(options)

Drop-in replacement for AI SDK's generateText. All AI SDK options are supported and passed through.

Additional option:

  • checkpointName - Checkpoint name prefix (default: "agent-llm"). Use unique names if calling multiple times in the same step.

Returns: GenerateTextResult extended with:

  • totalSteps - Total number of steps executed

Without Checkpointing

When used outside a CascadeFlow step (no checkpoint context), the function works like regular generateText:

import { stepCountIs } from "ai";

// Works without checkpointing (useful for testing)
const result = await generateText({
  model: openai("gpt-4"),
  prompt: "Hello",
  stopWhen: stepCountIs(5),
});

See Also

Description from the npm listing.

  • ai-sdk
  • vercel
  • workflow
  • checkpoint
  • llm
  • agent
  • cascadeflow

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

@cascade-flow/ai-sdk weekly downloads on npm, last 90 days: 1,471 weekly downloads as of Oct 18, 2026, +12.9% over 90 days.@cascade-flow/ai-sdkWeekly downloads on npm · Last 90 days1,471downloads / week+12.9% over 90 days05001K1.5K2K2.5KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
@cascade-flow/ai-sdk weekly downloads on npm, last 90 days: 1,471 weekly downloads as of Oct 18, 2026, +12.9% over 90 days.

7/30/90-day growth

@cascade-flow/ai-sdk weekly downloads growth on npm: -21.2% over 7 days, -15.3% over 30 days, +12.9% over 90 days.@cascade-flow/ai-sdkWeekly downloads growth on npm1,471downloads / week now7-day growth-396 weekly downloads-21.2%30-day growth-266 weekly downloads-15.3%90-day growth+168 weekly downloads+12.9%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@cascade-flow/ai-sdk weekly downloads growth on npm: -21.2% over 7 days, -15.3% over 30 days, +12.9% over 90 days.

Ranking history

@cascade-flow/ai-sdk npm ranking history: currently #1383 (by weekly downloads).@cascade-flow/ai-sdknpm ranking · by weekly downloads · Last 90 days#1383current rank#400#600#800#1000#1200#1400Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 17, 2026 – Oct 20, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
@cascade-flow/ai-sdk npm ranking history: currently #1383 (by weekly downloads).

Listing placement

All npm2,320 listings · 116 pages · 1,162 shown · page 70, #6 (overall #1,386)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs259 listings · 13 pages · page 6, #16 (overall #116)
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 (544)
Recent weekly downloads observations for @cascade-flow/ai-sdk
Date (UTC)Weekly downloadsChange vs. previous
1,471+177
1,294-13
1,307+201
1,106-388
1,494-660
2,1540
2,154+287
1,867+393
1,474+11
1,463+197
1,266+383
883+651
232-5
237—

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/@cascade-flow/ai-sdk. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.