Crypto.com AI Agent SDK BigQuery Integration
This example provides a BigQuery integration for the Crypto.com AI Agent Client, enabling natural language queries against blockchain data stored in Google Cloud BigQuery. The integration allows users to query blockchain information using conversational language, which is then converted to SQL and executed against BigQuery datasets.
Features
Natural Language Queries: Convert plain English questions into SQL queries
Multi-Chain Support: Query data from multiple blockchain networks (Cronos zkEVM, Cronos EVM)
Automated Schema Management: Automatically download and cache table schemas
Cost Controls: Built-in query limits and timeouts to manage BigQuery costs
Comprehensive Blockchain Tools: Specialized tools for querying blocks, transactions, and addresses
Real-time Results: Get instant answers to blockchain data questions
Requirements
Python 3.12+
Google Cloud Project with BigQuery enabled
API Keys of AI provider, refer to the Dynamic AI Model Manager to see which providers are supported by the AI Agent SDK.
Crypto.com Developer Platform API key, click here to learn how to obtain your Crypto.com Developer Platform API key.
Google Cloud credentials configured, click here to learn how to install gcloud CLI
Supported Datasets
This integration supports multiple blockchain datasets:
Cronos zkEVM Mainnet:
cronos_zkevm_mainnetClick here to subscribe it
Cronos EVM Mainnet:
public_preview___blockchain_analytics_cronos_mainnetClick here to subscribe it
Installation
1. Clone the repository
2. Install dependencies:
3. Set up environment variables:
Create a .env file in the project root:
4. Configure Google Cloud credentials:
Usage
Basic Usage
Run the main script:
The script will:
Initialize the BigQuery connection
Download and cache table schemas
Start an interactive session for natural language queries
Example Queries
Examples of natural language questions you can ask about blockchain data:
Last updated
Was this helpful?