Available on crate feature
ui only.Expand description
Dynamic UI generation for agents.
Enables agents to render rich user interfaces via tool calls:
UiToolset- All UI rendering toolsUiResponse- UI component treeUiEvent- User interaction eventsUiUpdate- Streaming UI updates
Available with feature: ui
Modules§
- prompts
- UI Agent System Prompts
- schema
- templates
- Pre-built UI Templates
- tools
- toolset
- validation
- Validation for UI components
Structs§
- Alert
- Badge
- Button
- Card
- Chart
- Code
Block - Container
- Date
Input - Divider
- Grid
- Icon
- Image
- KeyValue
- KeyValue
Pair - List
- Modal
- Multi
Select - Number
Input - Progress
- Render
Alert Tool - Tool for rendering alerts/notifications
- Render
Card Tool - Tool for rendering information cards.
- Render
Chart Tool - Tool for rendering charts and data visualizations.
- Render
Confirm Tool - Tool for rendering confirmation dialogs
- Render
Form Tool - Tool for rendering forms to collect user input.
- Render
Layout Tool - Tool for rendering complex multi-component layouts.
- Render
Modal Tool - Tool for rendering modal dialogs.
- Render
Progress Tool - Tool for rendering progress indicators and loading states
- Render
Table Tool - Tool for rendering data tables.
- Render
Toast Tool - Tool for rendering toast notifications
- Select
- Select
Option - Skeleton
- Slider
- Spinner
- Stack
- Stat
Item - Status item for dashboard templates
- Switch
- Tab
- Table
- Table
Column - Tabs
- Template
Data - Template data that can be customized
- Text
- Text
Input - Textarea
- Toast
- UiResponse
- UiToolset
- A toolset containing all UI rendering tools.
- UiUpdate
- Incremental UI update for streaming
- User
Data - User data for templates
- Validation
Error - Validation error for UI components
Enums§
- Alert
Variant - Badge
Variant - Button
Variant - Chart
Kind - Component
- Modal
Size - Skeleton
Variant - Spinner
Size - Stack
Direction - Text
Variant - Theme
- Theme configuration for UI rendering
- UiEvent
- Event sent from UI to agent when user interacts with components
- UiOperation
- Operation type for streaming UI updates
- UiTemplate
- Available UI templates
Constants§
- MIME_
TYPE_ UI - MIME_
TYPE_ UI_ UPDATE - UI_
AGENT_ PROMPT - System prompt for agents using UI tools.
- UI_
AGENT_ PROMPT_ SHORT - Short version of the prompt for token-limited contexts
Traits§
- Validate
- Trait for validatable UI components
Functions§
- render_
template - Generate a UI response from a template
- validate_
ui_ response - Validate a UiResponse and return Result