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.
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.