TanStack AI
A powerful, type-safe AI SDK for building AI-powered applications.
- Provider-agnostic adapters (OpenAI, Anthropic, Gemini, Ollama, etc.)
- Multimodal content support - Send images, audio, video, and documents
- Chat completion, streaming, and agent loop strategies
- Headless chat state management with adapters (SSE, HTTP stream, custom)
- Isomorphic type-safe tools with server/client execution
- Enhanced integration with TanStack Start - Share implementations between AI tools and server functions
Bonus: TanStack Start Integration
TanStack AI works with any framework (Next.js, Express, Remix, etc.).
With TanStack Start, you get a bonus: share implementations between AI tools and server functions with createServerFnTool:
import { createServerFnTool } from '@tanstack/ai-react'
const getProducts = createServerFnTool({
name: 'getProducts',
inputSchema: z.object({ query: z.string() }),
execute: async ({ query }) => db.products.search(query),
})
chat({ tools: [getProducts.server] })
const products = await getProducts.serverFn({ query: 'laptop' })
No duplicate logic, full type safety, automatic validation. The serverFn feature requires TanStack Start. See docs for details.
Get Involved
Partners
We're looking for TanStack AI Partners to join our mission! Partner with us to push the boundaries of TanStack AI and build amazing things together.
LET'S CHAT
Explore the TanStack Ecosystem
… and more at TanStack.com »