Skip to content
PluginStats

@ai-sdk-tools/artifacts weekly downloads statistics

By ai-sdk-tools (5 listings) · npm · AI SDKs

Advanced streaming interfaces for AI applications

View on npm Fresh · Dec 6, 2026

@ai-sdk-tools/artifacts has 40,437 recorded weekly downloads on npm, an increase of 218% over the past 30 days, ranking #847 of 3,247 tracked listings.

Weekly downloads
40,437
Official API · Dec 5, 2026
7-day growth
+109%
+21.1K weekly downloads
30-day growth
+218%
+27.7K weekly downloads
90-day growth
+139%
+23.5K weekly downloads
Rank
#847
▲ 192 in 7 days

About @ai-sdk-tools/artifacts

@ai-sdk-tools/artifacts

Advanced streaming interfaces for AI applications. Create structured, type-safe artifacts that stream real-time updates from AI tools to React components.

Features

  • Type-Safe Streaming - Full TypeScript support with Zod schema validation
  • Real-time Updates - Stream partial updates with progress tracking
  • Clean API - Minimal boilerplate, maximum flexibility
  • State Management - Built on @ai-sdk-tools/store for efficient message handling
  • Performance Optimized - Efficient state management and updates

Installation

npm install @ai-sdk-tools/artifacts @ai-sdk-tools/store

Why do you need both packages?

  • @ai-sdk-tools/artifacts - Provides the artifact streaming and management APIs
  • @ai-sdk-tools/store - Required for message state management and React hooks

The artifacts package uses the store package's useChatMessages hook to efficiently extract and track artifact data from AI SDK message streams, ensuring optimal performance and avoiding unnecessary re-renders.

Setup

1. Initialize Chat with Store
import { useChat } from '@ai-sdk-tools/store'; // Drop-in replacement for @ai-sdk/react
import { DefaultChatTransport } from 'ai';

function ChatComponent() {
  // Initialize chat (same API as @ai-sdk/react)
  const { messages, input, handleInputChange, handleSubmit } = useChat({
    transport: new DefaultChatTransport({
      api: '/api/chat'
    })
  });

  return (
    <div>
      {/* Your chat UI */}
      <ArtifactDisplay /> {/* Artifacts work from any component */}
    </div>
  );
}
2. Use Artifacts from Any Component

The useArtifact hook automatically connects to the global chat store to extract artifact data from message streams - no prop drilling needed!

Quick Start

1. Define an Artifact
import { artifact } from '@ai-sdk-tools/artifacts';
import { z } from 'zod';

const burnRateArtifact = artifact('burn-rate', z.object({
  title: z.string(),
  stage: z.enum(['loading', 'processing', 'complete']).default('loading'),
  monthlyBurn: z.number(),
  runway: z.number(),
  data: z.array(z.object({
    month: z.string(),
    burnRate: z.number()
  })).default([])
}));
2. Create a Tool with Context
// Use direct AI SDK tool format
const analyzeBurnRate = {
  description: 'Analyze company burn rate',
  inputSchema: z.object({
    company: z.string()
  }),
  execute: async ({ company }: { company: string }) => {
    // Access typed context in tools
    const context = getContext(); // Fully typed as MyContext
    
    console.log('Processing for user:', context.userId);
    console.log('Theme:', context.config.theme);
    
    const analysis = burnRateArtifact.stream({
      title: `${company} Analysis for ${context.userId}`,
      stage: 'loading',
      monthlyBurn: 50000,
      runway: 12
    });

    // Stream updates
    analysis.progress = 0.5;
    await analysis.update({ stage: 'processing' });
    
    // Complete
    await analysis.complete({
      title: `${company} Analysis`,
      stage: 'complete',
      monthlyBurn: 45000,
      runway: 14,
      data: [{ month: '2024-01', burnRate: 50000 }]
    });

    return 'Analysis complete';
  }
};
3. Set Up Route with Context
import { createTypedContext, BaseContext } from '@ai-sdk-tools/artifacts';
import { createUIMessageStream, createUIMessageStreamResponse, streamText } from 'ai';
import { openai } from '@ai-sdk/openai';

// Define your context type
interface MyContext extends BaseContext {
  userId: string;
  permissions: string[];
  config: { theme: 'light' | 'dark' };
}

// Create typed context helpers
const { setContext, getContext } = createTypedContext<MyContext>();

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

  const stream = createUIMessageStream({
    execute: ({ writer }) => {
      // Set typed context
      setContext({
        writer,
        userId: req.headers.get('user-id') || 'anonymous',
        permissions: ['read', 'write'],
        config: { theme: 'dark' }
      });

      const result = streamText({
        model: openai('gpt-4'),
        messages,
        tools: { analyzeBurnRate }
      });

      writer.merge(result.toUIMessageStream());
    }
  });

  return createUIMessageStreamResponse({ stream });
};
4. Consume in React
import { useArtifact } from '@ai-sdk-tools/artifacts/client';

function Analysis() {
  const { data, status, progress, error } = useArtifact(burnRateArtifact, {
    onComplete: (data) => console.log('Done!', data),
    onError: (error) => console.error('Failed:', error)
  });

  if (!data) return null;

  return (
    <div>
      <h2>{data.title}</h2>
      <p>Stage: {data.stage}</p>
      <p>Monthly Burn: ${data.monthlyBurn.toLocaleString()}</p>
      <p>Runway: {data.runway} months</p>
      {progress && <div>Progress: {progress * 100}%</div>}
      {data.data.map(item => (
        <div key={item.month}>
          {item.month}: ${item.burnRate.toLocaleString()}
        </div>
      ))}
    </div>
  );
}

API Reference

artifact(id, schema)

Creates an artifact definition with Zod schema validation.

useArtifact(artifact, callbacks?)

React hook for consuming a specific streaming artifact.

Returns:

  • data - Current artifact payload
  • status - Current status ('idle' | 'loading' | 'streaming' | 'complete' | 'error')
  • progress - Progress value (0-1)
  • error - Error message if failed
  • isActive - Whether artifact is currently processing
  • hasData - Whether artifact has any data

Callbacks:

  • onUpdate(data, prevData) - Called when data updates
  • onComplete(data) - Called when artifact completes
  • onError(error, data) - Called on error
  • onProgress(progress, data) - Called on progress updates
  • onStatusChange(status, prevStatus) - Called when status changes…

Description from the npm listing.

  • ai
  • artifacts
  • streaming
  • react
  • ai-sdk
  • typescript

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-sdk-tools/artifacts weekly downloads on npm, last 90 days: 40,437 weekly downloads as of Dec 5, 2026, +139% over 90 days.@ai-sdk-tools/artifactsWeekly downloads on npm · Last 90 days40,437downloads / week+139% over 90 days010K20K30K40K50KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@ai-sdk-tools/artifacts weekly downloads on npm, last 90 days: 40,437 weekly downloads as of Dec 5, 2026, +139% over 90 days.

7/30/90-day growth

@ai-sdk-tools/artifacts weekly downloads growth on npm: +109% over 7 days, +218% over 30 days, +139% over 90 days.@ai-sdk-tools/artifactsWeekly downloads growth on npm40,437downloads / week now7-day growth+21,113 weekly downloads+109%30-day growth+27,703 weekly downloads+218%90-day growth+23,519 weekly downloads+139%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@ai-sdk-tools/artifacts weekly downloads growth on npm: +109% over 7 days, +218% over 30 days, +139% over 90 days.

Ranking history

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

Listing placement

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

Listing placement

AI SDKs378 listings · 19 pages · page 3, #17 (overall #57)
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 @ai-sdk-tools/artifacts
Date (UTC)Weekly downloadsChange vs. previous
40,437+755
39,682+9.4K
30,238+5.7K
24,512+4.3K
20,176-837
21,013+1.1K
19,912+588
19,324-2.4K
21,674-1.8K
23,510-2.3K
25,811+951
24,860+5.4K
19,417+1.4K
17,979—

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