This Looker Block provides a turn-key, highly performant analytics solution for monitoring, debugging, and optimizing generative AI agents. Designed to work seamlessly with the BigQuery Agent Analytics solution, this block surfaces deep insights into agent interactions, tool usage, LLM performance, and cost footprints.
This block utilizes a Native Derived Table Architecture to provide a seamless installation experience.
Looker handles the complex data parsing natively. The LookML contains highly optimized Native Derived Tables (e.g., v_llm_response, v_tool_error) that execute strict JSON_VALUE and JSON_QUERY extractions against the raw BigQuery agent_events table on the fly.
These derived tables are joined back to the primary agent_events Explore. To ensure mathematical accuracy, the semantic layer enforces strict 1:1 LEFT JOIN operations using exact OpenTelemetry composite keys (trace_id AND span_id AND event_type).
To support advanced, rolling-window Scorecard trends (e.g., "Last 14 Days" vs "Previous 14 Days"), this block bypasses Looker's rigid native period_over_period type. Instead, it implements a highly flexible Liquid Templated Filter engine (commonly known as "Method 2" in the Looker developer community).
This engine dynamically calculates the DATEDIFF of the user's selected filter and automatically offsets the SQL timestamps in the background, preventing expensive CROSS JOIN fan-outs while maintaining strict accuracy.
This block moves beyond standard Looker data tables by implementing a robust, context-aware visual drilling engine.
- Global Manifest Constants: Visualization JSON payloads (e.g., Donut Charts, Scatter Plots, Stacked Area Charts) are defined globally in
manifest.lkmlto keep view files clean and DRY. - Dynamic
linkParameters: Core measures (liketotal_eventsortotal_tool_errors) utilize Looker'slinkparameter combined with the expanded Share URL pattern. - Contextual Insight: Clicking a data point on a dashboard will automatically inherit the dashboard filters and open a beautifully formatted visual popup (e.g., clicking an Agent spike opens a Bar Chart showing which exact tools that Agent was using on that specific day).
This block includes two comprehensive reporting suites containing a suite of interconnected dashboards to monitor every aspect of your agent's lifecycle:
This suite focuses on business metrics, user engagement, and cost tracking.
- Token Consumption: Tracks the aggregate volume of prompt and completion tokens burned over time, highlighting the specific users and agents driving the highest costs.
- Agent & Sessions: Monitors the total volume of end-to-end user journeys and active conversational sessions, providing a clear view of overall system traffic and session complexity.
- Tool Usage: Analyzes backend function calling by tracking the daily execution volume of specific tools, identifying the most frequently used functions.
- LLM Interactions: Provides deep visibility into the absolute number of requests sent to the underlying LLM models, hunting for outliers via granular scatter plots.
- User Analytics: Measures platform adoption and retention by tracking active unique users over time, determining user agent preferences, and ranking power-users.
This highly technical suite focuses purely on engineering metrics, speed, and backend reliability.
- Latency: Visualizes P50, P75, P90, and P99 latency distributions for both LLM responses and Tool executions, tracking historical performance to identify backend degradation or API throttling.
- Errors: Tracks the daily volume of tool failures, highlights the most unstable agents and backend tools, and provides a "Root Cause Inspector" drill path for immediate debugging of raw JSON error payloads.
- BigQuery Configuration: Data must be flowing into BigQuery via the BigQuery Agent Analytics ADK plugin.
- Looker Connection: A Looker database connection configured to access the BigQuery dataset containing your
agent_eventstable.
This block uses Looker Manifest Constants to make installation entirely seamless.
When installing this block via the Looker UI (Marketplace or Git Import), you will be prompted to enter your specific environment details. The Looker installation window will automatically inject these into the block's configuration:
CONNECTION_NAME: The exact name of your Looker database connection to BigQuery.PROJECT_ID: The Google Cloud Project ID where your dataset resides.DATASET_NAME: The BigQuery Dataset name where youragent_eventstable resides (e.g.,agent_analytic).TABLE_NAME: The base table name configured in the ADK plugin (default:agent_events).- (Note: The
VIZ_*constants do not need to be modified unless you wish to change the default styling of the visual drill popups).