tanstack-ai

Generate streaming AI responses with tool calling and Zod-validated structured output.

3|Updated May 11, 2026
One-click install
npx skills add https://github.com/JeromyJSmith/lattice-platform --skill tanstack-ai-jeromyjsmith
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tanstack-ai
Source: https://github.com/JeromyJSmith/lattice-platform/tree/main/.agents/skills/skills/tanstack-ai
Command: npx skills add https://github.com/JeromyJSmith/lattice-platform --skill tanstack-ai-jeromyjsmith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

TanStack AI solves the challenge of integrating AI providers reliably while keeping your app streaming-first, tool-capable, and type-safe instead of relying on brittle string parsing.

Core Features & Use Cases

  • Provider-agnostic AI generation: Use one API surface across OpenAI, Anthropic, Gemini, and Ollama without rewriting your application logic.
  • Streaming-first responses: Stream text incrementally for responsive UIs and progressive rendering.
  • Tool calling with structured contracts: Define typed tool parameters and enable approval workflows for risky actions, such as destructive operations.
  • Structured output with Zod: Produce schema-validated, predictable results for extraction and automation scenarios (e.g., generating JSON objects you can trust).
  • Multimodal support: Handle text plus image inputs, and generate images through provider adapters.
  • React/Solid/vanilla UX hooks: Drop in ready-to-use hooks for chat and completion interfaces.

Quick Start

Ask an AI to generate a structured, Zod-validated object using a provider adapter like OpenAI with streaming enabled and typed tool definitions for any required actions.

Frequently Asked Questions about tanstack-ai

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stream AI responses with structured output in a React app?

Streaming AI responses with structured output in React uses provider-agnostic generation APIs and ready-to-use UX hooks. You wire React hooks to stream text incrementally while applying Zod schemas to validate predictable JSON results for your UI.

What's the best way to call tools with type-safe schemas across multiple LLM providers?

The best way to call tools across multiple LLM providers is using a provider-agnostic AI SDK. You define typed tool parameters with Zod, enabling agentic tool execution with optional approval gates for risky actions without rewriting application logic.

How does structured output with Zod work for AI generation?

Structured output with Zod works by applying schema validation to AI generation results. This produces predictable, typed objects for extraction and automation scenarios, ensuring you generate JSON objects you can trust without relying on brittle string parsing.

Can I use the same AI generation API with OpenAI, Anthropic, and Ollama?

Yes, you can use the same AI generation API with OpenAI, Anthropic, and Ollama. Provider adapters allow provider-agnostic AI generation, so you maintain one API surface across multiple LLM providers without rewriting your application logic.

How do I add approval gates for destructive AI tool calling?

To add approval gates for destructive AI tool calling, you define typed tool parameters and enable approval workflows within the generation API. This allows agentic tool execution to pause for human approval before completing risky actions.