Widgets overview
Widgets are interactive cards inside the chat, such as order tracking or booking pickers. Learn how they are built from components, states and functions.
Working draft. These docs are illustrative: names, endpoints and examples describe the intended behaviour and can change before launch.
A widget is an interactive component the agent shows inside the conversation: an order tracking card, a booking picker, a form or a set of product cards. Customers tap and fill in things instead of typing. Build widgets in the widget builder, either by describing them to AI or by editing the definition in code. For the product view, see widgets.
How a widget is built
Every widget has three parts.
- Components are the visible pieces: text, layout, form inputs, buttons, data displays and media.
- States are named values the widget remembers, such as the selected date or the loaded order.
- Functions are lists of steps that run on events, such as loading data when the widget appears or sending a message when a button is tapped.
The agent decides when to show a widget, based on the When to show instruction you write for it.
Build your first widget
- Open your agent and go to Actions > Widgets.
- Select New widget.
- Choose Describe with AI or Start from code.
- Check the preview, then select Save.
- Test it in the Playground and publish the agent.
You should see the widget appear in the Playground chat when you ask a question that matches its When to show text.
Pages in this section
- AI widget builder: describe a widget in plain language.
- Code editor: edit the widget definition directly.
- States: store and show values.
- Functions: run steps when something happens.
- File uploads: let customers attach files.
- Click tracking: measure which buttons get used.
Component references: