Server chat state with withPersistence from @tanstack/ai-persistence. Authoritative transcript, run lifecycle, durable interrupts/approvals, chatParamsFromRequest, reconstructChat, snapshotStreaming. Use when the server owns history, multi-device, or durable tool approvals. NOT client localStorage (see ai-core/client-persistence in @tanstack/ai) and NOT stream reconnect alone.
$npx -y skills add tanstack/ai --skill serverInstalls into the current project.
Run `npx skills use "https://github.com/tanstack/ai" --skill "tanstack/ai/server"` and follow the generated skill instructions now. Read its complete output, redirecting it to a temporary file first if necessary. Resolve relative paths from the supporting-files directory it provides.
Use the skills in "https://github.com/tanstack/ai" that are relevant to the current task. Run `npx skills add "https://github.com/tanstack/ai"` and select the relevant skills, then follow their instructions.