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 · Oct 18, 2026

@ai-sdk-tools/artifacts has 10,574 recorded weekly downloads on npm, a decrease of 61.5% over the past 30 days, ranking #947 of 2,322 tracked listings.

Weekly downloads
10,574
Official API · Oct 18, 2026
7-day growth
-59.3%
-15.4K weekly downloads
30-day growth
-61.5%
-16.9K weekly downloads
90-day growth
-46.5%
-9.2K weekly downloads
Rank
#947
Among tracked npm listings

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: 10,574 weekly downloads as of Oct 18, 2026, -46.5% over 90 days.@ai-sdk-tools/artifactsWeekly downloads on npm · Last 90 days10,574downloads / week-46.5% over 90 days05K10K15K20K25K30K35K40KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 18, 2026 · 89 observations · Updated Oc…pluginstats.com
@ai-sdk-tools/artifacts weekly downloads on npm, last 90 days: 10,574 weekly downloads as of Oct 18, 2026, -46.5% over 90 days.

7/30/90-day growth

@ai-sdk-tools/artifacts weekly downloads growth on npm: -59.3% over 7 days, -61.5% over 30 days, -46.5% over 90 days.@ai-sdk-tools/artifactsWeekly downloads growth on npm10,574downloads / week now7-day growth-15,411 weekly downloads-59.3%30-day growth-16,917 weekly downloads-61.5%90-day growth-9,189 weekly downloads-46.5%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@ai-sdk-tools/artifacts weekly downloads growth on npm: -59.3% over 7 days, -61.5% over 30 days, -46.5% over 90 days.

Ranking history

@ai-sdk-tools/artifacts npm ranking history: currently #947 (by weekly downloads).@ai-sdk-tools/artifactsnpm ranking · by weekly downloads · Last 90 days#947current rank#920#925#930#935#940#945#950Jul 22Aug 6Aug 21Sep 5Sep 20Oct 5Oct 20rankOct 18, 2026 – Oct 20, 2026 · 3 observations · Updated Oct 18, 2026pluginstats.com
@ai-sdk-tools/artifacts npm ranking history: currently #947 (by weekly downloads).

Listing placement

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

Listing placement

AI SDKs259 listings · 13 pages · page 3, #20 (overall #60)
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 (122)
Recent weekly downloads observations for @ai-sdk-tools/artifacts
Date (UTC)Weekly downloadsChange vs. previous
10,574+1.2K
9,394-2.1K
11,488-313
11,801-6K
17,838-5.9K
23,7530
23,753-2.2K
25,985-2.9K
28,858+528
28,330-1.2K
29,482-1.9K
31,363+197
31,166-4.9K
36,095—

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 Oct 20, 2026. See the methodology.