AIFoundryGenie is a Python-based framework designed to facilitate the creation, management, and execution of AI agents that are connected to a Databricks Genie Space.
User Input → Script → Azure AI Agent → Databricks Genie → Database Query → Results → Formatted Response → User
Before using AIFoundryGenie, ensure you have:
- Python 3.8+ installed on your system
- Azure CLI installed on your system.
- Databricks workspace with access to Genie Spaces.
For more information check out Set up and manage an AI/BI Genie space - An Azure AI Foundry Project created.
For more information check out Create a project for Azure AI Foundry. - A Databricks Connected Resource created in the AI Foundry Project.
For more information check out How to add a new connection in Azure AI Foundry portal - Required Python packages (see
src/requirements.txt)
- Access to a Databricks workspace
- Genie Space configured with appropriate data sources
- Proper permissions to query data through Genie
This repository includes:
sample_agent_adb_genie.py- A sample AI agent that:- Connects to Databricks Genie through Azure AI Foundry
- Creates an AI agent with access to Genie's data query capabilities
- Implements a function tool (
ask_genie) to query Databricks Genie spaces - Demonstrates end-to-end conversation flow with data-driven responses
- Shows how to authenticate and establish connections between Azure AI Foundry and Databricks
ask_agent.py- A command-line interface tool that:- Provides interactive chat with an existing Azure AI Foundry agent
- Supports both single-question mode and continuous conversation mode
- Automatically sets up Databricks Genie integration for data queries
- Handles authentication and connection management transparently
- Enables terminal-based agent interactions for testing and development
I recommend cloning this repo locally and then using Visual Studio Code with the Azure AI Foundry extension installed for the best development experience.
Here is some sample code to clone locally.
git clone https://github.com/jcbendernh/AIFoundryGenie.git C:\VSCode\AIFoundryGenie
This repo based off of the Python scripts for Azure-Samples / AI-Foundry-Connections