Skip to content
PluginStats

@tanstack/ai-persistence weekly downloads statistics

By tanstack (52 listings) · npm · AI SDKs

Composable state persistence for TanStack AI messages, runs, interrupts, metadata, and locks.

View on npm Stale · Oct 17, 2026

@tanstack/ai-persistence has 47,681 recorded weekly downloads on npm, an increase of 161% over the past 30 days, ranking #572 of 2,256 tracked listings.

Weekly downloads
47,681
Official API · Oct 17, 2026
7-day growth
-8.4%
-4.4K weekly downloads
30-day growth
+161%
+29.4K weekly downloads
90-day growth
—
Insufficient history
Rank
#572
Among tracked npm listings

About @tanstack/ai-persistence

@tanstack/ai-persistence

Composable state persistence for TanStack AI messages, runs, interrupts, metadata, and locks

A conversation that only lives in memory is gone on reload and absent on a second device. This package stores it in your own database: one middleware on the server writes the transcript — and, with the matching stores configured, run status and pending approvals — through an adapter you define, and the client asks the server for the thread on mount. The client half ships in the framework package you already use (@tanstack/ai-react, -vue, -solid, -svelte, -angular, or @tanstack/ai-client).

Installation

Usage

Server: store the conversation

withPersistence writes the transcript into your messages store, plus run status and pending approvals when the adapter also provides runs and interrupts. Start with memoryPersistence() for local development and swap in your own adapter later:

Client: bring it back

persistence: true puts the server in charge: the browser caches nothing and fetches the thread on mount. Best for multi-user and multi-device apps.

Prefer the browser to own the history? Pass a storage adapter instead — localStoragePersistence(), sessionStoragePersistence(), or indexedDBPersistence() — and no server store is needed.

Survive a reload mid-answer

Add a GET on the same route. reconstructChat returns the stored thread plus a cursor to any run still generating; useChat tails that run so the reply finishes in place.

Build your own adapter

An adapter is a plain object of store functions. The core never looks at your tables, so the schema stays yours. One store, messages, is enough for withPersistence:

The other stores are optional and add capabilities as you provide them: runs, interrupts, and metadata for chat state; generationRuns, artifacts, and blobs for image, video, speech, and transcription runs. composePersistence layers overrides on top of a base backend.

Prove it with the conformance suite

The same suite every packaged backend runs is shipped for yours:

Stores you do not provide go in skip. The testkit is a Vitest suite; vitest is an optional peer dependency, so install it in your project before importing @tanstack/ai-persistence/testkit.

Documentation

• Overview: the three steps, and which setup you want • Chat persistence: the server middleware in full, including durable interrupts • Client persistence: the modes, storage backends, and what a reload restores • Build your own adapter • Controls: compose backends per store • Store reference: every store's methods and how the records relate

License

MIT

Description from the npm listing.

  • ai
  • ai-sdk
  • typescript
  • tanstack
  • tanstack-intent
  • persistence
  • durable
  • resume
  • chat-history

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

@tanstack/ai-persistence weekly downloads on npm, last 90 days: 47,681 weekly downloads as of Oct 17, 2026.@tanstack/ai-persistenceWeekly downloads on npm · Last 90 days47,681downloads / week020K40K60K80KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 22, 2026 – Oct 17, 2026 · 88 observations · Updated Oc…pluginstats.com
@tanstack/ai-persistence weekly downloads on npm, last 90 days: 47,681 weekly downloads as of Oct 17, 2026.

7/30/90-day growth

@tanstack/ai-persistence weekly downloads growth on npm: -8.4% over 7 days, +161% over 30 days, 90-day growth unavailable.@tanstack/ai-persistenceWeekly downloads growth on npm47,681downloads / week now7-day growth-4,354 weekly downloads-8.4%30-day growth+29,409 weekly downloads+161%90-day growth+47,681 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@tanstack/ai-persistence weekly downloads growth on npm: -8.4% over 7 days, +161% over 30 days, 90-day growth unavailable.

Ranking history

@tanstack/ai-persistence npm ranking history: currently #572 (by weekly downloads).@tanstack/ai-persistencenpm ranking · by weekly downloads · Last 90 days#572current rank#570#571#572#573#574Jul 21Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19rankOct 18, 2026 – Oct 19, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@tanstack/ai-persistence npm ranking history: currently #572 (by weekly downloads).

Listing placement

All npm2,256 listings · 113 pages · 1,130 shown · page 29, #12 (overall #572)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs250 listings · 13 pages · page 2, #8 (overall #28)
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 (121)
Recent weekly downloads observations for @tanstack/ai-persistence
Date (UTC)Weekly downloadsChange vs. previous
47,681-4.7K
52,399+7.1K
45,270-10K
55,239-7.3K
62,5080
62,508+11K
51,473-562
52,035-4.7K
56,702-6.9K
63,561-2K
65,560-3.3K
68,908-7.8K
76,685+1.4K
75,254—

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/@tanstack/ai-persistence. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.