Table of Content
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
Three terms keep showing up in conversations about AI and context engineering. A semantic layer, a context layer and a code and data graph all give an AI agent more than raw tables. They answer different questions, though, and they're built from different sources. The easiest way to choose is to ask what your agent does: does it answer questions about data, or does it change the code that produces it?
A semantic layer defines business metrics once, such as revenue, active users or churn, so every dashboard and query computes them the same way. For an analytics or text-to-SQL agent, it's the difference between guessing at a formula and using the agreed one. It's built from metric definitions that people write and maintain.
A context layer widens that idea. Besides metric definitions, it adds descriptions, business glossary terms, ownership, quality signals and access rules, so an agent answering questions knows what a table means and whether it should use it. Several data vendors now use the term. Atlan describes its platform as an enterprise context layer, and Fivetran + dbt Labs introduced Fivetran Context Layer in September 2026. It's usually built from catalog metadata, documentation and the semantic layer.
A code and data graph, sometimes called a context graph, is built from source code. It connects each table, column and dataset to the code that reads and writes it, across repositories and languages: application services, Spark and dbt jobs, mainframe programs and BI tools, with owners. A coding agent uses it before it edits: "What reads this column, across all our repos?" The answer comes from the code itself, not from metadata someone wrote down.
| Semantic layer | Context layer | Code and data graph | |
|---|---|---|---|
| Answers | How is this metric calculated? | What does this table mean, and may I use it? | What reads or writes this, and what breaks if I change it? |
| Built from | Metric definitions | Catalog metadata, docs, glossary, semantic layer | Source code across repos and languages |
| Main user | Analytics and BI agents | Analytics and question-answering agents | Coding agents and code reviewers |
| Typical moment | Writing a query | Choosing a dataset | Changing code |
If your agents answer business questions, start with a semantic layer and add a context layer as the number of datasets grows. If your agents write and change code that other systems depend on, they need the code and data graph, because metadata doesn't show which program reads a column. Many teams will run more than one. They aren't competing for the same job.
Foundational Context of Code and Data is a code and data graph, served over MCP to the coding agents your engineers already use. Read how it helps AI coding agents, or connect it to Claude Code, Cursor or Codex.
No. A semantic layer defines metrics. A context layer usually includes those definitions plus descriptions, ownership and rules.
Usually not on its own, because it's built from metadata, and the dependencies live in code.
It's lineage built from source code, extended across application code and repositories, and exposed to agents.
Book a demo and we'll walk through it with your stack.
Book a demo and we'll walk through it with your stack.
Book a demo and we'll walk through it with your stack.