Building Your First Fabric Data Agent in Under 1 Hour

What if your sales team could ask "What was our pipeline coverage ratio last quarter by region?" and get an instant, accurate answer — without opening Power BI, without knowing DAX, without filing a request with the BI team?

What if your sales team could ask "What was our pipeline coverage ratio last quarter by region?" and get an instant, accurate answer — without opening Power BI, without knowing DAX, without filing a request with the BI team?

That is what Fabric Data Agents do. They are conversational AI systems that sit on top of your Fabric data and answer natural language questions with structured, accurate results. No coding required to build one. No AI expertise needed to use one.

This tutorial walks through building a Data Agent from scratch. By the end, you will have a working agent that your team can use in Teams, M365 Copilot, or directly in Fabric.

Prerequisites

Before you start, you need:

If you do not have a semantic model ready, you can use any existing Power BI dataset. The agent works with whatever data is already in your model.

Step 1: Create the Data Agent (5 minutes)

  1. Open your Fabric workspace at app.fabric.microsoft.com
  2. Click + NewData Agent
  3. Name your agent (e.g., "Sales Analytics Agent")
  4. Add a description: "Answers questions about sales data, pipeline, revenue, and customer metrics"
  5. Click Create

You now have an empty Data Agent. The interface has three panels:

Step 2: Connect Data Sources (5 minutes)

  1. In the left panel, click + Add data source
  2. Select Semantic model
  3. Choose your Power BI dataset from the workspace
  4. Click Connect

The agent imports the model's metadata — table names, column names, relationships, measures, and hierarchies. This takes a few seconds.

What gets imported:

What does not get imported:

You can add up to 5 data sources in any combination: semantic models, lakehouses, warehouses, and KQL databases. For this tutorial, one semantic model is enough.

Step 3: Write Custom Instructions (10 minutes)

Custom instructions are the most important part of your Data Agent. They tell the agent how to behave, what terminology to use, and what guardrails to follow.

Click the Instructions tab in the right panel and write the following:


      You are a sales analytics assistant for Contoso Ltd. You answer questions about sales data, pipeline, revenue, and customer metrics.
      
      Data conventions:
      - Revenue is in the "Sales" table, column "Revenue"
      - Fiscal year starts July 1 (FY2025 = July 2024 to June 2025)
      - "Pipeline" refers to the "Opportunities" table
      - "Win rate" = Closed Won / Total Opportunities
      - "ARR" = Annual Recurring Revenue from the "Subscriptions" table
      
      Response format:
      - Always include the actual numbers, not just trends
      - Use currency formatting with 2 decimal places
      - Include the time period in your response
      - If a question is ambiguous, ask for clarification
      
      Guardrails:
      - Only answer questions about sales, pipeline, revenue, and customers
      - Do not speculate or make predictions unless asked
      - If you cannot find the data, say so clearly
      - Do not reveal sensitive data like individual salaries or commissions
      

Tips for good instructions:

Step 4: Add Example Queries (10 minutes)

Example queries dramatically improve accuracy. They teach the agent the pattern of questions your team asks and how to translate them into queries.

Click the Examples tab and add at least 5 examples:

Example 1:

Example 2:

Example 3:

Example 4:

Example 5:

Why examples matter:

Step 5: Test and Iterate (15 minutes)

Now the important part — testing. Use the centre panel chat to ask questions and verify the agent's responses.

Start with simple questions:

Then try more complex questions:

Common issues and fixes:

Issue Cause Fix
Wrong numbers Ambiguous column names Add more specific instructions about which table/column to use
"I don't know" response Missing terminology Add the term to custom instructions with its definition
Incorrect calculation Ambiguous metric definition Define the exact formula in instructions
Too verbose No response format guidance Add response format instructions
Answers outside scope No guardrails Add guardrails to instructions

Iterate: For every wrong answer, update your instructions or examples. The agent learns from your configuration — the better your instructions, the better its answers.

Step 6: Publish and Distribute (10 minutes)

Once you are happy with the test results, publish the agent:

  1. Click Publish in the top-right corner
  2. The agent is now available in your Fabric workspace
  3. To share with your team, click Share and add users or groups

Publish to M365 Copilot:

  1. In the agent settings, navigate to Integrations
  2. Click Microsoft 365 Copilot
  3. Follow the prompts to register the agent in Copilot Studio
  4. Your team can now access the agent from the Copilot pane in Teams, Outlook, and other M365 apps

Publish to Teams:

  1. In Copilot Studio, create a Teams channel for the agent
  2. Configure the agent to appear in a specific Teams channel or as a personal app
  3. Team members can @mention the agent and ask questions directly in Teams

Governance with Purview:

  1. Navigate to Microsoft Purview
  2. Configure DLP policies for your Data Agent
  3. Set access restrictions (who can use the agent, what data they can access)
  4. Enable auditing for compliance

Step 7: ALM and Git Integration (5 minutes)

For production use, integrate your Data Agent with Git for version control and deployment pipelines:

  1. In your Fabric workspace, click Workspace settingsGit integration
  2. Connect to your Azure DevOps repository
  3. The Data Agent configuration (instructions, examples, data sources) is committed to Git
  4. Use deployment pipelines to promote the agent from Dev → Test → Production

This ensures your agent configuration is versioned, auditable, and deployable across environments.

Summary

You have built a Data Agent that:

Total time: approximately 50 minutes.

The agent will improve as you add more examples and refine your instructions. Treat it like a new team member — it needs onboarding, feedback, and guidance to perform at its best.

Your team can now talk to their data. No DAX required.

P

PowerBI.ai

Expert insights on Power BI, Microsoft Fabric, and AI-powered business intelligence.