Demos / Dashboard copilot · Northwind Analytics
Ask your data
Ask a question and the dashboard changes: charts, tables and filters driven by the agent.
Northwind Analytics is a fictional outdoor retailer's sales dashboard. You ask the copilot a question, and the answer lands on the dashboard as a chart, a table or a headline figure. The chat stays short because the page does the showing.
The agent is configuration
The copilot is a Mindset agent called ask-your-data, and nothing about it is code. It has a model (Claude Haiku 4.5), five prompt fields, and two granted functions. The prompt fields say what it's for, how it talks, what the data holds, which tools it has, and the rules it keeps: every number comes from a function result, it says plainly that the data is fictional, and it stays on the dashboard's data. You can read all of it in demos/ask-your-data/.
Two functions, no database
The data is 240 rows: twelve months of 2026, four regions, five categories, with orders, revenue, returns and the reason for each return. It lives as a literal inside each function, and every step after it is pure, so a call reaches nothing outside and costs no model call.
ask-your-data-query-salesfilters by month range, region and category, groups by month, region, category or return reason, and totals the metric you asked for. Each group comes back with alabeland avalue, ready to chart.ask-your-data-growthcompares revenue in the first and last quarter, per category or region, fastest first.
They are functions rather than a connection because the data is fixed and the work is grouping and arithmetic, which is exactly what the function language does. In your product, the first step would read your warehouse through a connection and the rest would stay the same.
The page draws the agent's output
The copilot has no widgets of its own. Every agent can call three built-in display tools: render_chart, show_table and show_ui. On the UI-less client each one arrives as a widget-payload event carrying a small widget tree. This page reads the chart's points, the table's rows or the stat's figure out of that tree and draws the latest one in the dashboard's main panel with its own charts, so an agent answer looks like part of the product. Before the first answer, that panel shows revenue by month. The chat only notes that something landed on the dashboard.
Page tools and situational awareness
The page registers three page tools. set_date_range takes two months, set_dashboard_filter takes a region, a category or both, and pin_insight pins the latest chart, table or figure. A pinned insight gets a chip under the main panel, so you can bring it back after the agent shows something newer. Each one checks the model's arguments before it changes anything, and answers in a sentence the agent can repeat. With every turn the page also sends situational awareness: the date range, the filters, and the three KPIs on screen. Filters show as small pills only when one is set, and removing a pill clears that filter. That's how the copilot answers "what am I looking at?" without a function call.
Under the hood
The pane under the demo lists each step of a turn as it happens: the function calls with their arguments and results, the built-in chart and table calls, and the page tool calls with what they returned. Ask why returns spiked in March and you'll see the agent narrow it down from months to regions to categories to reasons.
Build the same thing
- Write the functions. See Build a function.
- Create the agent, grant the functions, and open it to the embed surface. See How embedding works.
- On your page, use the UI-less client, register your page tools, and handle
widget-payloadevents as the events reference describes. - Pin behavior tests for the questions that matter. See Test an agent's behavior.