BuildersBuildShow a widget
Show a widget
Gives an agent a table, card, form or chart it shows in a conversation, laid out the same way every time.
See it running: Halcyon
Ask your coding agent#
Build a widget for the invoice exceptions agent: a table of invoice lines against purchase order lines, with quantity, unit price and total for each, and the lines that differ marked. Publish it and add it to the agent.What gets built#
A widget with parameters the agent fills in. On the agent it becomes a tool, and its parameters are the tool's arguments. Mindset checks the agent's data against them and refuses the wrong shape with the reason, never quietly changing it. A button in a widget can send an action back to the agent, which starts its next turn.
Every agent can already draw simple charts and tables without one, and the numbers in those come from the model. Build a widget when you want the same layout every time, filled from parameters the agent must get right.
What you decide#
- Its parameters. Each has a name, a type (Text, Number, Yes or no, List or Object) and a description that tells the agent exactly what to supply.
- Which script phases offer it. A phase that lists its resources offers the widget only if it's listed.
Done when#
- It's published, and an active agent version holds it.
- You saw the agent show it on the Chat tab, filled with real data.
- You know which version you'd Re-activate if a change goes wrong.
See it working#
Live demoWidget round trip · Kettle & CoThe agent offers a grind picker in the chat, and your tap changes the coffee page in reply.In your repo#
Each widget is a file in the agent's widgets/ folder, holding the exact input create_resource takes. See Keep your agents in your code.
In the Studio#
Widgets → + New widget opens the Widget Builder. Describe the widget, press Open widget →, and refine it on Preview. Set its parameters on Data, press Save changes, and publish it on Versions. Then add it in the Widgets card on the agent's Resources tab.