1---2name: fabric-data-agent3description: Create, 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 instructions, create example queries, automate data agent provisioning via REST API or PowerShell, integrate Fabric data agents with Azure AI Foundry, or troubleshoot data agent configuration issues.4license: Complete terms in LICENSE.txt5---6# Microsoft Fabric Data Agents
7
8Build 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.
9
10## When to Use This Skill
11
12- Creating a new Fabric Data Agent from the portal or via REST API
13- Configuring data sources (Lakehouse, Warehouse, Power BI Semantic Model, KQL Database, Ontology)
14- Writing effective agent-level or data-source-level instructions
15- Authoring example queries (few-shot examples) to improve NL2SQL/NL2DAX/NL2KQL accuracy
16- Automating data agent provisioning with PowerShell and the Fabric REST API
17- Integrating a published Fabric Data Agent with Azure AI Foundry agents
18- Managing the Operations Agent definition (Configurations.json) programmatically
19- Publishing, sharing, and versioning data agents
20- remediate query generation, data source permissions, or tenant settings
21
22## Prerequisites
23
24| Requirement | Details |
25| ------------------------------ | -------------------------------------------------------------------------------------------- |
26| Fabric capacity | Paid F2+ SKU, or Power BI Premium P1+ with Fabric enabled |
27| Tenant settings | Fabric data agent, Cross-geo processing for AI, Cross-geo storing for AI all enabled |
28| XMLA endpoints | Enabled if using Power BI Semantic Model data sources |
29| Data source access | At least Read permission on target lakehouses, warehouses, semantic models, or KQL databases |
30| PowerShell (automation) | PowerShell 7.4+, Az.Accounts module |
31| Azure AI Foundry (integration) | Foundry Project endpoint, Fabric connection, model deployment |
32
33## Step-by-Step Workflows
34
35### Workflow 1: Create and Configure a Data Agent (Portal)
36
371. Navigate to your workspace and select **+ New Item > Fabric data agent**
382. Provide a descriptive name for the agent
393. Add up to 5 data sources from the OneLake catalog (any mix of Lakehouse, Warehouse, PBI Semantic Model, KQL DB, Ontology)
404. Select/deselect tables in the Explorer pane to control what the AI can query
415. Write agent instructions — see [instruction-best-practices.md](./references/instruction-best-practices.md)
426. Add example queries for each data source — see [example-query-guide.md](./references/example-query-guide.md)
437. Test the agent in the chat pane with representative questions
448. Select **Publish** and provide a description
459. Share the published version with colleagues via workspace permissions
46
47### Workflow 2: Automate Data Agent via REST API (PowerShell)
48
491. Authenticate with `Connect-AzAccount` and obtain an access token
502. Create the agent item using the Fabric Items API — run [New-FabricDataAgent.ps1](./scripts/New-FabricDataAgent.ps1)
513. Configure the Operations Agent definition (Configurations.json) — see [operations-agent-schema.md](./references/operations-agent-schema.md)
524. Update the item definition using the Update Item Definition API
535. Validate deployment by listing items in the workspace
54
55### Workflow 3: Integrate with Azure AI Foundry
56
571. Create and **publish** the Fabric Data Agent in the Fabric portal
582. Create a Foundry Agent in the Azure AI Foundry portal
593. Add a Microsoft Fabric connection to your Foundry project
604. Create the agent with the Fabric tool enabled — see [foundry-integration.md](./references/foundry-integration.md)
615. Create a thread, add a user question, run the thread, and retrieve the response
626. Update Foundry agent instructions to describe what data the Fabric tool can access
63
64## remediate
65
66| Symptom | Cause | Resolution |
67| -------------------------------------------- | ----------------------------------------- | ------------------------------------------------------------------ |
68| Data agent option not visible in New Item | Tenant setting disabled | Admin enables "Fabric data agent" in Tenant Settings |
69| Agent can't see my tables | Tables not selected in Explorer | Check table checkboxes in the data source Explorer |
70| Queries return permission errors | Insufficient data access | Grant at least Read on the underlying data source |
71| Example queries show validation errors | SQL/KQL syntax invalid or schema mismatch | Validate queries against the actual table schema |
72| Agent misinterprets domain terms | Missing definitions in instructions | Add term definitions in Agent Instructions (up to 15,000 chars) |
73| Power BI semantic model won't add | XMLA endpoints disabled | Enable "Power BI semantic models via XMLA endpoints" tenant switch |
74| Published agent not accessible to colleagues | Workspace permissions not granted | Share the workspace or agent item with appropriate roles |
75
76## References
77
78- [Instruction Best Practices](./references/instruction-best-practices.md) — How to write effective agent and data-source instructions
79- [Example Query Guide](./references/example-query-guide.md) — Authoring few-shot examples for NL2SQL/NL2DAX/NL2KQL
80- [Operations Agent Schema](./references/operations-agent-schema.md) — REST API definition structure (Configurations.json)
81- [Foundry Integration](./references/foundry-integration.md) — Connecting Fabric Data Agents with Azure AI Foundry
82- [Microsoft Learn: Create a Fabric data agent](https://learn.microsoft.com/en-us/fabric/data-science/how-to-create-data-agent)
83- [Microsoft Learn: Data agent configuration](https://learn.microsoft.com/en-us/fabric/data-science/data-agent-config)