Leia em português: Fabric data agent: como declarar a idade do dado em cada resposta
Picture an operations data agent that gets a short question: how many orders are late right now? The answer comes back clean, with a number and a table, and nobody asks what time the data is from. The agent picked one source out of five, and each source has its own age: the Eventhouse may be a minute old, a Direct Lake model an hour and the graph of an ontology a day. The scenario is illustrative, but the pattern is in the documentation: on the pages I read on November 1, 2026, the data agent’s answer is described as tables, summaries or key points, and the age of the data is not among them.
The other half of the contract
What is the freshness contract of the Fabric data agent?
The freshness contract is the written, per-source agreement on how old the data in an answer may be and on what the agent says when it goes past that or when the age is not known. According to the documentation, the Fabric data agent picks the most relevant source, generates, validates and runs the query on it and formats the result; the agent decides which layer the data comes from, and each layer has its own age. The contract has four clauses: the probe, which measures the age; the tolerance, per class of question; the owner, who declares the time of the data; and the conduct, which says what the answer does outside the tolerance or when the age is unknown. The verdict has three values, within, outside and unknown, and unknown never becomes fresh.
The September 16 article covered the agent’s entry contract: five sources, 25 rows and English only. This one covers the clause that one did not have, the age of the data. Where to read the data is the subject of the August 16 article, and the price of the ontology refresh, of the September 24 article. The scope here is the age of the data in the data agent’s answer, not the choice of layer or the cost of the refresh.
| Layer | The probe | When it cannot tell |
|---|---|---|
| Eventhouse (KQL database) | ingestion_time() returns the approximate time each record was ingested |
Returns null if the IngestionTime policy was not enabled at ingestion |
| Lakehouse, through the SQL endpoint | lastSuccessfulSyncDateTime, per table, in the response of the refreshMetadata POST |
The status can be Failure or NotRun, and the POST triggers the sync it measures |
| Direct Lake semantic model | No documented probe on the pages I read; the time of the last framing is data that the model owner declares | The refresh history lists failures and, in general, does not list the successful framings |
| Mirrored database | lastSyncDateTime and lastSyncLatencyInSeconds, per table, in the status API |
The latency is not returned when the source does not report the commit time |
| Ontology graph (preview) | No age field on the pages I read; there is the schedule and Refresh now | It can show stale data until a new ingestion |
Sources checked on November 1, 2026. The table summarizes the documentation read on that date. The example in the hands-on section was run locally, and what the probes describe was not executed: nothing here was measured on a real Eventhouse, SQL endpoint or mirrored database, or with a data agent.
The problem it solves
The age of the data is a decision almost nobody writes down, and the map below avoids three mistakes. The first is treating the answer as if it were from now: the agent runs the query now, but over data that has the age of the layer it picked. The second is reading a probe as if it measured everything. My reading: there are three clocks, the event’s, the load made by the owner and the visibility in the engine, and the platform probes mostly measure the last one; a MAX(loaded_at) does not tell a source that stopped loading from a model that fell behind. The third is letting unknown become fresh: each documented probe has a “don’t know” case, the layers without a probe are a whole “don’t know”, and an answer with no rule for that sounds as sure as one that is a minute old.

How it works — step by step
- List the agent’s sources and the engine of each: the SQL endpoint answers in SQL, the semantic model in DAX and the Eventhouse in KQL, and each layer has its own age.
- Choose the probe for each source and write next to it the case where it cannot tell.
- Ask the data owner to expose the
as_of, the time of the data, in a column of the view or in a model measure, and have the query also return theage_seconds: the age arrives computed, and the agent reads it instead of estimating. - Define the classes of question and the tolerance of each:
livefor the current state andreportingfor closed periods; in the example, 900 and 86,400 seconds, hypothetical. - Write each source’s rule in the data source instructions, which apply when the agent routes the question to that source.
- Write the common rule in the
Response guidelinessection of the agent instructions: every answer ends with the time of the data, the age and the source. - Treat unknown as a verdict: with no
as_of, the answer says it does not know the age and does not use current, latest or up to date. - Test the agent with questions that cover the three verdicts, one within, one outside and one unknown; the September 16 article shows the evaluation SDK.
- Review the contract on every change of source, engine, mode or schedule.
The agent picks the source
The concept page says the agent determines the most relevant source and that it can consult the agent instructions to decide. Whoever asks sees the answer, and the layer behind it depends on which sources are registered and, according to the documentation, may depend on what the instructions say. The run steps show the chosen source, and it is the source that tells which age applies.
That is why the contract is per source. The data source instructions, which the documentation points to for date semantics and source-specific rules, carry that layer’s rule: where to read the age, which tolerance applies and what to say outside it. The common rule, which does not depend on the source, goes in the Response guidelines. The documentation recommends writing questions, instructions and example queries in English, and the instruction text in the example below follows that.
My reading: an instruction guides the agent but does not force it, which is why the contract needs a test. Testing the agent with these questions was not executed: the local example calls no agent, and what is written here is what the documentation says plus my reading.
The context has an age too
The data agent reloads the ontology context every 10 minutes, and the documentation says a change, such as a new entity, can take up to 10 minutes to show up, unless you refresh the context by hand. That is the age of the definition, not of the rows. In the integration, which is in preview, the ontology is a source of context: whoever runs the query, in SQL, KQL or DAX, is the underlying source, with the permissions of the person asking, and the age of the rows is that source’s.
There is a tension here that I do not resolve. The binding page asks you to refresh the ontology item by hand to see new rows, the graph page warns that the views can show stale data until a new ingestion, and the October 3 note in the September 24 article already records the contrast with the overview, which talks about querying the linked source live. My reading, only for the graph: it is the only layer on the board where the documentation admits stale data in writing, and on the pages I read no field reports its age; so the graph’s owner declares the as_of of the last refresh, whether from the schedule or from Refresh now, and the answer that goes through it inherits that value.
The graph is a path of the ontology agent, a resource separate from the data agent, also in preview, that queries in DAX, KQL, SQL or GQL; the data agent page with ontology as context mentions only SQL, KQL and DAX. It appears here because it is where stale data is written down, not because I saw the data agent query it. The ontology agent says explicitly when a query returns no rows; with stale rows, the pages I read do not say what it does. The graph path was not executed.
In practice: the verdict on six observations
The example computes the age of six observations, gives the verdict of each against two tolerances and generates the text of the Response guidelines section from those same tolerances. It did not run with a real data agent or in a Fabric tenant: it runs locally, with only the Python standard library, over times and tolerances that I declare hypothetical. It shows the shape of the contract, not the behavior of an Eventhouse, a SQL endpoint, a Direct Lake model, a mirrored database or a graph. The code stays in English in both languages.
I ran it with Python 3.12.10. The tolerances, 900 seconds for live and 86,400 for reporting, are my choice, not documentation values. The three Python blocks form a single program: save them to a file, in order, and run it with python.
The first block fixes the example’s clock, NOW, the tolerances and the verdict rule. age_seconds returns None when there is no time, and verdict returns unknown in that case: the unknown is not compared with the tolerance, and an age equal to the tolerance is still within.
import json
from datetime import datetime
NOW = "2026-11-01T10:00:00Z"
TOLERANCE = {"live": 900, "reporting": 86_400}
def parse(moment):
return datetime.fromisoformat(moment.replace("Z", "+00:00"))
def age_seconds(as_of):
if as_of is None:
return None
return int((parse(NOW) - parse(as_of)).total_seconds())
def verdict(age, tolerance):
if age is None:
return "unknown"
return "within" if age <= tolerance else "outside"
The second block lists the six observations, each with the source, the probe and the time of the data, and builds the envelope the query would return to the agent: the source, the age and one verdict per class. The probe is documentation and does not enter the calculation. MAX(loaded_at) and refresh_log are probes of the data owner, not platform fields. The eventhouse_no_policy has the time None, the case of the table without the IngestionTime policy, and the direct_lake_fallback repeats the SQL endpoint’s time, because my reading is that, on fallback, the age becomes the endpoint’s.
OBSERVATIONS = [
("eventhouse", "ingestion_time()", "2026-11-01T09:59:00Z"),
("eventhouse_no_policy", "ingestion_time()", None),
("sql_endpoint", "lastSuccessfulSyncDateTime", "2026-11-01T09:45:00Z"),
("direct_lake", "MAX(loaded_at)", "2026-11-01T09:00:00Z"),
("direct_lake_fallback", "lastSuccessfulSyncDateTime", "2026-11-01T09:45:00Z"),
("ontology_graph", "refresh_log", "2026-10-31T06:00:00Z"),
]
def envelope(source, as_of):
age = age_seconds(as_of)
verdicts = {name: verdict(age, limit) for name, limit in TOLERANCE.items()}
return {"source": source, "age_seconds": age, **verdicts}
The third block generates the text of the Response guidelines section from the same tolerances and prints the list as JSON, one observation per line:
GUIDELINES = """## Response guidelines
Finish every answer with: Data as of <as_of> (<age_seconds> seconds old), source <source>.
Questions about the current state are live: the tolerance is {live} seconds.
Questions about closed periods are reporting: the tolerance is {reporting} seconds.
Read as_of and age_seconds from the query result; never estimate them.
If age_seconds is above the tolerance, say so before the numbers.
If as_of is missing or null, say the freshness is unknown.
Never write current, latest or up to date for an unknown age."""
def response_guidelines():
return GUIDELINES.format(**TOLERANCE)
def main():
rows = [envelope(source, as_of) for source, _probe, as_of in OBSERVATIONS]
print("[")
print(",\n".join(" " + json.dumps(row) for row in rows))
print("]")
if __name__ == "__main__":
main()
The output of main():
[
{"source": "eventhouse", "age_seconds": 60, "live": "within", "reporting": "within"},
{"source": "eventhouse_no_policy", "age_seconds": null, "live": "unknown", "reporting": "unknown"},
{"source": "sql_endpoint", "age_seconds": 900, "live": "within", "reporting": "within"},
{"source": "direct_lake", "age_seconds": 3600, "live": "outside", "reporting": "within"},
{"source": "direct_lake_fallback", "age_seconds": 900, "live": "within", "reporting": "within"},
{"source": "ontology_graph", "age_seconds": 100800, "live": "outside", "reporting": "outside"}
]
The text that response_guidelines() returns, ready to paste into the Response guidelines section of the agent instructions:
## Response guidelines
Finish every answer with: Data as of <as_of> (<age_seconds> seconds old), source <source>.
Questions about the current state are live: the tolerance is 900 seconds.
Questions about closed periods are reporting: the tolerance is 86400 seconds.
Read as_of and age_seconds from the query result; never estimate them.
If age_seconds is above the tolerance, say so before the numbers.
If as_of is missing or null, say the freshness is unknown.
Never write current, latest or up to date for an unknown age.
The table summarizes the output:
| Source | Probe | Age (s) | live (900 s) |
reporting (86,400 s) |
|---|---|---|---|---|
eventhouse |
ingestion_time() |
60 | within | within |
eventhouse_no_policy |
ingestion_time() |
— | unknown | unknown |
sql_endpoint |
lastSuccessfulSyncDateTime |
900 | within | within |
direct_lake |
MAX(loaded_at) |
3,600 | outside | within |
direct_lake_fallback |
lastSuccessfulSyncDateTime |
900 | within | within |
ontology_graph |
refresh_log |
100,800 | outside | outside |
Three readings. The boundary is inclusive: sql_endpoint, at 900 s, is within the 900 s live tolerance, and one more second would put it outside. The tolerance belongs to the question, not to the source: the same direct_lake, at 3,600 s, is outside live and within reporting, and only ontology_graph, at 28 hours, is outside both classes. And the unknown stayed unknown in both: with no time, the calculation does not compare, and the verdict does not become within by omission. What the example does not prove is that a data agent obeys the instruction.
What the contract does not solve
- It does not prove that the agent obeys. The instruction guides, and only the agent test shows whether it is followed; I did not run it.
- It measures visibility, not the event.
ingestion_time()is approximate, because ingestion takes minutes and runs in parallel, and comparing the ingestion time with the source time gives only an estimate, because the clocks may not be synchronized. If the decision depends on the event time, the owner has to record it. - Measuring can change what is measured. The
refreshMetadataPOST triggers the sync, is a long-running operation, requires the contributor role or higher on the workspace and accepts up to 25 tables per request. - The same problem exists outside the agent. In Power BI, the content shows timestamps for publication, sharing and last refresh, but not all content has a scheduled refresh, so there can be empty entries, and the question about freshness goes to whoever designed the content. It is the unknown and the contract owner, on another surface.
Production best practices
- Write the contract per source, with the four fields: probe, tolerance, owner and conduct. For the layer without a documented probe, the owner declares the
as_of. - Compute the age in the query and return
as_ofandage_secondsin the result, for the agent to read instead of estimating. - Define the tolerance by the question, not by the source. My reading: for a closed period, what matters is that the
as_ofis equal to or later than the end of the period, not the age in seconds. - Never let unknown become fresh. With no
as_of, the answer says it does not know the age and does not write current, latest or up to date. - Write the instructions in English, as the documentation recommends, with each source’s rule in the data source instructions and the common rule in the
Response guidelines. - Declare the endpoint’s age on fallback. My reading: if the model can fall back to DirectQuery, the age to declare becomes the SQL endpoint’s, because the documentation says the table reads straight from it; Direct Lake on OneLake does not fall back.
- Do not call
refreshMetadataon every question. My reading: use it in a job that syncs and records the status, and let the question read theas_ofalready recorded. - Check the run steps before blaming the data. The chosen source may not be the one you imagined.
- Rerun the three verdicts on every change of source, engine, mode or schedule.
What has to be in place
The order below is causal, not chronological: each stage exists because the previous one is in place.
Foundation — every source has its own age. Every source of the agent has a documented probe or an as_of declared by the owner, a tolerance per class of question and a written case for when the age is not known.
It is in place when someone can answer, for each source of the agent, where the age comes from, who declares it and what happens when it is missing.
Production with context — the age reaches the answer. The query returns as_of and age_seconds, the rules are in the data source instructions and in the Response guidelines, and unknown is a verdict.
It is in place when an answer outside the tolerance warns before the numbers and an answer with no time says it does not know the age.
Scale and efficiency — the contract is revisited at every change. The test questions, one per verdict, are rerun on every change of source, engine, mode, schedule or instruction.
It is in place when swapping a source, a mode or a schedule does not change the verdict without a test showing it.
Frequently asked questions (FAQ)
Does the Fabric data agent report the age of the data in the answer?
On the pages I read on November 1, 2026, the answer is described as tables, summaries or key points, and the age is not on the list. That does not mean the agent never reports it: with the rule in the Response guidelines and the age arriving in the query result, it can make it into the answer. I did not run an agent to see.
Does the lakehouse SQL endpoint lag behind?
It does, and the lag is usually small. According to the documentation, under normal conditions the lag between the lakehouse and the SQL endpoint is under a minute and varies from seconds to minutes. The time of the last sync, per table, comes in lastSuccessfulSyncDateTime in the response of the refreshMetadata POST, which also triggers the sync.
Does Direct Lake always return the latest data?
Not necessarily. The documentation says the query returns the state of the Delta table at the point of the most recent successful framing, which is not necessarily the latest state, and that later modifications only become visible at the next framing. The Keep your Direct Lake data up to date option is enabled by default, but the refresh history lists the failures and, in general, does not list the successful framings, so it is not a probe of the time of the last framing. On fallback to DirectQuery, the table reads straight from the SQL endpoint.
What should the agent do when the age is unknown?
The documentation does not define it: it is what the contract writes. The example’s rule is to say the age is unknown and not write current, latest or up to date. Whether the agent obeys, only a test shows.
Does the ontology belong in the freshness contract?
The ontology provides the context, which the data agent reloads every 10 minutes, and the underlying source runs the query, so the age of the rows is the source’s. The graph is a path of the ontology agent, in preview, and its page admits stale data until a new ingestion; that is why the graph’s owner declares the as_of of the last refresh.
Which tolerance should I use?
The documentation defines none; the 900 and 86,400 seconds of the example are hypothetical. The tolerance is the data owner’s decision and depends on the question: the current state calls for a short window, and a closed period calls for the as_of to be later than the end of the period.
Conclusion
The data agent answers with the data of the layer it picked, and the age of that layer only reaches the answer if the contract carries it. Choose the probe for each source, ask the owner for the as_of, define the tolerance by the question and treat unknown as a verdict, never as fresh. My reading: the bigger job is giving an owner and a time to the layers without a documented probe, Direct Lake and the graph, not writing the instruction. It is a reading of the documentation and of a local example, not of an agent in production. To choose the layer, the path is the August 16 article; for the cost of the ontology refresh, the September 24 article.
Official references
- Fabric data agent: concept and creation.
- Fabric data agent: add and configure sources.
- Fabric data agent: ontology as context.
- Fabric data agent: configurations and instructions.
- Fabric IQ: ontology agent (preview).
- Fabric IQ: materialize the ontology graph (preview).
- Fabric IQ: bind data to the ontology (preview).
- Microsoft Fabric: SQL endpoint, performance and sync.
- Fabric REST API: Refresh SQL Endpoint Metadata.
- Microsoft Fabric: how Direct Lake works.
- Microsoft Fabric: Direct Lake overview and refresh history.
- Fabric REST API: mirroring tables status.
- Kusto: IngestionTime policy.
- Kusto: ingestion_time() function.
- Power BI: make sure content is up to date.
👉 If you have a Fabric data agent answering over more than one source and have never asked what time the data is from, pick the most critical source and write its probe, tolerance, owner and conduct before widening the pilot. Want to talk about data freshness in agents? Reach out on LinkedIn.
