Use Genie in multi-agent systems

Important

This feature is in Public Preview.

This article shows how to create a multi-agent system using Mosaic AI Agent Framework and Genie spaces. See _/ to learn more.

Benefits of Genie agents

Multi-agent systems consist of multiple AI agents working together, each with specialized capabilities. As one of those agents, Genie allows users to interact with structured data using natural language prompts.

Unlike SQL functions tools, which can only run pre-defined queries, Genie has the flexibility to create novel queries to answer unknown user questions that span multiple tables.

A multi-agent system could consist of Genie agents and RAG agents to query both structured and unstructured data. Because Agent Framework lets agents share answers as context for each other, users can get answers from data pulled from multiple sources.

Multi-agent framework consisting of a supervisor and specialized agents.

Genie authentication using a Personal Access Token (PAT)

Deployed agents that have access to a Genie Space must authenticate to the Genie Space and its underlying resources, including re:[UC] Functions, re:[UC] Tables, and SQL Warehouses.

Note

Databricks recommends contacting your re:[Databricks] account manager for help configuring Genie agent authentication.

Please see the notebook below for an example of how to authenticate the deployed agent to the Genie Space and its underlying resources. To create a PAT as a Databricks secret, you must:

  1. Create a PAT either as yourself or as a service principal.
  • PATs have an expiration date, so you must rotate the token to ensure service continuity.
  1. Add secrets-based environment variables to the deployed agent's model serving endpoint. See Add secrets-based environment variables.
  2. Specify the correct permissions for the PAT. The permissions level depends on the resource. See Automatic authentication passthrough.
  • Provision with CAN RUN on the Genie Space
  • Provision with CAN USE on the SQL Warehouse powering the Genie Space
  • Provision with SELECT on underlying Unity Catalog Tables
  • Provision with EXECUTE on underlying Unity Catalog Functions

Multi-agent Genie system example

The following notebook shows you how to create a multi-agent system using LangGraph and Genie.

Multi-agent using Genie and LangGraph

Get notebook