TanStack/ai

🤖 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.

What it solves

TanStack AI는 타입 안전하고 공급자에 구애받지 않는 TypeScript SDK를 제공하여 개발자가 AI 기반 애플리케이션을 구축할 수 있도록 합니다. OpenAI, Anthropic, Gemini와 같은 다양한 AI 모델 간 전환 시 공급자별 코드를 작성할 필요가 없으며, 스트리밍 채팅, 도구 호출 에이전트, 멀티모달 콘텐츠와 같은 복잡한 AI 기능의 통합을 단순화합니다.

How it works

SDK는 조합 가능한 액티비티와 공급자 어댑터 시스템을 기반으로 구축되었습니다. 개발자는 필요한 기능(예: 채팅, 이미지 생성, 음성)만 가져와 번들 크기를 최소화할 수 있습니다. 공유 toolDefinition() 계약을 사용하여 도구가 서버든 클라이언트든 일관된 타입으로 실행될 수 있도록 보장합니다.

Who it’s for

React, Vue, Svelte, Solid, Preact 등 다양한 프론트엔드 프레임워크 또는 서버 사이드 환경에서 AI 애플리케이션을 구축하는 TypeScript 개발자를 위한 것입니다. AI 공급자 선택에 유연성을 유지하고 AI 워크플로 전체에서 엄격한 타입 안전성을 보장하고자 하는 분들에게 특히 유용합니다.

Highlights

  • Provider Agnostic: Supports a wide range of providers including OpenAI, Anthropic, Gemini, Groq, and local models via Ollama.
  • Multimodal Capabilities: Handles text, images, audio, video, and documents.
  • Code Mode: Allows LLMs to write and execute TypeScript in a secure isolated sandbox for complex orchestration.
  • Structured Outputs: Supports typed objects via JSON Schema, Zod, ArkType, and Valibot.
  • Framework Native: Provides dedicated hooks and composables for popular JS frameworks.
  • Observability: Includes devtools and OpenTelemetry integration for tracing and monitoring AI interactions.