A retailer's first analytics agent goes live. Its first request is for revenue at risk by customer segment. Before it can run that query it has to settle four things nobody wrote down for a machine. What is a customer, which records count, which tables may it join, and what may the person asking see? A semantic layer for AI agents is the governed record that answers those four questions before any calculation runs. The layer most teams already own defines the calculation. The agent needs what comes before it.
This post lists the five things the agent needs, in order, and checks the competing pages against that list. In our post What Is a Semantic Layer? we separate the dashboard problem from the agent problem. This post takes the agent problem on its own.
An agent needs the concept, the permitted relationships, the owner and version, and the entitlement before it needs the metric. A metrics layer holds the last of the five. A semantic layer built on an ontology holds all five on one governed record.
It is the same layer with a different reader. For a decade its reader was a person with a dashboard. That person carried the concept in their head and chose a metric from a menu. An agent carries nothing in. It composes a query from what was written down for a machine, then acts on the answer.
cust_id is evidence. The agent infers the rest, and inferred context is a guess with good grammar.We call the discipline that keeps the record true context management, and the meaning it serves authoritative context. Our post Context Management: The Complete Guide covers the discipline. This post covers the record.
Five things, in this order. Each is a precondition for the next, and the metric is last. A metrics layer can define a calculation. It cannot define a concept.
| The agent needs | What the record holds | What a metrics layer returns | Without it |
|---|---|---|---|
| 1. The concept | Customer: a party with at least one billed account, in the scope where that definition holds | A join key | The agent infers "customer" from a column name |
| 2. The permitted relationships | Customer places Order; Order carries Invoice, held as modelled facts | Whatever joins the model file declares | A plausible join nobody approved |
| 3. The owner and the version | A named person in Finance; version 3; approved 2026-03-14; review due 2027-03-14 | Git history | The agent cites a definition that expired, or one nobody approved |
| 4. The entitlement | Rules on the concept, evaluated for the identity the agent acts for | Row and column rules per model | The agent returns what it can reach, and phrasing changes the result |
| 5. The metric logic | Revenue at risk, defined on Customer and Order, with its dimensions and filters | A formula over columns, defined once | Three agents, three numbers |
Our post Semantic Layer vs Ontology: Which One Says What a Customer Is explains why the first row comes first. Our post Metrics Layer vs Semantic Layer: The Difference Is a Noun takes the fourth column apart. Our post Semantic Layer vs Knowledge Graph: Where Meaning Lives and Where It Is Stored shows the agent reaching the five rows as hops in a graph.
We read four pages for this query: two from AWS, one from a metrics-layer vendor, and one from a catalog vendor. All four agree on the diagnosis. The AWS blog written with Stardog (Navin Sharma, JP Boreddy, Raghu Prabhu, and Sahil Thapar, 2026-07-10) says it in one line. "The model knows language, it doesn't know your business" (AWS Machine Learning Blog). They part on what goes in the layer and on who owns a definition.
| Page | What the layer holds, in its words | Who owns a definition, in its words | Where it stops |
|---|---|---|---|
| AWS Prescriptive Guidance (Don Simpson, Taylor Riggan, and Chun Schiros, 2026-07-24) | "formal ontologies, automated symbolic reasoning, and virtual knowledge graphs" on W3C standards, SHACL included | "human-in-the-loop workflows for semantic governance" | "automated ontology induction from data catalogs"; no owner or review date on a definition in the summary |
| AWS blog with Stardog (2026-07-10) | "an ontology-driven view of your enterprise data", with access gated by named graph | Which role may read which graph; no approver named | Validation and ownership |
| Cube, "Best Semantic Layer for AI Agents in 2026" (updated 2026-11-18) | "metrics (revenue, active users, churn) with their exact definitions, dimensions and the entities they belong to, the join paths between them, and the access policies that govern them" | "a versioned semantic model owned by the data team" | What an entity is lives outside the file |
| A catalog vendor's post (2026-06-29) | "a governed layer of business meaning, the definitions, metrics, relationships and rules" | "owned and maintained" | No owner or record named; accuracy figures with no link or method |
Two things stand out. Every page puts what a customer is in the layer. No page lists, among what the agent receives, the name of the person who approved a definition and the date it expires. The two AWS pages are closest to our argument and sit on the W3C standards we use. Both are reference architectures: they show how to build the record and say little about who signs it. An ontology induced from a catalog is a draft until a person approves it. Our post Ground Truth: SME-Approved vs Inferred Metadata covers the approval that makes an induced model citable.
No, and most agents need both. Retrieval-augmented generation, or RAG, finds passages of text that match a question and puts them in the prompt. It answers "what does the policy say". A semantic layer answers "what is a customer, and how much did they spend", from live records, under access rules. The AWS blog with Stardog draws the same line: "A semantic layer doesn't replace RAG. It complements it."
| Question | RAG | Semantic layer |
|---|---|---|
| What does the contract say about termination? | Yes. The answer lives in text | No |
| How many active customers churned last quarter? | No. The number is computed over records | Yes. The concept, the metric, and the entitlement |
| Which customers does this clause affect? | Half. It finds the clause | Half. It resolves the customers. Both, through one agent |
The measured case is a public benchmark. Sequeda, Allemang, and Jacob (arXiv, 2023-11-13) put enterprise questions to GPT-4 on an insurance schema. With zero-shot prompts directly on the SQL database, accuracy was 16%. Over a knowledge graph of the same database, with an ontology and mappings, it was 54% (arXiv 2311.07509). The follow-up (Allemang and Sequeda, arXiv, 2024-05-20) checked each generated query against the ontology and repaired the failures. Accuracy rose to 72%, with a further 8% returned as "I don't know" (arXiv 2405.11706). Our post Semantic Layer vs Text-to-SQL: What a Refusal Is Worth is about that 8%.
Over an interface it can call: an API, a SPARQL endpoint, or an MCP server. MCP, the Model Context Protocol, is the open standard agents use to call tools. What matters here is what arrives, in what order, and whether the record travels with it.
Our post Semantic Layer and MCP: What the Agent Actually Receives shows what a governed-meaning MCP server returns that a metrics MCP server cannot.
Five asks, one per need. Put them to the layer you have.
A layer that passes all five is a semantic layer run as context management, whatever its vendor calls it. A layer that passes only the last is a metrics layer, and it is still worth keeping for the dashboards. Who gets to be the owner in the third ask is the subject of our post What Is Data Governance for AI?.
TopQuadrant does not sell the model, the warehouse, or the agent framework. TQ Data Foundation is the governed semantic layer the agent reads from. Agents receive concepts, permitted relationships, and metric logic over API, SPARQL, MCP, and a Python SDK. The join paths come from the ontology, so an invented join is unavailable. Entitlements attach to governed concepts and are evaluated per request against the identity the agent acts for. Every served answer records the definitions resolved, their versions, the entitlements applied, and the data returned. AI proposes the models and the mappings; your experts confirm them. Every definition is validated with SHACL, a standard TopQuadrant helped author, so the record exports whole. Your catalog stays, and it syncs. Our agent-ready semantic layer page shows the five needs served in that order.
Ask your agent's semantic layer what a customer is before you ask it for revenue. If the answer carries a name and a date, the revenue number can be defended. TQ Data Foundation puts the name and the date on the record.