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

Supported Datasets

This integration supports multiple blockchain datasets:

  • Cronos zkEVM Mainnet: cronos_zkevm_mainnet

    • Click here to subscribe it

  • Cronos EVM Mainnet: public_preview___blockchain_analytics_cronos_mainnet

    • Click 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:

  1. Initialize the BigQuery connection

  2. Download and cache table schemas

  3. 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?