ai
by
TanStack

Description: 🤖 Type-safe, provider-agnostic TypeScript AI SDK for streaming chat, tool calling, agents, and multimodal apps across OpenAI, Anthropic, Gemini, React, Vue, Svelte, and Solid.

View TanStack/ai on GitHub ↗

Summary Information

Updated 7 minutes ago
Added to GitGenius on May 25th, 2026
Created on October 8th, 2025
Open Issues & Pull Requests: 92 (-1)
Number of forks: 219
Total Stargazers: 2,699 (+0)
Total Subscribers: 8 (+0)

Issue Activity (beta)

Open issues: 41
New in 7 days: 12
Closed in 7 days: 16
Avg open age: 42 days
Stale 30+ days: 21
Stale 90+ days: 2

Recent activity

Opened in 7 days: 5
Closed in 7 days: 9
Comments in 7 days: 1
Events in 7 days: 18

Top labels

  • enhancement (5)

Detailed Description

TanStack AI is a versatile, type-safe, provider-agnostic TypeScript SDK designed for building advanced AI-powered applications with streaming chat, tool-calling agents, structured outputs, real-time voice, media generation, and multimodal capabilities. Its architecture is modular and composable, allowing developers to integrate only the features they need, such as chat, image, audio, video, speech, transcription, summarization, code execution, devtools, and framework bindings. The SDK supports seamless integration with popular AI providers like OpenAI, Anthropic, Gemini, Groq, ElevenLabs, fal.ai, and local models via Ollama, as well as OpenRouter for unified access to hundreds of models.

One of the core strengths of TanStack AI is its type safety, ensuring reliable and predictable interactions between tools, agents, and AI models. Developers can define tools using a shared contract, specifying input and output schemas with libraries like Zod, ArkType, Valibot, or plain JSON Schema. This enables consistent tool behavior across server and client environments, and supports structured output flows for typed responses instead of freeform text. The SDK also facilitates multimodal prompts and responses, allowing applications to handle text, images, audio, video, and documents within a unified workflow.

TanStack AI excels at streaming chat experiences, offering typed messages, tool calls, reasoning components, and configurable connection adapters. It supports real-time voice chat with provider adapters for low-latency sessions and token minting, making it suitable for interactive and responsive AI applications. The Code Mode feature empowers large language models (LLMs) to write and execute TypeScript code in a secure sandbox, orchestrating tools with loops, branches, and parallel calls. This capability is particularly useful for building intelligent agents that can perform complex tasks autonomously.

The SDK provides framework-native clients for React, Solid, Vue, Svelte, and Preact, along with a headless client for custom runtimes. Each framework package offers hooks or composables for chat, real-time interactions, and media generation, enabling developers to build AI features directly into their preferred frontend environments. Headless UI components are also available for chat interfaces, streamlining the development of user-facing AI applications.

Advanced features include middleware for customizing chat configuration, chunk handling, tool calls, usage tracking, error management, and structured outputs. Observability pipelines and OpenTelemetry integration allow developers to inspect messages, tool calls, stream chunks, errors, usage metrics, and traces, providing deep insight into application behavior and performance. Runtime adapter switching and tree-shaking ensure that only the necessary activities and adapters are included in the final build, optimizing application size and efficiency.

TanStack AI is actively maintained and supported by a vibrant community, with extensive documentation, GitHub discussions, and Discord channels for collaboration. The project encourages contributions and partnerships to further expand its capabilities. As part of the broader TanStack ecosystem, TanStack AI integrates well with other tools for configuration, database management, devtools, forms, state management, routing, and data grids, offering a comprehensive solution for modern AI application development. Overall, TanStack AI stands out as a robust, flexible, and developer-friendly SDK for building sophisticated, type-safe, and provider-agnostic AI applications across multiple platforms and frameworks.

ai
by
TanStackTanStack/ai

Repository Details

Fetching additional details & charts...