A2UiRestaurantExample
Agent Runtimes / examples / A2UiRestaurantExample
Variable: A2UiRestaurantExample
constA2UiRestaurantExample:React.FC
Defined in: examples/A2UiRestaurantExample.tsx:386
A2UiRestaurantExample - Main example component
Demonstrates A2UI protocol integration with pydantic-ai. The agent generates A2UI JSON messages for restaurant search, display, and booking functionality.
Uses @a2ui/react's two-context architecture:
- A2UIProvider wraps the app, receives an onAction callback
- useA2UIActions() provides processMessages/clearSurfaces/getSurfaces
- A2UIRenderer renders surfaces by ID