Skip to content

Looker ai agent #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jul 22, 2025
Merged

Looker ai agent #235

merged 15 commits into from
Jul 22, 2025

Conversation

ferraricharles
Copy link
Collaborator

@ferraricharles ferraricharles commented Jun 30, 2025

The idea here is to have a way to implement the basic agent in dialogflow capable to offer an interface using the new capabilities of the Conversational Analytics API for Looker.

I've improved the way we instantiate the cloud build given that it now uses the Compute Engine service account in some cases, which would require us to grant broad IAM permissions to the compute SA, which wouldn't be safe at all, so I decided to create a new service account instead and use that for the cloudbuilds.

I've still used the compute engine service account for cloud run, giving it access to conversational analytics API and some other required AI features.

The cloudbuild instantiates a new cloudbuild using a DockerFile which will then create the container to be used by cloud run, proceeding finally with the infrastructure creation. This step was necessary to ensure we can get latest container.

The Python code is then responsible to communicate with the Looker Conversational Analytics API (currently in private preview), extract the textual response and assemble a link to the corresponding explore in Looker (to allow users to keep exploring).

The pieces required to be performed by the user are:
1 - Setup a Secret named with the following attributes:
{
"LOOKER_CLIENT_ID": "YOUR_LOOKER_CLIENT_ID",
"LOOKER_CLIENT_SECRET": "YOUR_LOOKER_CLIENT_SECRET",
"LOOKER_INSTANCE": "YOUR_LOOKER_INSTANCE_URL",
"LOOKML_MODEL": "your_lookml_model_name",
"LOOKML_EXPLORE": "your_explore_name"
}

2 - Enter the created agent and build their own Playbook as well as indicate to the agent that conversations should be started by that playbook. Currently playbooks can't be terraformed but this allows users to craft their own instructions to the agent and chose the LLM to be used (and potentially create and connect multiple tools).

Architecture:

image

Working Agent:
image

Connected to Slack:
image

Using Conversational Manager:
image

@ferraricharles ferraricharles marked this pull request as ready for review June 30, 2025 20:54
@ferraricharles ferraricharles marked this pull request as draft June 30, 2025 21:16
@ferraricharles
Copy link
Collaborator Author

Putting this back in draft to perform this migration in the code: https://cloud.google.com/gemini/docs/conversational-analytics-api/migration-guide

@ferraricharles ferraricharles marked this pull request as ready for review July 1, 2025 11:57
Copy link
Collaborator

@fellipeamedeiros fellipeamedeiros left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fellipeamedeiros fellipeamedeiros merged commit 3a393f6 into main Jul 22, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants