Skip to main content

Ask the Agent about a dashboard

Ask the Agent a question about the data on a dashboard. You choose which widget it looks at, read the steps it took, check the source of its answer and ask a follow-up question.

What you need​

You need the dashboard from Connect a backend and build a dashboard, or any dashboard that has a widget with data. You also need an AI model for the agent to use. If you did not set one in the first lesson, open agent/.env in your clone, set DEFAULT_MODEL to a model in the form <provider>:<model>, and set the key of that provider in the same file. Then recreate the agent's containers, which reads the file again:

docker compose up -d

Your account also has to be allowed to use the model. A new organization has a role named Agent User that grants every model of the agent, and every new user receives it, so an account that you created with the first lesson already qualifies. Choose the models and tools of a role explains how to limit it.

Open the Agent​

The Agent is the panel on the right side of the web app. When the panel is closed, a blue tab on the right edge of the window opens it. The panel names the agent, which is Agent, and lists three hints: click the speech bubble on a widget to add it as context, use the @ button or type @ and a widget's name to pick widgets, and type / to browse the skills and MCP servers that you can use.

Ask a question that needs no data, to see an answer at all. Select the box that says "Ask a question...", type What can you do? and press Enter. The answer appears under the heading Agent. Below it, the panel offers one or more follow-up questions, which you can select instead of typing.

Choose what the Agent looks at​

On a page that is not a dashboard, the panel says that widget context is available on dashboards only. Open your dashboard from the sidebar. The panel now says "Using all widgets available", which means that the Agent may use every widget that you can see, and that it also knows about the widgets of your connections that are not on the dashboard. It finds the one it needs by name and description.

To point the Agent at one widget, select the speech bubble in the widget's header. The bubble lights up, and the widget's name appears as a chip next to the @ button in the panel. The Agent treats a widget that you added this way as the one that your question is about. Select the cross on the chip to remove it again. You can also select the @ button, or type @ in the question box, and pick a widget by name.

Ask about the data​

With the Revenue by region widget added as context, type Which region has the highest revenue? and press Enter. While the Agent works, its steps appear in the panel. The Agent asked for the widget's data, and your browser fetched it from the backend with the widget's current parameters, so the answer reflects the year that is set in the widget's header. When the Agent has finished, it writes the answer and shows the widget as its source.

Your answer's wording depends on the model that you configured, so it will not match any text in this lesson. What stays the same is the structure: the steps that the Agent took, then the answer, then the sources, then the follow-up questions.

Read the steps​

Above the answer, the line Step-by-step reasoning folds the work of the Agent. Select it to see each step in order. You see a line for each thing that the Agent did, such as loading the widget's data, and you can open a step to see its details, which include the tool that ran and the widget with the parameters that it used. A model that reasons in words between its steps shows those sentences here as well. The steps are the progress messages that the agent sends to your browser, as the agent query protocol describes.

Check the source​

Under the answer, a chip carries the name of the widget that the answer came from. Select it. A small panel lists the parameter values that were in effect when the Agent loaded the data, for example year 2024, and a button, Scroll to widget, takes you to the widget on the dashboard and highlights it. Because the values are recorded, you can tell which version of the data an answer describes even after you change the widget.

Ask a follow-up question​

Select a follow-up question under the answer, or type your own. The Agent continues the same chat. It does not read all earlier messages again on every question. It reads the one you ask and what has happened since, and it looks at earlier messages only when your question refers to them, so a long chat does not make each answer slower.

Change the Agent's settings​

Select the gear at the left of the panel's toolbar. The popover lists the settings that the agent offers. Follow-up Suggestions switches the follow-up questions on and off, and Model chooses the model that answers your questions, among the models that your roles allow. The control with the number next to the gear opens the MCP Tools list, where you switch whole MCP servers, or single tools of a server, on and off for your questions, and the number counts the tools that are on. A fresh deployment lists one server, Agent Tools, whose tools give the Agent web search and the ability to read web pages, and, when the deployment names an embedding model, the search of the documents that you attach.

Where to go next​

You asked the Agent a question, chose its data, and traced its answer. To change which models and tools your organization's people may use, read Choose the models and tools of a role. To see what the browser and the agent send each other, read the Agent query protocol.