The fastest way to recreate the pre-warehouse era of contradictory Excel reports is to connect AI agents directly to your operational data without a governed semantic layer in between. Engineering teams are doing exactly this right now, driven by the genuine convenience of Model Context Protocol and the pressure to ship agentic workflows quickly. The result is a familiar problem wearing new clothes: different agents returning different revenue figures, different churn rates, different definitions of "active customer" because the business logic that should govern those answers lives nowhere in the stack.
Companion piece to our broader work on agentic data architecture. See The Semantic Layer Is the Agent for a deeper treatment of semantic model architecture, metadata governance, and why the data layer is the actual product your team should be building.
Why Raw MCP Connections Reproduce the Pre-Warehouse Problem
Model Context Protocol gives agents a standardised way to reach live data sources, which is genuinely useful. The problem is that "reaching data" and "interpreting data correctly" are two entirely separate engineering concerns, and MCP addresses only the first.
When an agent queries a database table directly, it receives columns and rows with no embedded understanding of what those values mean inside your business. Whether "orders" includes cancelled orders, whether "revenue" is gross or net, whether a customer counts as active after 30 days or 90 days: none of that is in the table schema. It lives in the institutional knowledge of your analytics team, or in a dbt model, or in a metrics layer that the agent has no visibility into.
The consequence is metric drift at query time. Two agents, or the same agent on two different days with slightly different prompts, will generate SQL that answers subtly different questions. Both answers look plausible. Neither is auditable without tracing back through the LLM's reasoning chain, which is not a sustainable governance posture for anything that touches financial reporting or operational decisions.
What the Semantic Layer Actually Does in an Agentic Architecture
A semantic layer sits between the agent and the warehouse and enforces a single, versioned definition of every business metric before any query executes. The agent expresses intent in natural language; the semantic layer translates that intent into SQL that already encodes the correct business logic. The LLM is responsible for understanding what the user wants. The semantic layer is responsible for ensuring the answer is calculated correctly.
This separation matters because it keeps non-deterministic components away from deterministic business rules. LLMs are probabilistic by design. Business definitions of gross margin are not. Mixing the two in the same layer produces outputs that are occasionally right but structurally ungoverned.
Tools like dbt Semantic Layer, Cube, and AtScale are all solving this problem from slightly different angles, but the architectural principle is consistent: metric definitions must be declared once, version-controlled, and enforced at query time rather than reconstructed by each agent at inference time.
The Governance Requirements That Must Be Resolved Before Agents Go Live
Metric Ownership
Every metric an agent can query needs a named owner who is accountable for its definition. This is not a technical requirement. It is an organisational one, and it is the one most commonly skipped because it requires a conversation between data engineering and the business that nobody wants to schedule. Without it, definitions drift silently as upstream tables change.
Access Control at the Semantic Layer
Row-level security and column-level masking cannot live only in the warehouse if agents are going to query through a semantic layer. The semantic layer must enforce the same access policies, otherwise an agent with broad permissions can inadvertently surface data that a human analyst would never be shown. This is particularly acute in regulated industries where data residency and access logging are compliance requirements, not preferences.
Query Auditability
Every agentic query should produce a traceable record: the natural language input, the resolved metric definitions, the generated SQL, and the result. This is the minimum audit trail needed to investigate a discrepancy after the fact. Most teams building agentic systems today are not capturing this at the infrastructure level, which means they are accumulating governance debt that will surface at the worst possible moment.
What a Production-Ready Governed Agent Architecture Looks Like
The architecture that holds up in production has four distinct layers, each with a clear responsibility.
The agent layer handles user intent: receiving natural language queries, managing conversation state, and routing requests to the appropriate tools. The semantic layer handles metric resolution: mapping intent to governed definitions and generating correct SQL. The warehouse layer handles computation: executing queries against source-of-truth data. The orchestration layer handles auditability: logging inputs, outputs, and the resolved definitions used at each step.
None of these layers should be doing the job of another. The most common architectural failure we see is agents that attempt to embed business logic in their system prompts. Prompt-encoded business rules are invisible to governance processes, cannot be version-controlled alongside your dbt models, and will diverge from the warehouse definitions the moment either side changes without coordinating with the other.
The Decision That Determines Everything Else
The choice of semantic layer is not a tooling decision that can be deferred until after agents are in production. It determines what questions agents can answer reliably, what governance controls are enforceable, and how quickly your team can extend the system as new metrics and new agents are added.
Teams that treat the semantic layer as an optional enhancement on top of direct database access will find themselves rebuilding their agent architecture once the first serious data discrepancy reaches a stakeholder who asks why two agents gave different answers to the same question. The rebuild is always more expensive than the upfront design decision.
The data warehouse was built to solve exactly this class of problem for human analysts. The semantic layer extends that solution to agents. The engineering effort required is real, but it is substantially smaller than the operational cost of agentic systems that cannot be trusted.
Where Vector Labs Fits
We design and build governed agentic data architectures for enterprise teams, covering semantic layer implementation, MCP tool design, and audit infrastructure. In our MCP architecture analysis, we set out the concrete patterns engineering teams need to keep agents grounded in authoritative, current data as operational conditions change. If you are planning an agentic rollout and want to resolve the governance architecture before it becomes a production incident, contact us at vector-labs.ai/contacts.
FAQs
A well-governed warehouse is a necessary condition, not a sufficient one. MCP gives agents access to tables and schemas, but it does not give them access to the business rules encoded in your dbt models or metrics layer. Without a semantic layer in the path, each agent query reconstructs metric logic from scratch, which means definitions can diverge even when the underlying data is clean and consistent.
dbt Semantic Layer, Cube, and AtScale all support programmatic querying that works well in agentic architectures. The right choice depends on where your existing metric definitions live and what your warehouse infrastructure already supports. The more important decision is ensuring the tool you choose enforces definitions at query time and produces auditable SQL output, rather than returning pre-aggregated results that obscure the calculation logic.
Access control must be enforced at the semantic layer, not only at the warehouse level. If the semantic layer passes queries through with the service account credentials of the agent rather than the identity of the requesting user, row-level security and column masking policies in the warehouse will not apply correctly. Your semantic layer configuration needs to propagate user identity through to the warehouse connection so that the same access rules apply to agent-generated queries as to human analyst queries.
At minimum, you need a persistent log that captures the natural language input, the resolved metric definitions used to interpret that input, the SQL generated, and the result returned. This gives you the information needed to investigate discrepancies after the fact. Ideally, each log entry also records the version of the semantic model active at query time, so that changes to metric definitions do not make historical queries unauditable.
The most effective framing is not technical. Ask stakeholders what happens when two agents return different revenue figures in the same board report and nobody can explain why. The semantic layer is the infrastructure that makes that scenario preventable rather than inevitable. The cost of building it upfront is predictable. The cost of rebuilding agent architecture after a high-visibility data discrepancy, including the trust damage, is not.

