YasarKocyigit

Nº 02DataArchitecture study

Index of entries

Fabric data agents, one domain each

A Fabric data agent accepts five data sources. The tenant holds two hundred semantic models. Which ones does an agent get, and how many agents does that make?

Author
Yasar Kocyigit
Platform
Microsoft Fabric · AI
Date
Status
Design
Reading
9 minutes
Diagrams
3
Contents

AnatomyOne question, from the person asking to a single read-only query

  • Data
  • Control
  • Metadata
Data agentSources · five at mostWhat each tool is toldQuestionAs the signed-in userAGENT INSTRUCTIONSTerms and toneUp to 15,000 charactersORCHESTRATORPlan and routeOne source per stepDAX toolReads Prep for AISQL toolInstructions, examplesKQL toolInstructions, examplesSEMANTIC MODELSales modelDAX over XMLALAKEHOUSEGold tablesT-SQL endpointKQL DATABASEOrder eventsKQLPREP FOR AIAI data schemaVerified answersAI instructionsPER SOURCEDescriptionInstructionsExample queries · 100Answer25 rows by 25 columnsterms, routingDAXT-SQLKQLresult

The drawing

Inside one data agent

The orchestrator reads each source's name, description, schema and examples, picks one, and hands the question to that source's tool. The tool writes one read-only query and runs it as the person asking.

12 parts

SourcesData agent conceptsData sourcesRouting

Select a component to read its role

What one agent holds

Imagine a question typed into Teams: what was net sales in the north last month? Three semantic models in the tenant define a measure called Net Sales. Finance built one, sales operations built another, and the third belongs to a single regional report. Whichever model the agent reads decides the number that person gets.

A Fabric data agent is an orchestrator with a short list of data sources. Sources come in kinds, and each kind has its own query tool. Lakehouses, warehouses, SQL databases and mirrored databases are queried in T-SQL. A KQL database is queried in KQL. A Power BI semantic model is queried in DAX through its XMLA endpoint. Graph models, ontologies and Azure AI Search indexes are in preview.

For each question the orchestrator builds a plan and picks the source most likely to hold the answer. It decides from each source's name, description, selected schema and example queries. It hands the question to that source's tool, reviews what comes back, and can go on to another source if it needs more. Every step is one read-only query against one source, run with the permissions of the person asking. On the standard runtime an answer carries at most 25 rows and 25 columns.

How many models

The platform's answer is five. One agent takes up to five sources in any combination, and five semantic models is a permitted combination.

This design uses fewer, because of what each kind of source lets its builder say about it.

Semantic modelLakehouse or warehouseKQL database
Schema selectionTablesTables, views, functionsTables, materialized views, functions
Source descriptionNoYesYes
Source instructionsNoYesYes
Example queriesNoUp to 100Up to 100

A SQL or KQL source can describe itself to the router and show it worked examples. A semantic model cannot. Its instructions and examples are set on the model, in Prep for AI, and they are written for the DAX tool. So when two models in one agent both have a Sales table and a Net Sales measure, the router has little more than two names to choose between.

What remains is a routing rule in the agent's instructions. Microsoft's routing guide lists that as the last resort, after schema selection, descriptions and examples, and warns that a long list of rules crowds out the other instructions.

The rule here is that no two sources in one agent may answer the same question. That bounds the number of semantic models by how many non-overlapping models a domain owns, which is usually one or two. The remaining slots go to a different kind of source.

There is a cost argument as well. Agent instructions, source instructions, example queries and conversation history all add to the input tokens a question is billed for. A wider agent makes each question dearer before any query runs.

SortingThree questions every semantic model answers before it is attached

  • Data
  • Control
  • Metadata
EACH MODEL, THREE QUESTIONSLEFT OUTOTHER KINDS OF QUESTIONTENANTModel inventoryEvery semantic modelBuilt fora domain?Not for one reportSole authorityin its agent?No measure twiceReady tobe asked?Names, measures, schemaON THE MODELPrep for AISchema, answers, rulesDATA AGENTDomain agentFive sources at mostReport modelStays with its reportSecond authorityMerge, or another agentBacklogFix the model firstLAKEHOUSEGold tablesRows, not totalsKQL DATABASEEvent dataWhat happened, whenyesyesyesnononorowsevents

The drawing

Which models an agent may hold

A model reaches an agent only if it was built for a domain, defines nothing another source in that agent defines, and is ready to be asked. Questions about rows and events go to a different kind of source.

11 parts

SourcesSemantic model best practicesPrep data for AI

Select a component to read its role

How to sort the models

Each semantic model answers three questions, in order, before it is attached to anything.

Was it built for a domain?

A domain model is a star schema over Gold tables, with explicit measures and one owner for its definitions. A report model exists to serve one report. It tends to have a flattened table, helper measures and copies of definitions that began somewhere else. Thin reports are unaffected, since they have no model of their own. Report models are labelled and left out, and people keep using the report.

Is it the only authority in its agent?

If two candidates for the same agent define the same measure, one of them owns the definition and the other does not belong there. Merge it into the owner, or keep it for a different agent whose questions do not overlap. Finance and sales can both define revenue as long as they answer from different agents.

Is it ready to be asked?

Microsoft publishes the checks: a star schema, business names in place of warehouse codes, descriptions on tables, columns and measures, explicit measures, and no helper or duplicate measures in scope. A model that fails goes to a backlog. The fixes help every report that reads it.

A model that passes is prepared on the model itself. The AI data schema lists the tables, columns and measures the agent may use, and it has to include whatever each measure depends on. Semantic Link Labs can list those dependencies. Verified answers pin down the questions asked most, with five to seven complete trigger questions each. AI instructions come last, after testing shows what is still going wrong.

Some questions are not for a model at all. Someone asking for one customer's open invoices wants rows, and a measure returns totals. Those questions go to Gold tables through a SQL endpoint. Questions about what happened and when go to a KQL database. A different kind of question means a different kind of source, so these do not compete with the model for routing.

Suppose the inventory finds fourteen models. Nine were built for single reports. Two of the remaining five are older copies of the Sales model. That leaves three domain models, for sales, finance and stock, and so three agents.

TopologyDomain agents under one orchestrator

  • Data
  • Control
  • Metadata
SalesFinanceSupply chainPeopleTeams, Copilot, appsORCHESTRATING AGENTFoundry agentPicks by instructionsDATA AGENTSales agentPublished · 2 of 5 slotsDATA AGENTFinance agentPublished · 2 of 5 slotsDATA AGENTSupply agentPublished · 2 of 5 slotsNEXT DOMAINIts own agentNot a sixth sourceSEMANTIC MODELSales modelNet sales, returnsLAKEHOUSEGold ordersOrder linesSEMANTIC MODELFinance modelLedger, budgetWAREHOUSEJournal linesPosted entriesSEMANTIC MODELStock modelOn hand, in transitKQL DATABASEShipment scansRecent eventsquestionMCP, as the userDAXT-SQLDAXT-SQLDAXKQL

The drawing

One agent per domain

Each domain publishes its own agent with a few sources. An orchestrating agent chooses among them and calls each one as the signed-in user. A new domain adds an agent.

12 parts

One agent per domain

Each domain publishes its own agent: one or two semantic models and, where people ask for rows or events, a lakehouse, warehouse or KQL database. Publishing creates a read-only version and asks for a description. Other agents read that description, so it should say what the agent answers and what it does not.

Above the domain agents sits an orchestrating agent. In Microsoft Foundry it reaches them through Fabric IQ, which is still in preview. Each published data agent appears there as a tool behind an MCP endpoint, and one Foundry agent can hold several. It chooses by the instructions written for it, so each data agent is named there with the questions it handles. Copilot Studio offers the same arrangement with connected agents. Any other MCP client can call a published agent directly.

Identity should travel the whole way. Through Fabric IQ the data agent queries as the signed-in user. Copilot Studio makes it a setting, with user authentication as one choice and the agent author's identity as the other. For a semantic model the user needs Read permission, with no Build permission and no workspace role, and row-level and column-level security still apply. Sharing an agent shares none of its data.

A new domain adds an agent. Putting its model into an existing agent as one more source would place two authorities behind one router again.

Technical notes

Model guidance lives on the model

Agent instructions hold up to 15,000 characters and reach the orchestrator. They are not passed to the DAX tool. Anything that tool must know about a semantic model, such as which date column is the default or what a term means, belongs in Prep for AI. Those settings are saved with the model, travel through Git and deployment pipelines, and need a refresh in the target workspace before they take effect. Copilot in Power BI reads the same settings, so the work is done once.

Two sources, two clocks

An Import model answers from its last refresh. A SQL source over the same Gold tables answers from Gold as it is now. Between a Gold release and the refresh that follows it, the two can give different totals for the same day. The release contract in Databricks Gold, released once decides how long that window is.

Check the Q&A setting before it retires

Prep for AI requires Q&A to be enabled on the model, and the preview DAX generator indexes column values through the same setting. Power BI Q&A is being retired. Microsoft's pages disagree on the date: the Q&A page says February 2027, while the data agent guidance still says December 2026. Microsoft has said the dependency will be replaced. Until it is, treat that switch as part of the model's contract with its agent.

The runtime is pinned at publish

An agent runs on the standard runtime or the preview runtime, and a published agent keeps the one it was published with until it is republished. Preview carries the newer DAX generator, a 1,000-row limit, and topics and object descriptions for SQL sources. Its behavior can change between releases. The language model behind either runtime cannot be chosen.

Evaluate before publishing

The SDK runs a set of questions against an agent and has a second model judge each answer against the expected one.

import pandas as pd
from fabric.dataagent.evaluation import (
    evaluate_data_agent,
    get_evaluation_summary,
)

questions = pd.DataFrame({
    "question": ["What was net sales in the north last month?"],
    "expected_answer": ["4.2 million"],
})

evaluate_data_agent(
    questions,
    "Sales agent",
    table_name="sales_agent_eval",
    data_agent_stage="sandbox",
)
get_evaluation_summary("sales_agent_eval")

The summary counts correct, incorrect and unclear answers, and a second table with the suffix _steps holds the detail of each run. Pointing the evaluation at the sandbox stage tests a change before the production version is replaced. The evaluation feature is in preview.

What a question costs

Tokens are metered at 100 capacity-unit seconds per 1,000 input tokens, 10 for cached input and 400 for output. Microsoft's example of 2,000 tokens in and 500 out comes to 400 CU seconds. The generated query is billed separately to the engine that runs it. In the Capacity Metrics app the agent's share appears as AI Query, a background operation.

What the platform fixes

LimitValue
Data sources per agent5, in any combination
Agent instructions15,000 characters
Example queries per SQL or KQL source100
Rows and columns in an answer25 by 25, or 1,000 rows on the preview runtime
CapacityF2 or P1 and above
RegionsAgent and source capacities must match
LanguageEnglish
QueriesRead-only

What the pilot should prove

Start with the Sales agent: one domain model and the Gold order lines. Write forty questions with expected answers. Include questions that must go to SQL, questions that must go to the model, and a few the agent should decline. Run the evaluation and record the score for each source.

Then attach the second Sales model deliberately and run the same forty. The routing errors that appear are the case for the sorting rule. Remove it again.

Ask the same question as a viewer restricted by row-level security and confirm that the restriction holds in Teams. Promote the agent from Dev to Test and check what its sources point at afterwards, since the documentation does not say how bindings are carried across stages. Refresh the model in Test and confirm that its Prep for AI settings arrived.

Measure capacity units per question and the time to an answer. Those two numbers, with the evaluation score, decide whether a second domain gets its agent.

Further reading

  1. Fabric data agent conceptslearn.microsoft.com
  2. Add and configure data sources in a Fabric data agentlearn.microsoft.com
  3. Improve data source routing in a Fabric data agentlearn.microsoft.com
  4. Semantic model best practices for data agentlearn.microsoft.com
  5. Evaluate your data agentlearn.microsoft.com
  6. Consume a Fabric data agent from Microsoft Foundry via Fabric IQlearn.microsoft.com
  7. Data agent consumptionlearn.microsoft.com

Drawing credits

Microsoft
The data agent, lakehouse, warehouse, KQL database, semantic model, report and Copilot icons come from the Microsoft Fabric icon set. Workflow symbols come from Fluent System Icons. Fabric product icons · Fluent System Icons

More from the journal

Index of entries
  1. 01Databricks Gold, released onceA design for releasing validated Gold tables from Databricks. One contract decides when the shared model downstream refreshes, and lineage traces a changed column to every report that reads it.DataArchitecture study
  2. 03I tested Qwen3.8-Flash-Next on a DGX Spark with Hermes Agent. Here are the numbers.Sixteen hours of measurements on a single NVIDIA DGX Spark. Generation speed, prompt processing, concurrency, GPQA Diamond accuracy, tool calling, long context, and 39 Hermes Agent runs graded by scripts.AITest