agents.examples.tool_based_generative_ui
Tool Based Generative UI example.
Demonstrates an agent that uses tools to render dynamic UI components. The frontend defines "render tools" that the agent can call to display rich content like cards, tables, charts, etc.
Features:
- Frontend-defined render tools
- Dynamic UI generation based on agent decisions
- Rich content beyond plain text
This pattern is useful for:
- Data visualization
- Product recommendations
- Interactive dashboards
- Any scenario requiring rich UI rendering
Note: This example relies on frontend render tools. The actual UI rendering happens in the React frontend using CopilotKit's useFrontendTools or similar mechanism.