Skip to main content

MABQ BigQuery Agent

MABQ is an AI-powered agent built with Google’s Agent Development Kit (ADK) and Gemini 2.5 Pro that translates natural language questions into SQL queries for BigQuery. Designed for enterprise deployment, it combines powerful AI capabilities with robust security controls.

What is MABQ?

MABQ (short for “Modelo Asistencial BigQuery”) is a conversational AI assistant that allows users to query BigQuery datasets using natural language. Instead of writing SQL, users can ask questions like “Show me the top 10 assets by value” and receive accurate query results. The system consists of:
  • Backend Agent: Built with Google ADK, powered by Gemini 2.5 Pro LLM
  • Frontend Interface: Next.js application with CopilotKit integration
  • Microsoft Teams Integration: Deploy as a Teams app with SSO authentication
  • Enterprise Security: Azure AD authentication and read-only BigQuery access

Key Features

Natural Language to SQL

Convert plain language questions to BigQuery SQL using Gemini 2.5 Pro

Enterprise Security

Azure AD JWT authentication with read-only database controls

Teams Integration

Deploy directly in Microsoft Teams for seamless enterprise adoption

Cloud Native

Serverless architecture on Google Cloud Run with auto-scaling

Architecture Highlights

  • Google ADK Framework: Built on Google’s Agent Development Kit for production-grade agent orchestration
  • Vertex AI Integration: Direct access to Gemini 2.5 Pro through Vertex AI
  • BigQuery Toolset: Specialized tools for schema inspection and query execution
  • Security Guardrails: Prevents data modification with read-only mode enforcement
  • FastAPI Backend: High-performance async API with CORS and authentication middleware
  • CopilotKit Frontend: Modern chat interface with streaming responses

Use Cases

MABQ enables business users, analysts, and developers to:
  • Explore data without SQL knowledge
  • Generate reports through conversational queries
  • Validate datasets with natural language questions
  • Accelerate analytics by reducing time from question to insight

Getting Started

Quickstart

Get MABQ running locally in 5 minutes

Architecture

Understand the system design and components

Agent Development

Learn how to configure and customize the agent

Deployment

Deploy to Google Cloud Run for production

Technology Stack

  • Agent Framework: Google ADK (Agent Development Kit)
  • LLM: Gemini 2.5 Pro via Vertex AI
  • Backend: FastAPI (Python 3.11)
  • Frontend: Next.js 16, React 19, CopilotKit
  • Data Layer: BigQuery
  • Authentication: Azure AD (Microsoft Entra ID)
  • Deployment: Google Cloud Run (containerized)
  • Integration: Microsoft Teams SDK

Next Steps

1

Run the Quickstart

Follow the quickstart guide to run MABQ locally and test natural language queries
2

Explore the Architecture

Review the architecture documentation to understand how components interact
3

Configure Your Agent

Customize the agent’s behavior and BigQuery access in Agent Configuration
4

Deploy to Production

Deploy to Google Cloud Run following the deployment guide

Build docs developers (and LLMs) love