Agent Skills for Databricks Assistant to query Genie spaces and Multi-Agent Systems.
-
Import into your Databricks workspace
Copy the
skillsfolder into your Databricks workspace at:/Workspace/Users/<your-email>/.assistant/skills/Create the
.assistantfolder if it doesn't exist. -
Configure placeholders
Replace all
<INSERT_...>placeholders in the files with your actual values:Placeholder Description Example <INSERT_DATABRICKS_HOST>Your Databricks workspace URL https://my-workspace.cloud.databricks.com<INSERT_SECRET_SCOPE>Databricks secret scope name my_scope<INSERT_TOKEN_SECRET_KEY>Secret key for personal access token my_token<INSERT_CLIENT_ID_SECRET_KEY>Secret key for service principal client ID sp_client_id<INSERT_CLIENT_SECRET_SECRET_KEY>Secret key for service principal client secret sp_client_secret<INSERT_CATALOG>Unity Catalog name for UC functions my_catalog<INSERT_SCHEMA>Schema name for UC functions my_schema<INSERT_GENIE_SPACE_ID>Genie space ID (from URL) 01f0f9f0b9c41c74a5adfb46bfc836dd<INSERT_MAS_ENDPOINT_NAME>Model serving endpoint name for MAS my-mas-endpoint -
Create secrets (if not already done)
# Create secret scope databricks secrets create-scope <INSERT_SECRET_SCOPE> # Add personal access token databricks secrets put-secret <INSERT_SECRET_SCOPE> <INSERT_TOKEN_SECRET_KEY> # For Genie UC functions (service principal) databricks secrets put-secret <INSERT_SECRET_SCOPE> <INSERT_CLIENT_ID_SECRET_KEY> databricks secrets put-secret <INSERT_SECRET_SCOPE> <INSERT_CLIENT_SECRET_SECRET_KEY>
-
Register UC functions (for SQL Editor usage)
Run the SQL in
genie_query_uc_function.sqlandmas_query_uc_function.sqlto create the Unity Catalog functions.
skills/
├── genie-skill/
│ ├── SKILL.md # Skill configuration for Genie queries
│ ├── genie_query_uc_function.sql # UC functions for SQL Editor
│ └── scripts/
│ └── genie_query.py # Python script for notebooks
└── mas-skill/
├── SKILL.md # Skill configuration for MAS queries
├── mas_query_uc_function.sql # UC function for SQL Editor
└── scripts/
└── mas_query.py # Python script for notebooks
Query Databricks Genie spaces using natural language. Supports:
- Starting conversations
- Asking follow-up questions
- Deleting conversations when done
Query a Multi-Agent System (MAS) endpoint that coordinates multiple specialized agents for cross-domain questions.
Use the Python scripts directly in Databricks notebooks:
from scripts.genie_query import start_conversation, ask_followup, delete_conversation
response = start_conversation("<SPACE_ID>", "What is our churn rate?")For SQL Editor, use the registered Unity Catalog functions:
SELECT my_catalog.my_schema.genie_start_conversation(
'<SPACE_ID>',
'What is our churn rate?',
secret('my_scope', 'sp_client_id'),
secret('my_scope', 'sp_client_secret')
) as result;Ensure your service principal or user has:
- CAN USE permission on Genie spaces
- CAN USE permission on SQL warehouses
- SELECT permission on Unity Catalog tables used by Genie
- CAN QUERY permission on model serving endpoints (for MAS)
MIT