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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bigquery_agent-1.0.0.tar.gz.
File metadata
- Download URL: bigquery_agent-1.0.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d4e37dc83c464f53bc5c20c4aefe60a2ed1813cc5ee59c205bc24bdc053bf6
|
|
| MD5 |
84a2b5fc6f0f0b077fb9ba1dc1297c61
|
|
| BLAKE2b-256 |
9bd01e97a68e968e61b3d61ca9db293695644d6f8c7164b3e7c8f68a049ccbf7
|
File details
Details for the file bigquery_agent-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bigquery_agent-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
28ad258f00660c0c9087d798d7374ddeea668f748ac75798be01d29e82194541
|
|
| MD5 |
f72c373fda3935a2d36ccff8c17e12b1
|
|
| BLAKE2b-256 |
e91b47726ea9869c42796322841c7efe2293c41ee73d2ef609820439c96c1d4a
|