The manual workflow in the previous docs (build a Metric Block, build an Explore, attach it to a report) is only half the story. Because Content is enabled alongside AI agents, an agent can do the same work for you: find the right metrics view, query it, define a new one, and build a chart, all from a chat. And an Agent Step inside a report can do it unattended, on a schedule.
There are two ways this plays out, and they answer two different needs.
How agents see your Content
Metric Blocks are workspace-wide, so any agent in the workspace can see and use them. The agent doesn't write SQL from scratch against your tables. It works through the same metric definitions you do, which keeps its answers consistent with everyone else's.
These agent tools are available when the Content permission is on:
| Tool | What it does |
|---|---|
list_metrics_views |
Lists every Metric Block the agent can access, with their measures and dimensions. |
query_metrics |
Pulls numbers from a Metric Block. The agent picks measures, dimensions, filters, a time range, and a grain, and the SQL is generated and run for it. |
save_metrics_view |
Defines a new Metric Block: a model query plus measures, dimensions, an optional time grain, parameters, and thresholds. |
create_explore_block |
Builds a saved Explore: a query against a Metric Block with an inline chart. The chart_type accepts bar, lines, area, scatter, or pie. |
Because measures and dimensions have names, a question like "how many new cars did we sell in March, by make" turns into a single call: pick the new_cars_sold measure, group by car_make, set the time range. The numbers come back the same way every time.
In a chat session
Open a chat with an agent and just ask. A few things you can say:
- "What metrics views do we have?" The agent calls
list_metrics_viewsand shows you what's available, with the measures and dimensions on each. - "Total revenue last 30 days by car make." The agent calls
query_metricsagainst the right Metric Block and gives you the numbers. - "Build a metrics view for the orders table." The agent inspects the table, drafts measures and dimensions, and calls
save_metrics_view. It lands as a draft for you to review. - "Make a bar chart of revenue by month and save it." The agent calls
create_explore_blockand gives you back a saved Explore you can open in Content, tweak, or drop into a report.
Two things worth knowing:
- AI-created Metric Blocks start as drafts. Anything the agent saves with
save_metrics_viewshows up in Content with the yellow "needs review" banner. Review it and click Approve before it's used in production. See the approval workflow for details. - The agent verifies its own work. After creating a Metric Block, a well-configured agent runs
query_metricsagainst it to confirm the measures return sensible numbers before handing it back to you.
On a schedule
The same tools run unattended when you put an Agent Step inside a report. Instead of asking in chat, you write the instruction once, and the report runs it on whatever schedule you set.
This is the difference from a plain Explore attachment:
- An Explore attachment re-runs a fixed query and renders the same chart every time. Great when the question never changes.
- An Agent Step runs an instruction. It can pick the right metrics view, decide the time range, query the numbers, and build or refresh a chart, then write up what it found. Great when the work needs a little judgement each run.
A typical setup:
The Agent Step block has its own page with the full set of options. See Agent Step Block.
When to use which
Related
- Content & Metric Blocks covers building and approving the metrics the agent reads from.
- Building Charts with Explore covers the chart the agent creates with
create_explore_block. - Agent Tools lists the full tool set, including the metrics tools.
- Agent Step Block covers running an agent inside a scheduled report.