Skip to main content
The @guildai-services/guildai~bigquery package gives your agents access to Google BigQuery datasets and tables through Guild’s BigQuery integration.

Authentication

  • Type: OAuth 2.0 or service account
  • Token management: Refreshed automatically

Setup

1

Open Credentials

Go to Credentials in Guild.
2

Connect BigQuery

Click BigQuery and authorize with a Google account that has BigQuery Data Viewer and Job User roles.

Usage

import { bigqueryTools } from "@guildai-services/guildai~bigquery"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that queries BigQuery datasets",
  tools: { ...bigqueryTools },
})

Selecting specific tools

Tools are named with the bigquery_ prefix. Use pick() to include only what your agent needs.
import { bigqueryTools } from "@guildai-services/guildai~bigquery"
import { llmAgent, pick } from "@guildai/agents-sdk"

export default llmAgent({
  description: "An agent that runs analytical queries",
  tools: {
    ...pick(bigqueryTools, [
      "bigquery_jobs_query",
      "bigquery_jobs_get_query_results",
      "bigquery_datasets_list",
      "bigquery_tables_list",
    ]),
  },
})