Conversational Analytics: Data agents in Looker

Data agents let you curate the Conversational Analytics experience for your data. With agents, you can provide Conversational Analytics with context and instructions to enable it to answer questions more effectively for specific use cases. Agents empower analysts to map business terms to specific fields, specify the best fields for filtering, and define custom calculations.

This page guides you through the following processes:

Learn how and when Gemini for Google Cloud uses your data.

Before you begin

Think of a data agent as another type of Looker content — like a dashboard, Look, or folder. The use of a data agent is managed through a combination of content access, data access, and feature access. To perform the tasks that are described on this page, you must be assigned a Looker role that has the required permissions for the models that your data agent will query and, in some cases, access to the agent itself. These requirements are described in the following table.

Task Required Looker permissions Required level of data agent access
Create, edit, share, and delete agents admin_agents No content access is required
Create, edit, share, and delete agents save_agent Manage access; Edit (this access is granted automatically if the user creates the agent; otherwise, access must be granted by the agent's creator by sharing the agent)
Chat with a data agent from the Agents tab in Conversational Analytics chat_with_agent

access_data (on each model that contains the Explores that are used by the data agent)
View
Chat with a Looker Explore from the Explores tab in Conversational Analytics chat_with_explore

access_data (on the model that contains the Explore)
View

Looker also has the following default roles that contain subsets of these permissions for all models on the instance:

  • Conversational Analytics Agent Manager: With this role, a user can create, edit, share, delete, and chat with agents that they have Manage access; Edit access for and chat with Explores
  • Conversational Analytics User: With this role, a user can chat with an agent that they have View access for
  • Admin: By default, this role (Looker Admin) has all permissions and content access across the instance.

A Looker admin can grant these roles and permissions on the Roles page in the Admin section of the Looker instance. For more information about Looker roles, see the Admin settings – Roles documentation page.

The creator of the data agent can manage individual users' access to the agent by sharing the agent.

Create and edit data agents

To create a new data agent, follow these steps:

  1. Navigate to Conversations.
  2. In the Agents tab, select + New agent. Or, in the left panel, select Manage agents, and then select + New agent.
  3. On the New agent page, provide the following information about your data agent.

    • Agent name: Enter a name for the agent. The name should be unique and descriptive.
    • Agent description: Briefly describe what this agent can do and the data that it uses. Users will see this description when they select the agent to start a conversation or when you share the agent with them, so make sure that the description clearly explains the agent's purpose and how it can be helpful.
    • Data: Follow these steps to connect to existing Looker Explores:
      1. In the Data field, click + Select Explores.
      2. In the Search Explores window, click the Explores that you want to include in the data agent. These Explores will appear in the Selected Explores panel of the window.
      3. To add the selected Explore to the data agent, click Save.
  4. Instructions: Provide context to help Conversational Analytics understand how to interact with your data and provide accurate and relevant responses. For examples of the types of context that you can provide, see Writing agent instructions.

  5. Optionally, to enable the Code Interpreter for all conversations with your agent, select Enable Advanced Analytics.

  6. Optionally, you can test your agent to refine your instructions and its settings.

  7. To save your new data agent, click Save.

After you save the data agent, you can share the agent with other users and start a conversation with the agent.

Write agent instructions

When you create a data agent, you can provide the following types of context in the Instructions field:

  • Key fields: The most important fields for analysis
  • Excluded fields: Fields that the data agent should avoid
  • Filtering and grouping: Fields that the agent should use to filter and group data
  • Synonyms: Alternative terms for key fields

Here are some sample instructions to adjust and test with your agent:

  • Unless stated otherwise, always filter the data on Order Items Created Year = 2024
  • We consider "loyal" customers to be those with Order Items Count > 5
  • If someone says anything about "Location," that means User City
  • If the question mentions "Seniors", those are users with User Age > 65
  • If a question is about Revenue, use Total Sales
  • When someone says "by product", unless they specifically say "name", group by product category
  • "Successful" orders means that Order Items status = "Complete"
  • Whenever there is a question of a timeline, or over time, always use Order Item Created Date as the field to group by

Test an agent

When you're creating or editing an agent, the agent details page includes the Preview your agent pane. You can test agent settings and instructions by starting a conversation with the agent.

You must click Update for a change to be reflected in the preview. If the save status is Not saved, any updates to settings won't be reflected in the preview.

Edit an existing data agent

To edit an existing data agent, follow these steps:

  1. In Conversational Analytics, select Manage agents.
  2. On the Manage agents page, select the data agent that you want to edit.
  3. Update the details about the agent as needed. You can modify the details that you specified when you created the agent, including the Agent name, Agent description, Data, and Instructions fields. You can also opt to enable the Code Interpreter for your agent.
  4. To save your changes, click Update.

Start a conversation with an agent

You can start a conversation with a data agent that you created or that another user has shared with you. To start a conversation with an agent, follow these steps:

  1. After navigating to Conversations, choose the agent that you want to chat with in the Agents tab, or select an Explore that you want to ask questions about in the Explores tab. A new conversation begins automatically, or you can create a new conversation at any time by clicking + New conversation.
  2. Type in your question and press return (Mac) or Enter (PC) to start the conversation.

You can return to the conversation from the Recent Conversations section.

Share data agents

Sharing lets other users chat with your agent and its Explores. You can share a data agent with other users by granting content access to the agent. Only a user with the appropriate permissions and content access can share an agent. Once an agent is created, it may take a few minutes for it to become shareable.

To share a data agent, follow these steps:

  1. In Conversations, select Manage agents in the left panel.
  2. Open the menu for the chosen agent by clicking its More options icon, and then click Share.
  3. Once you have added an individual or groups to the Who can access this agent section, and chosen what level of permissions they should have, click Add to place them in the shared list.
  4. If you want new users or groups to receive a notification email, select the Email the people you have just added checkbox.
  5. After all changes have been made, click Save.

You can also share an agent that you've just created or one that you're editing by clicking Share on the agent settings page and following the aforementioned steps.

Revoke access to a data agent

To revoke access to an agent, follow these steps:

  1. In Conversations, click Manage agents in the left panel.
  2. Open the menu for the chosen agent by clicking its More options icon, and then click Share.
  3. Click the X next to the user or groups that should have their access removed.
  4. After all changes have been made, click Save.

If the removed users have an ongoing conversation, they will still have access for a minute or two while the changes propagate.

If a user tries to ask more questions once access to an agent is removed, then that user will see the message The agent in this conversation may not be shared with you, or may have been deleted. You can view any past conversations with the agent, but can't ask new questions.

Delete a data agent

To delete a data agent, follow these steps:

  1. In Conversations, click Manage agents in the left panel.
  2. Open the menu for the chosen agent by clicking its More options icon, and then click Delete.
  3. In the Delete agent? window, click Move to trash to delete the data agent.

Agents that are moved to the trash will be permanently deleted after 30 days. You can permanently delete a data agent manually, or you can restore a data agent from the trash before it is permanently deleted. If you take no action, the agent will be deleted permanently after 30 days automatically.

Permanently delete a data agent

To permanently delete a data agent, follow these steps:

  1. Navigate to Conversations.
  2. In the left navigation panel, expand the Trash section.
  3. To open the menu for the chosen agent, select its icon, and then click Delete Permanently.
  4. In the Are you sure? window, click Delete forever.

Restore a data agent from the trash

To restore a data agent from the trash, follow these steps:

  1. Navigate to Conversations.
  2. In the left navigation panel, expand the Trash section.
  3. To open the menu for the chosen agent, select its icon, and then click Restore.