Skip to content
PluginStats

ai weekly downloads statistics

By vercel (17 listings) · npm · MCP servers

AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.

View on npm Stale · Oct 18, 2026

ai has 18,352,661 recorded weekly downloads on npm, a decrease of 19.3% over the past 30 days, ranking #99 of 2,391 tracked listings.

Weekly downloads
18,352,661
Official API · Oct 18, 2026
7-day growth
-40.8%
-12.7M weekly downloads
30-day growth
-19.3%
-4.4M weekly downloads
90-day growth
+3.6%
+646.1K weekly downloads
Rank
#99
Among tracked npm listings

About ai

hero illustration

AI SDK

The AI SDK is a provider-agnostic TypeScript toolkit designed to help you build AI-powered applications and agents using popular UI frameworks like Next.js, React, Svelte, Vue, Angular, and runtimes like Node.js.

To learn more about how to use the AI SDK, check out our API Reference and Documentation.

Installation

You will need Node.js 22+ and npm (or another package manager) installed on your local development machine.

npm install ai

Skill for Coding Agents

If you use coding agents such as Claude Code or Cursor, we highly recommend adding the AI SDK skill to your repository:

npx skills add vercel/ai

Unified Provider Architecture

The AI SDK provides a unified API to interact with model providers like OpenAI, Anthropic, Google, and more.

By default, the AI SDK uses the Vercel AI Gateway to give you access to all major providers out of the box. Just pass a model string for any supported model:

const result = await generateText({
  model: 'anthropic/claude-opus-5.5', // or 'openai/gpt-6-astra', 'google/gemini-3.8-flash', etc.
  prompt: 'Hello!',
});

You can also connect to providers directly using their SDK packages:

npm install @ai-sdk/openai @ai-sdk/anthropic @ai-sdk/google
import { anthropic } from '@ai-sdk/anthropic';

const result = await generateText({
  model: anthropic('claude-opus-5-5'), // or openai('gpt-6-astra'), google('gemini-3.8-flash'), etc.
  prompt: 'Hello!',
});

Usage

Generating Text
import { generateText } from 'ai';

const { text } = await generateText({
  model: 'openai/gpt-6-astra', // use Vercel AI Gateway
  prompt: 'What is an agent?',
});
Generating Structured Data
import { generateText, Output } from 'ai';
import { z } from 'zod';

const { output } = await generateText({
  model: 'openai/gpt-6-astra',
  output: Output.object({
    schema: z.object({
      recipe: z.object({
        name: z.string(),
        ingredients: z.array(
          z.object({ name: z.string(), amount: z.string() }),
        ),
        steps: z.array(z.string()),
      }),
    }),
  }),
  prompt: 'Generate a lasagna recipe.',
});
Agents
import { ToolLoopAgent } from 'ai';

const sandboxAgent = new ToolLoopAgent({
  model: 'openai/gpt-6-astra',
  system: 'You are an agent with access to a shell environment.',
  tools: {
    shell: openai.tools.localShell({
      execute: async ({ action }) => {
        const [cmd, ...args] = action.command;
        const sandbox = await getSandbox(); // Vercel Sandbox
        const command = await sandbox.runCommand({ cmd, args });
        return { output: await command.stdout() };
      },
    }),
  },
});
UI Integration

The AI SDK UI module provides a set of hooks that help you build chatbots and generative user interfaces. These hooks are framework agnostic, so they can be used in Next.js, React, Svelte, and Vue.

You need to install the package for your framework, e.g.:

npm install @ai-sdk/react
Agent @/agent/image-generation-agent.ts
import { openai } from '@ai-sdk/openai';
import { ToolLoopAgent, InferAgentUIMessage } from 'ai';

export const imageGenerationAgent = new ToolLoopAgent({
  model: 'openai/gpt-6-astra',
  tools: {
    generateImage: openai.tools.imageGeneration({
      partialImages: 3,
    }),
  },
});

export type ImageGenerationAgentMessage = InferAgentUIMessage<
  typeof imageGenerationAgent
>;
Route (Next.js App Router) @/app/api/chat/route.ts
import { imageGenerationAgent } from '@/agent/image-generation-agent';
import { createAgentUIStreamResponse } from 'ai';

export async function POST(req: Request) {
  const { messages } = await req.json();

  return createAgentUIStreamResponse({
    agent: imageGenerationAgent,
    messages,
  });
}
UI Component for Tool @/component/image-generation-view.tsx
import { openai } from '@ai-sdk/openai';
import { UIToolInvocation } from 'ai';

export default function ImageGenerationView({
  invocation,
}: {
  invocation: UIToolInvocation<ReturnType<typeof openai.tools.imageGeneration>>;
}) {
  switch (invocation.state) {
    case 'input-available':
      return <div>Generating image...</div>;
    case 'output-available':
      return <img src={`data:image/png;base64,${invocation.output.result}`} />;
  }
}
Page @/app/page.tsx
'use client';

import { ImageGenerationAgentMessage } from '@/agent/image-generation-agent';
import ImageGenerationView from '@/component/image-generation-view';
import { useChat } from '@ai-sdk/react';

export default function Page() {
  const { messages, status, sendMessage } =
    useChat<ImageGenerationAgentMessage>();

  const [input, setInput] = useState('');
  const handleSubmit = e => {
    e.preventDefault();
    sendMessage({ text: input });
    setInput('');
  };

  return (
    <div>
      {messages.map(message => (
        <div key={message.id}>
          <strong>{`${message.role}: `}</strong>
          {message.parts.map((part, index) => {
            switch (part.type) {
              case 'text':
                return <div key={index}>{part.text}</div>;
              case 'tool-generateImage':
                return <ImageGenerationView key={index} invocation={part} />;
            }
          })}
        </div>
      ))}…

Description from the npm listing.

  • ai
  • vercel
  • sdk
  • llm
  • mcp
  • tool-calling
  • tools
  • structured-output
  • agent
  • agentic
  • generative
  • genai
  • chatbot
  • prompt
  • inference
  • language-model
  • streaming
  • openai
  • anthropic
  • claude

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 weekly downloads on npm, last 90 days: 18,352,661 weekly downloads as of Oct 18, 2026, +3.6% over 90 days.aiWeekly downloads on npm · Last 90 days18,352,661downloads / week+3.6% over 90 days10M15M20M25M30M35MJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
ai weekly downloads on npm, last 90 days: 18,352,661 weekly downloads as of Oct 18, 2026, +3.6% over 90 days.

7/30/90-day growth

ai weekly downloads growth on npm: -40.8% over 7 days, -19.3% over 30 days, +3.6% over 90 days.aiWeekly downloads growth on npm18,352,661downloads / week now7-day growth-12,666,877 weekly downl…-40.8%30-day growth-4,402,400 weekly downlo…-19.3%90-day growth+646,091 weekly downloads+3.6%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
ai weekly downloads growth on npm: -40.8% over 7 days, -19.3% over 30 days, +3.6% over 90 days.

Ranking history

ai npm ranking history: currently #99 (by weekly downloads).ainpm ranking · by weekly downloads · Last 90 days#99current rank#20#40#60#80#100#120Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 17, 2026 – Oct 21, 2026 · 5 observations · Updated Oct 18, 2026pluginstats.com
ai npm ranking history: currently #99 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,195 shown · page 5, #19 (overall #99)
All npm: every listing in weekly downloads order

Listing placement

MCP servers300 listings · 15 pages · page 1, #2 (overall #2)
MCP servers: 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 ai
Date (UTC)Weekly downloadsChange vs. previous
18,352,661+3.2M
15,149,249-3.3M
18,472,668+314.3K
18,158,413-6.5M
24,677,180-6.5M
31,177,1030
31,177,103+157.6K
31,019,538+221.2K
30,798,367+391.9K
30,406,480+647.2K
29,759,300+667.1K
29,092,186+724.5K
28,367,692-6M
34,364,547—

Similar npm MCP servers plugins

All 20 ai alternatives

ai on other marketplaces

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. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.