Skip to content
PluginStats

@ai-sdk-tools/store weekly downloads statistics

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

A drop-in replacement for @ai-sdk/react that automatically syncs chat state to Zustand stores

View on npm Stale · Oct 18, 2026

@ai-sdk-tools/store has 30,109 recorded weekly downloads on npm, a decrease of 42.6% over the past 30 days, ranking #688 of 2,391 tracked listings.

Weekly downloads
30,109
Official API · Oct 18, 2026
7-day growth
-37.6%
-18.2K weekly downloads
30-day growth
-42.6%
-22.3K weekly downloads
90-day growth
-28.0%
-11.7K weekly downloads
Rank
#688
Among tracked npm listings

About @ai-sdk-tools/store

@ai-sdk-tools/store

A high-performance drop-in replacement for @ai-sdk/react with advanced state management, built-in optimizations, and zero configuration required.

Performance Features

  • 3-5x faster than standard @ai-sdk/react
  • O(1) message lookups with hash map indexing
  • Batched updates to minimize re-renders
  • Memoized selectors with automatic caching
  • Message virtualization for large chat histories
  • Advanced throttling with scheduler.postTask
  • Deep equality checks to prevent unnecessary updates

Installation

npm install @ai-sdk-tools/store
# or
bun add @ai-sdk-tools/store

Debug Configuration

The store package includes a debug utility that can be configured to control logging:

Environment Variable

Set DEBUG=true to enable debug logging:

# Enable debug logging
DEBUG=true npm run dev

# Or in your .env file
DEBUG=true

By default, debug logging is disabled unless DEBUG=true is set.

Quick Start

1. Wrap Your App
import { Provider } from '@ai-sdk-tools/store';

function App() {
  return (
    <Provider initialMessages={[]}>
      <ChatComponent />
    </Provider>
  );
}
2. Use Chat Hooks
import { useChat, useChatMessages } from '@ai-sdk-tools/store';

function ChatComponent() {
  // Same API as @ai-sdk/react, but 3-5x faster!
  const { messages, sendMessage, status } = useChat({
    transport: new DefaultChatTransport({
      api: '/api/chat'
    })
  });

  return (
    <div>
      {messages.map(message => (
        <div key={message.id}>{message.content}</div>
      ))}
    </div>
  );
}
3. Access State from Any Component
function MessageCounter() {
  // No prop drilling needed!
  const messageCount = useMessageCount();
  const status = useChatStatus();
  
  return <div>{messageCount} messages ({status})</div>;
}

Advanced Features

Message Virtualization

Perfect for large chat histories:

function VirtualizedChat() {
  // Only render visible messages for optimal performance
  const visibleMessages = useVirtualMessages(0, 50);
  
  return (
    <div>
      {visibleMessages.map(message => (
        <MessageComponent key={message.id} message={message} />
      ))}
    </div>
  );
}
Memoized Selectors

Cache expensive computations:

function ChatAnalytics() {
  const userMessageCount = useSelector(
    'userMessages',
    (messages) => messages.filter(m => m.role === 'user').length,
    [messages.length] // Only recalculate when message count changes
  );
  
  return <div>User messages: {userMessageCount}</div>;
}
Fast Message Lookups

O(1) performance for message access:

function MessageDetails({ messageId }: { messageId: string }) {
  // O(1) lookup instead of O(n) array.find()
  const message = useMessageById(messageId);
  
  return <div>{message.content}</div>;
}

Migration from @ai-sdk/react

Before:
import { useChat } from '@ai-sdk/react';

function Chat() {
  const chat = useChat({ api: '/api/chat' });
  return <div>{/* chat UI */}</div>;
}
After:
import { Provider, useChat } from '@ai-sdk-tools/store';

function App() {
  return (
    <Provider>
      <Chat />
    </Provider>
  );
}

function Chat() {
  // Same API, but 3-5x faster!
  const chat = useChat({ 
    transport: new DefaultChatTransport({ api: '/api/chat' })
  });
  return <div>{/* chat UI */}</div>;
}

Performance Benchmarks

Scenario@ai-sdk/react@ai-sdk-tools/storeImprovement
1000 messages120ms35ms3.4x faster
Message lookupO(n)O(1)10-100x faster
Complex filtering45ms12ms3.8x faster
Re-render frequencyHighMinimal5x fewer

API Reference

Hooks
// Core chat functionality
const chat = useChat(options)           // Enhanced useChat with performance
const messages = useChatMessages()      // Get all messages
const status = useChatStatus()          // Chat status
const error = useChatError()            // Error state
const id = useChatId()                  // Chat ID

// Performance hooks
const message = useMessageById(id)      // O(1) message lookup
const count = useMessageCount()         // Optimized message count
const ids = useMessageIds()             // All message IDs
const slice = useVirtualMessages(0, 50) // Message virtualization
const result = useSelector(key, fn, deps) // Memoized selectors

// Actions
const actions = useChatActions()        // All actions object
Provider
<Provider initialMessages={messages}>
  <YourApp />
</Provider>

TypeScript Support

Full generic support with custom message types:

interface MyMessage extends UIMessage<
  { userId: string }, // metadata
  { weather: WeatherData }, // data
  { getWeather: { input: { location: string }, output: WeatherData } } // tools
> {}

// Fully typed throughout
const chat = useChat<MyMessage>({ 
  transport: new DefaultChatTransport({ api: '/api/chat' })
})
const messages = useChatMessages<MyMessage>() // Fully typed!

Contributing

Contributions are welcome! See the contributing guide for details.

License

MIT

Description from the npm listing.

  • ai
  • ai-sdk
  • react
  • zustand
  • state-management
  • chat
  • llm
  • vercel

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/store weekly downloads on npm, last 90 days: 30,109 weekly downloads as of Oct 18, 2026, -28.0% over 90 days.@ai-sdk-tools/storeWeekly downloads on npm · Last 90 days30,109downloads / week-28.0% over 90 days020K40K60K80KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
@ai-sdk-tools/store weekly downloads on npm, last 90 days: 30,109 weekly downloads as of Oct 18, 2026, -28.0% over 90 days.

7/30/90-day growth

@ai-sdk-tools/store weekly downloads growth on npm: -37.6% over 7 days, -42.6% over 30 days, -28.0% over 90 days.@ai-sdk-tools/storeWeekly downloads growth on npm30,109downloads / week now7-day growth-18,156 weekly downloads-37.6%30-day growth-22,306 weekly downloads-42.6%90-day growth-11,708 weekly downloads-28.0%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@ai-sdk-tools/store weekly downloads growth on npm: -37.6% over 7 days, -42.6% over 30 days, -28.0% over 90 days.

Ranking history

@ai-sdk-tools/store npm ranking history: currently #688 (by weekly downloads).@ai-sdk-tools/storenpm ranking · by weekly downloads · Last 90 days#688current rank#686#688#690#692#694#696Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
@ai-sdk-tools/store npm ranking history: currently #688 (by weekly downloads).

Listing placement

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

Listing placement

AI SDKs264 listings · 14 pages · page 3, #4 (overall #44)
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/store
Date (UTC)Weekly downloadsChange vs. previous
30,109+4.4K
25,719-5.3K
31,045+2.4K
28,626-9.1K
37,733-9.4K
47,1540
47,154-1.1K
48,265-1K
49,284+902
48,382-3.5K
51,864-4.9K
56,757-5.5K
62,274-13.6K
75,825—

Similar npm AI SDKs plugins

All 20 @ai-sdk-tools/store alternatives

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