$npx -y skills add PatrickGallucci/fabric-skills --skill fabric-data-agentCreate, configure, and manage Microsoft Fabric Data Agents that enable natural language Q&A over lakehouses, warehouses, Power BI semantic models, KQL databases, and ontologies. Use when asked to build data agents, configure NL2SQL/NL2DAX/NL2KQL experiences, write agent instructi
| 1 | # Microsoft Fabric Data Agents |
| 2 | |
| 3 | Build conversational AI experiences that let users ask questions in plain English against structured data in Microsoft Fabric. Fabric Data Agents translate natural language into SQL, DAX, or KQL queries, execute them securely under the caller's identity, and return data-driven answers. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | - Creating a new Fabric Data Agent from the portal or via REST API |
| 8 | - Configuring data sources (Lakehouse, Warehouse, Power BI Semantic Model, KQL Database, Ontology) |
| 9 | - Writing effective agent-level or data-source-level instructions |
| 10 | - Authoring example queries (few-shot examples) to improve NL2SQL/NL2DAX/NL2KQL accuracy |
| 11 | - Automating data agent provisioning with PowerShell and the Fabric REST API |
| 12 | - Integrating a published Fabric Data Agent with Azure AI Foundry agents |
| 13 | - Managing the Operations Agent definition (Configurations.json) programmatically |
| 14 | - Publishing, sharing, and versioning data agents |
| 15 | - remediate query generation, data source permissions, or tenant settings |
| 16 | |
| 17 | ## Prerequisites |
| 18 | |
| 19 | | Requirement | Details | |
| 20 | | ------------------------------ | -------------------------------------------------------------------------------------------- | |
| 21 | | Fabric capacity | Paid F2+ SKU, or Power BI Premium P1+ with Fabric enabled | |
| 22 | | Tenant settings | Fabric data agent, Cross-geo processing for AI, Cross-geo storing for AI all enabled | |
| 23 | | XMLA endpoints | Enabled if using Power BI Semantic Model data sources | |
| 24 | | Data source access | At least Read permission on target lakehouses, warehouses, semantic models, or KQL databases | |
| 25 | | PowerShell (automation) | PowerShell 7.4+, Az.Accounts module | |
| 26 | | Azure AI Foundry (integration) | Foundry Project endpoint, Fabric connection, model deployment | |
| 27 | |
| 28 | ## Step-by-Step Workflows |
| 29 | |
| 30 | ### Workflow 1: Create and Configure a Data Agent (Portal) |
| 31 | |
| 32 | 1. Navigate to your workspace and select **+ New Item > Fabric data agent** |
| 33 | 2. Provide a descriptive name for the agent |
| 34 | 3. Add up to 5 data sources from the OneLake catalog (any mix of Lakehouse, Warehouse, PBI Semantic Model, KQL DB, Ontology) |
| 35 | 4. Select/deselect tables in the Explorer pane to control what the AI can query |
| 36 | 5. Write agent instructions — see [instruction-best-practices.md](./references/instruction-best-practices.md) |
| 37 | 6. Add example queries for each data source — see [example-query-guide.md](./references/example-query-guide.md) |
| 38 | 7. Test the agent in the chat pane with representative questions |
| 39 | 8. Select **Publish** and provide a description |
| 40 | 9. Share the published version with colleagues via workspace permissions |
| 41 | |
| 42 | ### Workflow 2: Automate Data Agent via REST API (PowerShell) |
| 43 | |
| 44 | 1. Authenticate with `Connect-AzAccount` and obtain an access token |
| 45 | 2. Create the agent item using the Fabric Items API — run [New-FabricDataAgent.ps1](./scripts/New-FabricDataAgent.ps1) |
| 46 | 3. Configure the Operations Agent definition (Configurations.json) — see [operations-agent-schema.md](./references/operations-agent-schema.md) |
| 47 | 4. Update the item definition using the Update Item Definition API |
| 48 | 5. Validate deployment by listing items in the workspace |
| 49 | |
| 50 | ### Workflow 3: Integrate with Azure AI Foundry |
| 51 | |
| 52 | 1. Create and **publish** the Fabric Data Agent in the Fabric portal |
| 53 | 2. Create a Foundry Agent in the Azure AI Foundry portal |
| 54 | 3. Add a Microsoft Fabric connection to your Foundry project |
| 55 | 4. Create the agent with the Fabric tool enabled — see [foundry-integration.md](./references/foundry-integration.md) |
| 56 | 5. Create a thread, add a user question, run the thread, and retrieve the response |
| 57 | 6. Update Foundry agent instructions to describe what data the Fabric tool can access |
| 58 | |
| 59 | ## remediate |
| 60 | |
| 61 | | Symptom | Cause | Resolution | |
| 62 | | -------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------ | |
| 63 | | Data agent option not visible in New Item | Tenant setting disabled | Admin enables "Fabric data agent" in Tenant Settings | |