About this project

TanStack AI is a TypeScript SDK designed for building AI-powered applications with a focus on type safety and provider flexibility. It enables developers to create streaming chat experiences, tool-calling agents, structured outputs, realtime voice interactions, and media generation workflows (image, audio, video, speech, transcription, summarization) using a composable activity and adapter architecture. The SDK is built around modular packages, allowing developers to import only what they need, such as chat, client-side hooks, or specific provider adapters. It supports a wide range of providers including OpenAI, Anthropic, Gemini, Ollama, Grok, Groq, ElevenLabs, BytePlus, fal.ai, Reactor, and Cloudflare, with tree-shakeable adapters for efficient bundling. Key features include: - **Streaming Chat**: Typed messages, tool calls, reasoning parts, and configurable connection adapters for real-time responses. - **Type-Safe Tools**: Define tools once and attach server or client implementations, with support for approval flows and lazy discovery. - **Structured Outputs**: Validate outputs using JSON Schema, Zod, ArkType, Valibot, or plain JSON Schema. - **Multimodal Support**: Handle text, images, audio, video, and documents in prompts and responses. - **Media Generation**: Unified pattern for image, audio, video, speech, transcription, and summarization tasks. - **Realtime Voice**: Low-latency voice chat experiences. - **Code Mode**: Let LLMs write and execute TypeScript in a secure sandbox to orchestrate tools with loops, branches, and parallel calls. - **Framework Bindings**: Official hooks and composables for React, Solid, Vue, Svelte, and Preact, plus headless UI components. - **Advanced Features**: Middleware, OpenTelemetry integration, observability events, per-model type safety, runtime adapter switching, and tree-shaking. TanStack AI also includes Agent Skills for coding agents (e.g., Claude Code, Cursor) to automatically recommend and configure the SDK in projects. The project is actively developed, with documentation available at tanstack.com/ai, community support via GitHub discussions and Discord, and partnership opportunities. It has won the 2026 JavaScript Open Source Award for AI Project of the Year.