Skip to main content

Library for creating agent around BigQuery

Project description

Below is a concise README.md:


bigquery_agent

bigquery_agent creates a Gemini Agents Toolkit-based agent with built-in functions to query a specified BigQuery table.

Requirements

  • Python 3.8+
  • Gemini Agents Toolkit
  • Google Cloud credentials with BigQuery access
  • Vertex AI enabled for your GCP project

Installation

pip install bigquery_agent

Usage

import vertexai
from bigquery_agent import create_bigquery_agent

vertexai.init(project="YOUR_GCP_PROJECT", location="us-west1")

agent = create_bigquery_agent(
    bigquery_project_id="YOUR_BQ_PROJECT",
    dataset_id="YOUR_DATASET",
    table_id="YOUR_TABLE",
    model_name="gemini-2.0-flash-exp",
    system_instruction="Query the todos table as needed."
)

response = agent.send_message("Show me all todos from the database")[0]
print(response)

This agent can inspect the schema (get_schema), run queries (run_query), and get table references (get_table_ref) using the provided BigQuery credentials and Vertex AI model.

For more details on creating and using agents, refer to the Gemini Agents Toolkit README.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bigquery_agent-1.1.0.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bigquery_agent-1.1.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file bigquery_agent-1.1.0.tar.gz.

File metadata

  • Download URL: bigquery_agent-1.1.0.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for bigquery_agent-1.1.0.tar.gz
Algorithm Hash digest
SHA256 909787585dfed79188a24dbbee0c356db4a2b5e101f0929b139cfdee29a9c109
MD5 d988c9bc63776a2b540473c855efcc66
BLAKE2b-256 b466223339cb68f1e9fa1333d03ead478c4698c53e9d7ff051b2295a30927a62

See more details on using hashes here.

File details

Details for the file bigquery_agent-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: bigquery_agent-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for bigquery_agent-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19c72bf208642070eb062889e574f8609dd5e3d26b769792f77f8e2f774f0661
MD5 462a74666f1ffd7242d5b7ce71e21181
BLAKE2b-256 611da9b7ecc31cc1d903f01b6813a7794bb0eab1bcf7610e816ac201523a52ff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page