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

  1. Open your agent and go to Actions > Widgets.
  2. Select New widget.
  3. Choose Describe with AI or Start from code.
  4. Check the preview, then select Save.
  5. 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

Component references:

Something unclear or missing? Tell us and we will fix the page.