Skip to main content
ClaudeWave
EN, English
TanStack / Subagents

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.

  • 3.2k stars
  • 371 forks
  • 35 open issues
  • Language: TypeScript
  • License: MIT
  • updated

Install

Terminal
git clone https://github.com/TanStack/ai && cp ai/*.md ~/.claude/agents/
  1. Clone the repository and copy the agent .md definitions into ~/.claude/agents (or .claude/agents inside a project).
  2. Start a new Claude Code session to load the agents.
  3. Delegate work to them with the Task/Agent tool or by name.

Editor's note

TanStack AI is a TypeScript SDK that provides a unified, provider-agnostic interface for building AI-powered applications across React, Vue, Svelte, Solid, and Preact, as well as server-side and headless environments. It connects to Anthropic's API (alongside OpenAI, Gemini, and OpenRouter) through provider adapters like `@tanstack/ai-openai`, enabling streaming chat, type-safe tool calling via `toolDefinition()`, structured outputs validated with Zod, ArkType, or Valibot, and multimodal workflows covering images, audio, video, speech, and transcription. A standout feature called Code Mode lets a language model write and execute TypeScript in an isolated sandbox to orchestrate tools with loops, branches, and parallel calls. Built-in devtools expose message streams, tool calls, errors, usage metrics, and OpenTelemetry traces for observability. The library is designed for frontend developers and backend engineers who want consistent AI primitives across multiple frameworks and providers without being locked into a single vendor.

Installable items

24 items in this repository

>

Install
ai-coreSkill

>

Install

>

Install

>

Install
ai-mcpSkill

>

Install

>

Install

Use when a Cloudflare Worker needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its D1 binding (raw or via Drizzle), plus a Durable Object LockStore. Covers per-request bindings, wrangler config, D1 migrations, and lease-based locks.

Install

Use when a Cloudflare Worker needs durable byte storage for TanStack AI generated media (images, audio, video, transcripts) — writes a BlobStore backed by R2 and an ArtifactStore backed by D1, composes them onto the generation persistence so withGenerationPersistence persists artifact bytes, and serves them back from a Worker GET route. Includes one-line sketches for S3, GCS, Vercel Blob, Supabase, and a dev filesystem BlobStore.

Install

Use when an app needs TanStack AI chat persistence on a database with no dedicated recipe — raw Postgres (pg/postgres.js), Kysely, node:sqlite, MongoDB, Supabase, Redis. Writes a chat-persistence.ts against the app's existing client, covering the four stores, the idempotency invariants, and the conformance gate. Route to the Drizzle, Prisma, or Cloudflare skills instead when one of those matches.

Install

Use when an app already runs Drizzle ORM and needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its existing db handle, schema file, and drizzle-kit journal. Covers the four tables (SQLite/Postgres/MySQL), the onConflict idempotency rules, JSON columns, and per-request bindings like D1.

Install

Use when an app already runs Prisma and needs TanStack AI chat persistence — writes a chat-persistence.ts into the app against its existing PrismaClient and schema.prisma. Covers the four models, BigInt timestamps, JSON-as-string columns, upsert-with-empty-update idempotency, and model renaming.

Install

>

Install

>

Install
README

Subagents overview

README preview not available. Visit the repo on GitHub for full documentation.
Topics
aiai-agentsai-sdkanthropicchatbotfunction-callinggeminigenerative-aillmmultimodalopenaireactsolidjsstreamingsveltetanstacktool-callingtypescripttypescript-sdkvue
Frequently asked

What people ask about ai

What is TanStack/ai?

TanStack/ai is subagents for the Claude AI ecosystem. 🤖 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. It has 3.2k GitHub stars and its last recorded update is dated 2026-10-23.

How do I install ai?

You can install ai by cloning the repository (https://github.com/TanStack/ai) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.

Is TanStack/ai safe to use?

Our security agent has analyzed TanStack/ai and assigned a Trust Score of 100/100 (tier: Verified). See the full breakdown of passed checks and flags on this page.

Who maintains TanStack/ai?

TanStack/ai is maintained by TanStack. The last recorded GitHub activity is dated 2026-10-23, with 35 open issues.

Are there alternatives to ai?

Yes. On ClaudeWave you can browse similar subagents at /categories/agents, sorted by popularity or recent activity.