lwql-charts

Creates saved LangWatchQL analytics charts with Vega-Lite specs and places them on dashboards.

3.5k|362|Updated Sep 9, 2023
One-click install
npx skills add https://github.com/langwatch/langwatch --skill lwql-charts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lwql-charts
Source: https://github.com/langwatch/langwatch/tree/main/skills/_compiled/native/lwql-charts
Command: npx skills add https://github.com/langwatch/langwatch --skill lwql-charts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Turning a plain-language question like "traces per day" or "cost by model this week" into a live, self-updating dashboard chart normally requires knowing the analytics schema, writing correct SQL, and wiring up visualization config by hand. This Skill automates that entire loop against the LangWatch platform.

Core Features & Use Cases

  • Schema Discovery: Lists every queryable dataset, column types, and runnable example queries via langwatch chart schema so SQL is never written against guessed column names.
  • SQL Authoring with Period Parameters: Uses reserved {period_start}, {period_end}, and {period_granularity_seconds} parameters so charts follow the dashboard's period selector instead of hardcoded dates.
  • Save, Test-Run, and Place: Saves charts with a Vega-Lite specification, immediately test-runs them to catch bad column references, and places them on a dashboard with automatic row allocation.
  • Use Case: A product engineer asks "how many traces per day this month?" — the Skill discovers the analytics.traces schema, writes and validates the SQL, saves the chart, verifies it runs, and places it on the team's existing dashboard.

Quick Start

Ask the agent to build a chart showing traces per day from your LangWatch project and place it on your team dashboard.

Frequently Asked Questions about lwql-charts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a dashboard chart from LangWatch trace data?

Run `langwatch chart schema` to discover available datasets and columns, write SQL using the reserved period parameters, then save it with `langwatch chart create` providing a SQL file and a Vega-Lite spec file. Finally place it with `langwatch chart place`.

How do I make a chart follow the dashboard time period selector?

Declare the reserved parameters `{period_start:DateTime}`, `{period_end:DateTime}`, and `{period_granularity_seconds:UInt32}` in your SQL instead of hardcoding dates. The dashboard surface fills these automatically when the chart runs.

Why does my saved chart fail at run time with a column error?

Saving validates SQL against the analytics policy but does not check that every column exists in the schema. Re-run `langwatch chart schema` to verify column names, fix the SQL, and update the chart with `langwatch chart update`.

What does the lwql_not_enabled error mean?

The `lwql_not_enabled` error means LangWatchQL analytics is switched off for the current project, since the feature is enabled per project. The chart commands cannot be used until an administrator enables it.

What granularity values does langwatch chart run accept?

The `--granularity` flag only accepts the offered steps: `1` for seconds, `60` for minutes, and `3600` for hours. Charts declaring reserved period parameters also require explicit `--start` and `--end` flags on every run.