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-1.5-flash-002",
    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-0.0.3.tar.gz (3.5 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-0.0.3-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bigquery_agent-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7e56af7d7593dad1ef03a81079941370da6dd9e2ce4479dcb1c018c0404f7499
MD5 a1bc0c1916ec02e111f38530de57728d
BLAKE2b-256 de6b86a25a4c1e83a9fd9a8d88a74bd3c43710a2cb3370eda6859c023abcdbe1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bigquery_agent-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b15193c0c19b5553a3df902d9cf97af64aeebefc2f091ba84caadc0fe188626d
MD5 7ec0c08509cc1595a932dff25a2566cb
BLAKE2b-256 eb219b9723f3839de50fd96fb178af39609de986947797f7053d09b33ebaf8ff

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