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.

3.1kStars on the repository
48Mods indexed here, across every type
todayLast push, which is what freshness is scored on
MITLicence, which decides whether bodies are shown

TanStack/ai

Skill Claude CodeCodex

Implement the MessageStore, RunStore, InterruptStore, MetadataStore contracts for @tanstack/ai-persistence against any database. defineAIPersistence, composePersistence overrides, critical invariants (full-replace saveThread, insert-if-absent createOrResume and interrupt create), authorize thread access…

3.1k +11 today A 93 tokens original MIT

ai-sandbox

26

TanStack/ai

Skill Claude CodeCodex

Run harness adapters (Claude Code, Codex, OpenCode) INSIDE isolated sandboxes via defineSandbox + withSandbox + a provider (localProcessSandbox / dockerSandbox). Covers declarative provisioning: createSecrets + secret/bearer, skills (agentSkill/gitSkill/mcpSkill/ fileSkill), plugins, instructions → canonical AGENTS.md…

3.1k +11 today B 402 tokens original MIT

ai-skills

27

TanStack/ai

Skill Claude CodeCodex

Portable Agent Skills (SKILL.md) for TanStack AI with @tanstack/ai-skills. Renders a skill catalog and a loadskill tool via the withSkills middleware so any tool-calling model loads skills on demand, on any provider. Covers the SkillSource interface, inlineSkill/skillDirectory/staticSkills, the aggregate/…

3.1k +11 today A 117 tokens original MIT

alpha

28

TanStack/ai

Skill Claude CodeCodex

does the alpha thing.

3.1k +11 today A 6 tokens original MIT

beta

29

TanStack/ai

Skill Claude CodeCodex

does the beta thing.

3.1k +11 today A 6 tokens original MIT

gamma

30

TanStack/ai

Skill Claude CodeCodex

Hostile-ish content: an unquoted colon in the description above.

3.1k +11 today A 12 tokens original MIT

ai-core

31

TanStack/ai

Skill Claude CodeCodex

Entry point for TanStack AI skills. Routes to chat-experience, tool-calling, media-generation, structured-outputs, adapter-configuration, ag-ui-protocol, middleware, locks, custom-backend-integration, and debug-logging, plus the skills shipped by companion packages (@tanstack/ai-persistence, @tanstack/ai-code-mode).…

3.1k +11 today A 108 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Provider adapter selection and configuration: openaiText, anthropicText, geminiText, ollamaText, grokText, groqText, openRouterText, bedrockText, byteplusText, openaiCompatible. Per-model type safety with modelOptions, reasoning/thinking configuration, runtime adapter switching, extendAdapter() for custom models…

3.1k +11 today A 227 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Server-side AG-UI streaming protocol implementation: StreamChunk event types (RUNSTARTED, TEXTMESSAGESTART/CONTENT/END, TOOLCALLSTART/ARGS/END, RUNFINISHED, RUNERROR, STEPSTARTED/STEPFINISHED, STATESNAPSHOT/DELTA, CUSTOM), toServerSentEventsStream() for SSE format, toHttpStream() for NDJSON format. For backends…

3.1k +11 today A 94 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

End-to-end chat implementation: server endpoint with chat() and toServerSentEventsResponse(), client-side useChat hook with fetchServerSentEvents(), message rendering with UIMessage parts, multimodal content, thinking/reasoning display. Covers streaming states, connection adapters, and message format conversions. NOT…

3.1k +11 today A 78 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Browser chat persistence on useChat / ChatClient: localStoragePersistence, sessionStoragePersistence, indexedDBPersistence. Client-authoritative (adapter, full transcript) vs server-authoritative (persistence: true, no client cache). Reload restore, pending interrupts, mid-stream rejoin with delivery durability. Use…

3.1k +11 today A 141 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Connect useChat to a non-TanStack-AI backend through custom connection adapters. ConnectConnectionAdapter (single async iterable) vs SubscribeConnectionAdapter (separate subscribe/send). Customize fetchServerSentEvents() and fetchHttpStream() with auth headers, custom URLs, and request options. Import from framework…

3.1k +11 today B 78 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Pluggable, category-toggleable debug logging for TanStack AI activities. Toggle with debug: true | false | DebugConfig on chat(), summarize(), generateImage(), generateSpeech(), generateTranscription(), generateVideo(). Categories: request, provider, output, middleware, tools, agentLoop, config, errors. Pipe into…

3.1k +11 today A 104 tokens original MIT

ai-core/locks

38

TanStack/ai

Skill Claude CodeCodex

LockStore, InMemoryLockStore, LocksCapability and withLocks for multi-instance coordination in TanStack AI. Ships in @tanstack/ai — NOT in @tanstack/ai-persistence. Separate from AIPersistence state stores — not a stores key, not composable. InMemoryLockStore vs a distributed (e.g. Cloudflare Durable Object) lock…

3.1k +11 today A 112 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Image, audio, video, speech (TTS), and transcription generation using activity-specific adapters: generateImage() with openaiImage/geminiImage/byteplusImage, generateAudio() with geminiAudio/falAudio, generateVideo() with async polling (openaiVideo/geminiVideo/grokVideo/falVideo/byteplusVideo/openRouterVideo…

3.1k +11 changed today A 147 tokens original MIT

ai-core/middleware

40

TanStack/ai

Skill Claude CodeCodex

Chat lifecycle middleware hooks: onConfig, onStart, onChunk, onBeforeToolCall, onAfterToolCall, onUsage, onFinish, onAbort, onError. Use for analytics, event firing, tool caching (toolCacheMiddleware), logging, and tracing. Middleware array in chat() config, left-to-right execution order. NOT onEnd/onFinish callbacks…

3.1k +11 today A 86 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Type-safe JSON schema responses from LLMs using outputSchema on chat() and useChat(). Supports Zod, ArkType, and Valibot schemas. The adapter handles provider-specific strategies transparently — never configure structured output at the provider level. Pass stream:true alongside outputSchema for incremental JSON deltas…

3.1k +11 today A 128 tokens original MIT

TanStack/ai

Skill Claude CodeCodex

Isomorphic tool system: toolDefinition() with Zod schemas, .server() and .client() implementations, passing tools to both chat() on server and useChat/clientTools on client, tool approval flows with needsApproval and bound interrupts (resolveInterrupt), generic middleware interrupts with defineInterrupt(), lazy tool…

3.1k +11 today A 82 tokens original MIT

emoji-storyteller

43

TanStack/ai

Skill Claude CodeCodex

Retell the answer as a short story told mostly in emoji.

3.1k +11 today A 18 tokens original MIT

haiku

44

TanStack/ai

Skill Claude CodeCodex

Answer only as a haiku, three lines of 5-7-5 syllables.

3.1k +11 today A 22 tokens original MIT

pirate-speak

45

TanStack/ai

Skill Claude CodeCodex

Answer entirely as a boisterous pirate, with nautical slang and "arrr".

3.1k +11 today A 22 tokens original MIT