Demos / Widget round trip · Kettle & Co
Widget round trip
Widgets are rich UI in the chat that send the visitor’s choice back to the agent. On a coffee roaster’s product page the agent shows a grind picker; a tap goes back as a turn, and the page’s grind selector and brew card change in reply.
What it shows
- A widget,
kettle-grind-picker, rendered natively by<mindset-agent>: four buttons, each asendToAgentaction that posts "Grind: Filter" back as the next turn - The agent answering that turn with the page tool
set_grind, so the product page’s grind selector changes and is marked "Set by the roaster" - A function over literal brew data,
kettle-brew-guide, whose filter row returns "15 g to 250 ml at 200°F" - The brew card drawn by the page from the function’s
tool_endoutput, so the recipe on the page is the one the function returned - The selected grind and the cart sent as situational awareness, and
add_to_bagrefusing until a grind is set
Files
- demos/kettle/demo.json
- demos/kettle/widgets/kettle-grind-picker.json
- demos/kettle/functions/kettle-brew-guide.json
- demos/kettle/prompt/policy-rules.md
- src/demos/kettle/index.tsx
- src/demos/kettle/pageTools.ts
- src/demos/kettle/brew.ts
- src/content/demos/kettle.ts
- src/content/demos/kettle.md