How to create a Data Agent in Microsoft Fabric: step by step
A Data Agent in Microsoft Fabric is an AI assistant that answers questions about your data in natural language, without forcing anyone to write SQL. It is one of the capabilities of Copilot in Fabric: instead of opening several reports, someone asks "What was the revenue by region last quarter?" and gets the answer right away. It is a simple way to give autonomy to people who work with data but do not write queries.
Prerequisites
- A Fabric workspace on a capacity with Copilot enabled — F2 or higher, or a Fabric trial.
- At least one data source with tables, for example a Lakehouse or a Warehouse that already has data loaded.
- Permissions to create items in the workspace and to read the tables you will use.
Step 1: Create the Data Agent
Open your workspace in Fabric and choose + New item. In the item list, search for Data agent and select it. Give it a clear name — for example Agente-Vendas — because that name will identify who answers the questions. Once you confirm, Fabric opens the agent page and automatically shows the OneLake catalog, ready for you to connect data.
Step 2: Connect the data sources
In the OneLake catalog, select the source you want to use — a Lakehouse, a Warehouse, a Power BI semantic model or a KQL database — and click Add. Each source is added individually, and you can connect up to five sources in total, in any combination. If you later need to add another one, use the Explorer pane on the left and the + Data source button.
Step 3: Choose the visible tables
Once the source is connected, the Explorer lists the available tables. Use the checkboxes to make only the relevant tables visible for the questions you expect to receive. Fewer tables, but the right ones, help the agent pick the correct data and answer more accurately. Leave out technical or helper tables that the business does not care about — you reduce noise and avoid confusing answers.
Step 4: Give the agent instructions and examples
This is the part that makes the difference. In the instructions panel, write the business context in plain language: what the columns mean, the filters that always apply, and the vocabulary the team uses. You can also add a few example questions. A good instruction could say:
Revenue maps to the total_liquido column of the Vendas table. The region comes from the regiao column of the Lojas table. Only consider orders whose estado equals Concluída.
The agent combines the table schema (table and column names) with these notes to build the right query. The clearer the instructions, the less ambiguous the answers.
Step 5: Test the questions
In the chat panel on the right, type a question in natural language and send it. The agent identifies the most relevant source, turns the question into a query (for example, it generates SQL for a Lakehouse or Warehouse), runs it and returns a readable answer. Try variations of the same question — using different words — to confirm that the result stays consistent.
Check the result
To trust the agent, ask a question whose answer you already know and compare the numbers. Many agents let you see the generated query: open it and confirm that it uses the tables and filters you defined. In our example, the query should look like this:
SELECT r.regiao, SUM(v.total_liquido) AS faturacao
FROM Vendas AS v
JOIN Lojas AS r ON v.loja_id = r.id
WHERE v.estado = 'Concluída'
GROUP BY r.regiao;
If the answer is wrong, go back to Step 4 and improve the instructions or the examples. If context is missing, check in Step 3 whether the right table is visible.
Conclusion
In just a few steps, you turned your data into an assistant that answers questions in natural language. The next step is to publish the agent and make it available to the team — for example, by consuming it from Copilot in Power BI — so anyone can ask without writing a single line of code. What question would you like your team to be able to ask your data today?