Skip to content
PluginStats

ai weekly downloads statistics

By vercel (16 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 Fresh · Dec 6, 2026

ai has 44,773,376 recorded weekly downloads on npm, a decrease of 0.2% over the past 30 days, ranking #106 of 3,247 tracked listings.

Weekly downloads
44,773,376
Official API · Dec 5, 2026
7-day growth
+4.8%
+2.1M weekly downloads
30-day growth
-0.2%
-94.9K weekly downloads
90-day growth
+107%
+23.1M weekly downloads
Rank
#106
▼ 8 in 7 days

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: 44,773,376 weekly downloads as of Dec 5, 2026, +107% over 90 days.aiWeekly downloads on npm · Last 90 days44,773,376downloads / week+107% over 90 days010M20M30M40M50MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
ai weekly downloads on npm, last 90 days: 44,773,376 weekly downloads as of Dec 5, 2026, +107% over 90 days.

7/30/90-day growth

ai weekly downloads growth on npm: +4.8% over 7 days, -0.2% over 30 days, +107% over 90 days.aiWeekly downloads growth on npm44,773,376downloads / week now7-day growth+2,062,076 weekly downlo…+4.8%30-day growth-94,922 weekly downloads-0.2%90-day growth+23,133,728 weekly downl…+107%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
ai weekly downloads growth on npm: +4.8% over 7 days, -0.2% over 30 days, +107% over 90 days.

Ranking history

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

Listing placement

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

Listing placement

MCP servers468 listings · 24 pages · page 1, #3 (overall #3)
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 (592)
Recent weekly downloads observations for ai
Date (UTC)Weekly downloadsChange vs. previous
44,773,376-3.6M
48,390,104+2.1M
46,294,939+2.1M
44,183,181+938.6K
43,244,598+732.1K
42,512,459+14.2K
42,498,252-213K
42,711,300-490.5K
43,201,794-1.6M
44,789,021-1.9M
46,653,735-1.1M
47,746,034-443.9K
48,189,926-311.3K
48,501,198—

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 Dec 6, 2026. See the methodology.