Skip to content

Commit 767b754

Browse files
committed
fix(dashboard-agent): the runs time column is triggered_at — correct the prompt's example
1 parent 4e392c3 commit 767b754

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

internal-packages/dashboard-agent/src/tool-schemas.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const getQuerySchemaSchema = tool({
141141

142142
export const runQuerySchema = tool({
143143
description:
144-
"Run a read-only TRQL query against the current environment's analytics data and return the result rows. TRQL is a SQL-style language over ClickHouse: bucket time with toStartOfHour/toStartOfDay on the table's time column for time series, and use countIf/sumIf to produce one numeric column per series. Always call get_query_schema first — column names are snake_case (created_at, completed_at, task_identifier); camelCase columns do not exist. Results are capped, so keep queries aggregated. To chart the result, follow with a render_view chart block.",
144+
"Run a read-only TRQL query against the current environment's analytics data and return the result rows. TRQL is a SQL-style language over ClickHouse: bucket time with toStartOfHour/toStartOfDay on the table's time column for time series, and use countIf/sumIf to produce one numeric column per series. Always call get_query_schema first — column names are snake_case and the runs time column is triggered_at (not created_at); camelCase columns do not exist. Results are capped, so keep queries aggregated. To chart the result, follow with a render_view chart block.",
145145
inputSchema: z.object({
146146
query: z
147147
.string()
@@ -637,7 +637,7 @@ Investigations:
637637
638638
Answering with data and charts:
639639
- For questions about metrics, trends, counts, rates, costs, or "over time" / "by task" style aggregations, query the analytics data. First call get_query_schema (no table to list the tables, then a table name for its columns), then write a TRQL query. TRQL is SQL-style over ClickHouse: bucket time with toStartOfHour/toStartOfDay on the table's time column, produce one numeric column per series with countIf/sumIf, always include a time filter, and keep the result aggregated to a few dozen points.
640-
- To chart the answer, call render_view with a "chart" block containing the TRQL query itself plus chartType (line for trends over time, bar for categories), xAxisColumn, yAxisColumns, and groupByColumn when you split a single value column into series. The panel runs the query and renders it, so you don't have to run_query first just to chart — but the panel runs it AFTER your turn, so a broken query becomes a broken chart you never see. Column names are snake_case (created_at, completed_at, task_identifier); when unsure of a column, check get_query_schema before charting.
640+
- To chart the answer, call render_view with a "chart" block containing the TRQL query itself plus chartType (line for trends over time, bar for categories), xAxisColumn, yAxisColumns, and groupByColumn when you split a single value column into series. The panel runs the query and renders it, so you don't have to run_query first just to chart — but the panel runs it AFTER your turn, so a broken query becomes a broken chart you never see. Column names are snake_case and the runs time column is triggered_at (not created_at); when unsure of a column, check get_query_schema before charting.
641641
- Use run_query when you want to state specific numbers in prose, or to sanity-check a query before charting. If it returns an error, read the message and fix the query.
642642
- A chart never answers alone. A superlative or ranking question — "which tasks fail most", "what's slowest", "which queue is busiest" — is answered IN PROSE, naming the winner and its number ("send-order-receipt — 3 of the 4 failures"); the chart illustrates that answer, it is not the answer. Run the query with run_query when you need the number to say it.
643643
- On a ranking or failures chart, give the top item buttons through the chart block's "actions": an ask action phrasing the user's own follow-up ("Investigate the send-order-receipt failures — why are they failing?"), plus a navigate action to the page that shows it (its filtered runs list, its error, its queue) when you hold a canonical trigger:// target for it. Two or three, never more.

0 commit comments

Comments
 (0)