Charts & interaction
Answer with more than text: interactive charts, forms the person fills in, and a direct question when the agent is stuck.
| Tool | What it does |
|---|---|
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. |
render_ui | Shows a small form or choice โ fields, pickers, dates, file uploads โ and pauses the run until the person answers. |
ask_user | Asks 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.
- JSON only: no functions, no map/geo or custom series, no remote images.
- Data a tool registered (market prices, forecasts, travel offers) is referenced as
{"ref": "<name>"}, never retyped. - The same
chart_idwithmergeupdates an earlier chart. See Charts in chat.
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
title | string | yes | Short chart title. |
option | object | yes | The ECharts option object (series, xAxis, yAxis, tooltip, โฆ). |
chart_id | string | Stable id for this chart, e.g. 'aapl-1y'. Reuse to update. | |
merge | boolean | Merge `option` into the earlier chart with this chart_id. | |
height | integer | Pixel height, 200โ900 (default 360). | |
description | string | One-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).
- Components must come from the trusted catalog; anything else is refused before it is shown.
- See Interactive surfaces (A2UI).
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
components | array of object | yes | A2UI component objects: {id, component, ...properties}. |
root | string | yes | id of the top-level component. |
data_model | object | Initial values keyed by binding path, e.g. {"email": ""}. | |
prompt | string | One 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.
- For a choice or several fields,
render_uiis the better tool.
Arguments
| Argument | Type | Required | Meaning |
|---|---|---|---|
question | string | yes |