Create Rich UI Blocks with Data Components
Copy page
Learn how to create and use data components for rich, interactive Agent messages.
What are Data Components?
Data Components allow your agents to return rich, interactive content instead of just text. Think of them as reusable UI building blocks that your agent can populate with data.
For example, instead of returning "You have 3 tasks: Task #123 (shipped), Task #124 (processing)...", your agent can return a properly formatted task list component.
Model Recommendations
Data components require high-capability models for best results.
Configure the structured output model in your agent settings with one of these recommended models:
| Provider | Recommended Models |
|---|---|
| Anthropic | claude-sonnet-4+, claude-opus-4+ |
| OpenAI | gpt-4.1, gpt-5.1, gpt-5.2 |
gemini-3.0-pro |
Not recommended: Lower-tier models (gpt-4.1-mini, gpt-4.1-nano, gemini-2.5-flash, gemini-2.5-flash-lite), or custom models.
Data components use structured output generation, which requires frontier-level reasoning capabilities.
Defining Data Components
Data components are defined using the dataComponent builder function. We recommend using Zod schemas for type safety and better developer experience.
JSON Schema is also supported if you prefer traditional schema definitions.
Using in Agents
Register data components with your agent:
When a user asks "Show me my tasks", the agent will respond with:
Frontend Integration
Create a React component matching your data component name:
Register it with the Inkeep chat component:
The agent will automatically return structured data that renders as your React component.