Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

structured-outputs.md

21 lines1.3 KB

1---
2title: Structured Outputs (Moved)
3id: structured-outputs
4order: 4
5description: "Structured outputs have their own section. Pick the guide for what you build: one-shot extraction, a streaming UI, multi-turn chat, tools, or a harness agent."
6keywords:
7 - tanstack ai
8 - structured outputs
9 - moved
10 - redirect
11---
12​
13Structured output returns a typed object from the model. Pick the page for the shape you need:
14​
15- **[Overview](../structured-outputs/overview)**: what structured output is, which schema libraries work, provider support, and which page to read.
16- **[One-Shot Extraction](../structured-outputs/one-shot)**: one prompt in, one typed object out. Use it when you do not need streaming or chat history.
17- **[Streaming UIs](../structured-outputs/streaming)**: `useChat({ outputSchema })` fills a UI field by field with `partial` and `final`.
18- **[Multi-Turn Chat](../structured-outputs/multi-turn)**: each completed run adds a typed response to the message history. The `data` of its `structured-output` part has the type of your schema.
19- **[With Tools](../structured-outputs/with-tools)**: use `outputSchema` with the agent loop, including server-tool approvals and client tools.
20​
21Need a coding agent in a sandbox that reads files and then returns a typed object? See [Harness Agents](../structured-outputs/harnesses).