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 Multi-View Architecture to ensure blazing-fast query performance and low BigQuery costs.
Rather than parsing JSON on the fly, this block natively maps to the flattened, event-specific SQL views generated by the Agent Development Kit (ADK). The central agent_events explore acts as the primary traffic hub, joining specialized views (like v_llm_response and v_tool_completed) via OpenTelemetry distributed trace IDs (invocation_id, trace_id, span_id).
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 total of 8 analytical dashboards designed to monitor every aspect of your agent's lifecycle:
- Token Consumption: Tracks the aggregate volume of prompt and completion tokens burned over time, and highlights the specific users and agents driving the highest costs.
- Agent Engagement: Monitors the total volume of unique, end-to-end user journeys (traces) to provide a clear view of overall system traffic and power-user activity.
- Tool Performance: Analyzes backend function calling by tracking the daily execution volume of specific tools, identifying the most frequently used tools, and mapping tool usage to specific agents.
- 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 by session volume.
- System Performance & 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.
- Reliability & 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 error payloads.
- Session Deep Dive: Analyzes macro engagement trends by tracking overall session volume and ranks the top agents hosting the highest number of active user conversations.
- BigQuery Configuration: Data must be flowing into BigQuery via the BigQuery Agent Analytics ADK plugin (v1.27.0+ recommended).
- CRITICAL - Enable ADK Views: The ADK plugin MUST be configured with
create_views=True. This Looker Block relies entirely on the auto-generated event views (e.g.,v_llm_response,v_tool_completed) to function. - Looker Connection: A Looker database connection configured to access the BigQuery dataset containing your agent data.
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 and views reside (e.g.,agent_analytic).TABLE_NAME: The base table name configured in the ADK plugin (default:agent_events).VIEW_PREFIX: The prefix for the auto-generated ADK views (default:v).- (Note: The
VIZ_*constants do not need to be modified unless you wish to change the default styling of the visual drill popups).