Tools

Charts & interaction

Answer with more than text: interactive charts, forms the person fills in, and a direct question when the agent is stuck.

ToolWhat it does
render_chartDraws an interactive chart in the chat from an Apache ECharts option โ€” line, bar, pie, scatter, candlestick, heatmap, sankey, gauge and more, with tooltips, legends and zoom.
render_uiShows a small form or choice โ€” fields, pickers, dates, file uploads โ€” and pauses the run until the person answers.
ask_userAsks the person one clarifying question and waits; the reply becomes the tool's result and the run continues.

render_chart

Draws an interactive chart in the chat from an Apache ECharts option โ€” line, bar, pie, scatter, candlestick, heatmap, sankey, gauge and more, with tooltips, legends and zoom.

How an agent gets it. Added automatically for any run answering into a web conversation, including a delegated child. Not offered to a canvas: single agent, which puts charts in its document instead.

Arguments

ArgumentTypeRequiredMeaning
titlestringyesShort chart title.
optionobjectyesThe ECharts option object (series, xAxis, yAxis, tooltip, โ€ฆ).
chart_idstringStable id for this chart, e.g. 'aapl-1y'. Reuse to update.
mergebooleanMerge `option` into the earlier chart with this chart_id.
heightintegerPixel height, 200โ€“900 (default 360).
descriptionstringOne-line plain-text summary for screen readers and clients that cannot draw the chart.

render_ui

Shows a small form or choice โ€” fields, pickers, dates, file uploads โ€” and pauses the run until the person answers. The answers come back as data.

How an agent gets it. Added automatically when a person is watching in a client that can draw it โ€” web conversations (not Slack, Teams or automations).

Arguments

ArgumentTypeRequiredMeaning
componentsarray of objectyesA2UI component objects: {id, component, ...properties}.
rootstringyesid of the top-level component.
data_modelobjectInitial values keyed by binding path, e.g. {"email": ""}.
promptstringOne line shown above the surface saying what is being asked.

ask_user

Asks the person one clarifying question and waits; the reply becomes the tool's result and the run continues.

How an agent gets it. Added automatically on chat runs where a person can answer.

Arguments

ArgumentTypeRequiredMeaning
questionstringyes