GCP BigQuery
Run SQL queries, list datasets and tables, and inspect schemas in Google BigQuery
The GCP BigQuery integration lets your agents run GoogleSQL queries, retrieve results from existing jobs, enumerate datasets and tables, and inspect table schemas — against a specific Google Cloud project.
Prerequisites
- A Google Cloud project with the BigQuery API enabled.
- A Project ID from the Google Cloud Console.
- Credentials. Either:
- A service account key (JSON) for the project — create it under IAM & Admin → Service Accounts → Keys. Grant the account
BigQuery Data Viewer(read) andBigQuery Job User(run queries) at minimum. - Or a Google OAuth user sign-in if your agent should query under a specific user's identity.
- A service account key (JSON) for the project — create it under IAM & Admin → Service Accounts → Keys. Grant the account
For sensitive datasets, consider creating a scoped service account that only sees the projects/datasets the agent should reach.
Setup
- Open your agent in Agent Studio.
- In the Integrations panel, click Add Integration Config.
- Select GCP BigQuery from the integration list.
- Give the config a display name (e.g., "BigQuery — Analytics warehouse").
- Enter the Project ID, then either paste the service account key JSON or click Connect with Google for OAuth.
- Save the agent revision.
Using in Your Agent
- In an Agent Step, attach BigQuery tools from the tools panel.
- Tools are referenced as
gcp_bigquery.run_query,gcp_bigquery.list_tables, etc.
run_query may return results inline for fast queries or a job reference for longer-running ones. Use get_query_results to paginate or wait on those job IDs.
Available Tools
Queries
| Tool | Description | Action Type |
|---|---|---|
run_query | Execute a GoogleSQL query, returning results or a job reference if async | ReadOnly |
get_query_results | Fetch results from a completed or running job, or paginate large result sets | ReadOnly |
Datasets
| Tool | Description | Action Type |
|---|---|---|
list_datasets | List all datasets in the project with IDs, names, and locations | ReadOnly |
Tables
| Tool | Description | Action Type |
|---|---|---|
list_tables | List all tables in a dataset with IDs, types, and creation times | ReadOnly |
get_table | Get table metadata: schema, columns, types, row count, partitioning config | ReadOnly |