Usage
agent: agent_name { advanced_analytics: yes | no description: "string" instructions: "string" is_dashboard_agent: yes | no show_debuginfo: yes | no show_thinking: yes | no }
|
Hierarchy
Model file or LookML file
agent |
Default value
None
Accepts
|
Definition
The agent parameter declares a data agent in LookML. With dashboard agents,
developers can define custom agent instructions, analytical behavior, and
display preferences in version-controlled LookML and associate the agent with
LookML dashboards using the
default_dashboard_agent
or dashboard_agents
parameters.
For detailed information on configuring and using LookML dashboard agents, see the Create and manage LookML dashboard data agents documentation page.
Subparameters
Dashboard agent definitions support the following subparameters:
advanced_analytics
The advanced_analytics subparameter controls whether the agent can use
Advanced Analytics
to generate and run Python code for complex computations and custom
visualizations.
Accepts yes or no. The default value is no.
description
The description subparameter provides an optional text description of the
agent's purpose.
agent: sales_agent {
description: "Executive sales overview dashboard agent"
is_dashboard_agent: yes
}
instructions
The instructions subparameter accepts a free-form string that provides the
agent with business context, preferred fields, filtering rules, or tone of
voice when processing conversational questions.
agent: sales_agent {
instructions: "Focus on net revenue and filter by current quarter by default."
is_dashboard_agent: yes
}
You can reference LookML constants
within instructions by using @{<var>CONSTANT_NAME</var>} syntax:
agent: sales_agent {
instructions: "Focus on net revenue. @{FISCAL_YEAR_RULE}"
is_dashboard_agent: yes
}
If omitted, the agent operates without custom instruction context.
is_dashboard_agent
The is_dashboard_agent subparameter specifies whether the agent is configured
as a dashboard agent.
Accepts yes or no. To use the agent with a LookML dashboard, set this
parameter to yes.
show_debuginfo
The show_debuginfo subparameter determines whether the agent displays
execution logs and diagnostic information in conversation responses.
Accepts yes or no. The default value is no.
show_thinking
The show_thinking subparameter determines whether the agent displays its
reasoning steps and intermediate query planning in conversation responses.
Accepts yes or no. The default value is no.
Examples
Defining a LookML dashboard agent
The following example defines a LookML dashboard agent with custom instructions, Advanced Analytics enabled, and thinking visibility turned on:
agent: customer_insights_agent {
instructions: "Address the user politely. Prioritize active subscriber metrics and churn analysis."
description: "Dashboard agent for Customer Insights dashboard."
is_dashboard_agent: yes
advanced_analytics: yes
show_thinking: yes
show_debuginfo: no
}
To use this agent on a LookML dashboard, map it in the .dashboard.lookml file:
- dashboard: customer_insights
title: "Customer Insights"
layout: newspaper
enable_dashboard_agent: true
default_dashboard_agent: customer_insights_agent
dashboard_agents: [customer_insights_agent]
elements:
- name: active_subscribers
type: single_value
model: subscriptions
explore: customers
measures: [customers.count]