Skip to content

Commit ea7e28e

Browse files
google-genai-botcopybara-github
authored andcommitted
refactor: Rename the Google API based bigquery sample agent
This change renames the sample agent based on the Google API based tools to reflect the larger purpose and avoid confusion with the built-in BigQuery tools. In addition, it also renames the root agent in the BigQuery sample agent to "bigquery_agent" PiperOrigin-RevId: 775655226
1 parent 8ace43f commit ea7e28e

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

contributing/samples/bigquery/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
# debug CLI
6161
root_agent = llm_agent.Agent(
6262
model="gemini-2.0-flash",
63-
name="hello_agent",
63+
name="bigquery_agent",
6464
description=(
6565
"Agent to answer questions about BigQuery data and models and execute"
6666
" SQL queries."

contributing/samples/bigquery_agent/README.md renamed to contributing/samples/google_api/README.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,40 @@
1-
# BigQuery Sample
1+
# Google API Tools Sample
22

33
## Introduction
44

5-
This sample tests and demos the BigQuery support in ADK via two tools:
5+
This sample tests and demos Google API tools available in the
6+
`google.adk.tools.google_api_tool` module. We pick the following BigQuery API
7+
tools for this sample agent:
68

7-
* 1. bigquery_datasets_list:
9+
1. `bigquery_datasets_list`: List user's datasets.
810

9-
List user's datasets.
11+
2. `bigquery_datasets_get`: Get a dataset's details.
1012

11-
* 2. bigquery_datasets_get:
12-
Get a dataset's details.
13+
3. `bigquery_datasets_insert`: Create a new dataset.
1314

14-
* 3. bigquery_datasets_insert:
15-
Create a new dataset.
15+
4. `bigquery_tables_list`: List all tables in a dataset.
1616

17-
* 4. bigquery_tables_list:
18-
List all tables in a dataset.
17+
5. `bigquery_tables_get`: Get a table's details.
1918

20-
* 5. bigquery_tables_get:
21-
Get a table's details.
22-
23-
* 6. bigquery_tables_insert:
24-
Insert a new table into a dataset.
19+
6. `bigquery_tables_insert`: Insert a new table into a dataset.
2520

2621
## How to use
2722

28-
* 1. Follow https://developers.google.com/identity/protocols/oauth2#1.-obtain-oauth-2.0-credentials-from-the-dynamic_data.setvar.console_name. to get your client id and client secret.
23+
1. Follow https://developers.google.com/identity/protocols/oauth2#1.-obtain-oauth-2.0-credentials-from-the-dynamic_data.setvar.console_name. to get your client id and client secret.
2924
Be sure to choose "web" as your client type.
3025

31-
* 2. Configure your `.env` file to add two variables:
26+
2. Configure your `.env` file to add two variables:
3227

3328
* OAUTH_CLIENT_ID={your client id}
3429
* OAUTH_CLIENT_SECRET={your client secret}
3530

3631
Note: don't create a separate `.env` file , instead put it to the same `.env` file that stores your Vertex AI or Dev ML credentials
3732

38-
* 3. Follow https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred to add http://localhost/dev-ui/ to "Authorized redirect URIs".
33+
3. Follow https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred to add http://localhost/dev-ui/ to "Authorized redirect URIs".
3934

4035
Note: localhost here is just a hostname that you use to access the dev ui, replace it with the actual hostname you use to access the dev ui.
4136

42-
* 4. For 1st run, allow popup for localhost in Chrome.
37+
4. For 1st run, allow popup for localhost in Chrome.
4338

4439
## Sample prompt
4540

contributing/samples/bigquery_agent/agent.py renamed to contributing/samples/google_api/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040

4141
root_agent = Agent(
4242
model="gemini-2.0-flash",
43-
name="bigquery_agent",
43+
name="google_api_bigquery_agent",
4444
instruction="""
4545
You are a helpful Google BigQuery agent that help to manage users' data on Google BigQuery.
4646
Use the provided tools to conduct various operations on users' data in Google BigQuery.

0 commit comments

Comments
 (0)