Blog
Articles
What is context for AI agents? (and how to give agents trusted data context)

What is context for AI agents? (and how to give agents trusted data context)

Articles
December 2, 2026
Team Foundational
Subscribe to our Newsletter
Get the latest from our team delivered to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Ready to get started?
Try It Free
What is context for AI agents? Foundational data flow graph connecting code, warehouse, pipelines and AI agents

Context for AI agents is the meaning, ownership, freshness, quality and access rules an agent needs, plus the code that produces each column. Foundational builds that context as a data flow graph from static analysis of your source code, without accessing your data, so agents use the right tables and see what a change will affect.

Ask an agent for last quarter's net_revenue and it will look for a column by that name. If two tables both have one, it may pick a stale copy. If a Java billing service calculates the number, a catalog that only sees the warehouse will not show the agent that code. The answer can look confident and still be wrong.

Trusted context is what the agent is missing: what the column means, whether the table is current, who may see it, and which code writes it. This applies to an assistant answering a question, and to a coding agent about to change the calculation.

What AI agents need from your data

An agent that answers questions about the business, or that edits the code behind it, needs five kinds of context. If any one of these is missing, the agent can still give a confident wrong answer.

Lineage
The path of a column such as net_revenue from the code that writes it, through pipelines and the warehouse, to the dashboards and other agents that read it.

Ontology
The agreed business meaning of the term, not only a column name, so two agents do not invent two definitions of revenue.

Freshness, and stale data
Which table is current and which copies are deprecated, so the agent does not answer from a job that still runs on last year's logic.

Which data the agent can access
The access rules for the agent and for the person asking, so it does not return data it should not see.

Code-level dependencies
Which services, pipelines and dashboards depend on that column, read from the code itself, so a coding agent can check what a change will affect before it edits the calculation.

Take net_revenue again. Lineage shows the Java billing service that writes it, the dbt model that reshapes it and the finance dashboard that reads it. The ontology says what counts as revenue, so the agent does not invent a second formula. Freshness marks the current warehouse table and flags a deprecated copy. Access rules decide whether this agent, and the person asking, may see it. Code-level dependencies tell a coding agent which of those assets will break if the billing service changes the calculation.

A context layer can hold the first four when it is built from catalog metadata, documentation and metric definitions. Code-level dependencies live in source code, including Java, Python, TypeScript, Go, COBOL and more, so they need a code and data graph built from that code.

How a context layer differs from a semantic layer and a catalog

A data catalog is a searchable inventory of tables, columns, owners and descriptions. A semantic layer gives every team one formula for a metric such as net_revenue. A context layer takes those sources and adds the meaning, ownership, freshness, quality and access rules an agent needs to trust the rest of your data.

None of the three, on its own, reads the application code that produces the column. That is the job of a code and data graph, built from static analysis of your repositories. For a side-by-side of the layers, and of when you need each one, see context layer vs semantic layer.

How to give agents trusted data context

Start from the questions your agents already get wrong, and work backward to the context they lacked.

Agree the meaning
Put the ontology and the metric formulas in one place, so every agent uses the same definition of net_revenue.

Mark what is current and who may use it
A context layer should tell the agent which table is live, who owns it, and whether this agent is allowed to read it.

Connect the code that produces the data
Add a data flow graph built from source code, so the agent can see the services and jobs behind the column, not only the warehouse table.

You do not have to replace a catalog or semantic layer you already have. You add the missing context on top, and you serve it to the agents your teams already use.

How Foundational gives agents that context

Foundational statically analyzes your source code to build a column-level data flow graph. It reads Java, Python, TypeScript, Go, Scala, SQL, Spark, dbt, COBOL and more, together with your warehouse and BI metadata, and keeps it up to date as the code changes. It does this from read-only access to your repositories. It does not connect to production data or read table contents.

When an agent asks about net_revenue, it can see the code that calculates the column, the current table, the owners, and the pipelines and dashboards that read it. Coding agents query the same context over MCP, so they can check what a change will affect before they edit the code.

Foundational sits next to the catalog and semantic layer you already use. It does not replace them. For a tool-by-tool view of how platforms build this context, see our context layer tools comparison.

FAQ

What is context for AI agents?

Context for AI agents is the governed information an agent needs to use your data safely: meaning, ownership, freshness, quality and access rules, plus the code that produces each column.

Foundational builds that context as a data flow graph from static analysis of your source code, without accessing your data. Agents use it to pick the right table and to see what a change will affect.

What do enterprise AI agents need in order to give trusted answers?

They need lineage, a business ontology, a way to tell current tables from stale ones, access rules, and the code-level dependencies behind each column.

A context layer covers the first four from metadata and metric definitions. A code and data graph adds the fifth by reading application code, pipelines, warehouses and BI, so the agent can see where a value is calculated.

How is a context layer different from a semantic layer or a catalog?

A catalog inventories your data. A semantic layer defines each metric once. A context layer adds the meaning, ownership, freshness, quality and access rules an agent needs on top of those sources.

A code and data graph then adds the part that lives in source code. The three layers are compared side by side in context layer vs semantic layer.

How do you give AI agents trusted data context without sharing production data?

Give them context built from code and metadata, not from table contents. Static analysis of your repositories, plus warehouse and BI metadata, is enough to show meaning, owners, freshness, access rules and dependencies.

Foundational works this way. It uses read-only access to your source code, does not connect to production data, and serves the resulting data flow graph to agents over MCP.

Which platforms provide a context layer for AI agents?

Catalog platforms such as Atlan, DataHub and Alation build context from the metadata they collect.

Foundational builds context from source code across your whole stack, including application languages, pipelines, warehouses and BI. Many enterprises combine one of each. For a tool-by-tool comparison, see context layer tools for AI agents.

Why do AI agents give wrong answers about our company data?

Usually the model is not failing at language. It is missing context: it picked a stale table, used the wrong definition of a metric, or could not see the code that calculates the column.

Give the agent a context layer for meaning, freshness and access, and a code and data graph for the lineage and dependencies behind each column, and the same question gets a trustworthy answer.

code snippet <goes here>
<style>.horizontal-trigger {height: calc(100% - 100vh);}</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.8.0/ScrollTrigger.min.js"></script>
<script>
// © Code by T.RICKS, https://www.timothyricks.com/
// Copyright 2021, T.RICKS, All rights reserved.
// You have the license to use this code in your projects but not to redistribute it to others
gsap.registerPlugin(ScrollTrigger);
let horizontalItem = $(".horizontal-item");
let horizontalSection = $(".horizontal-section");
let moveDistance;
function calculateScroll() {
 // Desktop
 let itemsInView = 3;
 let scrollSpeed = 1.2;  if (window.matchMedia("(max-width: 479px)").matches) {
   // Mobile Portrait
   itemsInView = 1;
   scrollSpeed = 1.2;
 } else if (window.matchMedia("(max-width: 767px)").matches) {
   // Mobile Landscape
   itemsInView = 1;
   scrollSpeed = 1.2;
 } else if (window.matchMedia("(max-width: 991px)").matches) {
   // Tablet
   itemsInView = 2;
   scrollSpeed = 1.2;
 }
 let moveAmount = horizontalItem.length - itemsInView;
 let minHeight =
   scrollSpeed * horizontalItem.outerWidth() * horizontalItem.length;
 if (moveAmount <= 0) {
   moveAmount = 0;
   minHeight = 0;
   // horizontalSection.css('height', '100vh');
 } else {
   horizontalSection.css("height", "200vh");
 }
 moveDistance = horizontalItem.outerWidth() * moveAmount;
 horizontalSection.css("min-height", minHeight + "px");
}
calculateScroll();
window.onresize = function () {
 calculateScroll();
};let tl = gsap.timeline({
 scrollTrigger: {
   trigger: ".horizontal-trigger",
   // trigger element - viewport
   start: "top top",
   end: "bottom top",
   invalidateOnRefresh: true,
   scrub: 1
 }
});
tl.to(".horizontal-section .list", {
 x: () => -moveDistance,
 duration: 1
});
</script>

See the context your AI agents are missing

We'll show you which data your agents use and the code behind it, on your own repositories.

See the context your AI agents are missing

We'll show you which data your agents use and the code behind it, on your own repositories.

See the context your AI agents are missing

We'll show you which data your agents use and the code behind it, on your own repositories.

Share this post
Subscribe to our Newsletter
Get the latest from our team delivered to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Ready to get started?
Try It Free

Governance that starts at the source.