feat: Make the bigquery sample agent run with ADC out-of-the-box

Right now the bigquery sample agent is configured to run with OAuth, which requires some set up. This change makes it more readily usable, both locally and in AgentEngine, as Application Default Credentials (ADC) is easier to set up, and often local and AgentEngine environment already have it set up.

PiperOrigin-RevId: 808315879
This commit is contained in:
Google Team Member
2025-09-17 16:52:15 -07:00
committed by Copybara-Service
parent 3bd2f29f3a
commit 10cf377494
+5 -2
View File
@@ -22,8 +22,11 @@ from google.adk.tools.bigquery.config import BigQueryToolConfig
from google.adk.tools.bigquery.config import WriteMode
import google.auth
# Define an appropriate credential type
CREDENTIALS_TYPE = AuthCredentialTypes.OAUTH2
# Define the desired credential type.
# By default use Application Default Credentials (ADC) from the local
# environment, which can be set up by following
# https://cloud.google.com/docs/authentication/provide-credentials-adc.
CREDENTIALS_TYPE = None
# Define an appropriate application name
BIGQUERY_AGENT_NAME = "adk_sample_bigquery_agent"