- Context layers are having a moment because AI agents made an old problem urgent. Businesses always had meaning that was never written down. Dashboards tolerated that. Agents that act every half hour do not.
- A semantic layer says what a metric means. A context layer says how that meaning applies: when, under which rules, to which entities, as of what state. Neither is new. Both are real.
- The part of the stack that gets the least attention decides whether any of it is safe: freshness on every value, actions from a permissioned list, and a record of every run. Meaning without that is a very articulate way to be wrong.
You can tell a term has arrived in the data world when analyst reports start using it, cloud vendors ship a product with the name attached, and the companies that sold you a catalog last year rewrite their homepage around it. That is happening to “context layer” right now, and we would understand if your first reaction was a sigh. Data has watched this film before: a real problem gets a name, the name gets a cycle, and the insight ends up under a pile of whitepapers.
So here is the plain version, from a company that builds one. The context layer is not a new idea. It is an old problem that AI agents made impossible to keep ignoring. The problem is worth understanding on its own terms, the term is useful shorthand for it, and the thing most of the conversation skips is the part that decides whether an agent should be allowed to act at all.
The problem is older than the term
Every business has someone who knows which revenue number the finance lead actually trusts, why last quarter's spike was a one-off and not a trend, which system became the source of truth for customers after the migration, and the exception to how churn is counted for the enterprise segment. None of that is written anywhere a machine can read. It lives in one person's head, and it is the reason their answers are right when the dashboard's are merely plausible.
That was fine for a long time. A dashboard does not act; a person reads it, applies what they know, and decides. The unwritten understanding was applied by a human at the last step, every time. Now swap the human for an agent that reads the same numbers at three in the morning and moves a budget. The last step is gone. Whatever the agent did not have written down, it did not have at all.
That is the whole reason for the moment. Agents did not create the gap between what the business means and what is recorded. They removed the person who was quietly closing it.
Semantic layer, context layer: the difference that matters
The two terms travel together and get blurred. The distinction is simple and worth keeping.
| Semantic layer | Context layer | |
|---|---|---|
| Answers | What does this metric mean, and how is it calculated? | How does that meaning apply, right now, to this entity, under these rules? |
| Holds | Definitions: revenue is paid orders net of refunds, in store time, excluding tax | Relationships, current state, history, the organisation's rules, who may act, and what is allowed to change |
| Changes | Rarely. Definitions are meant to be stable | Constantly. State moves every sync; rules move when the business does |
| Fails when | Two tools apply different logic to the same question | An agent has the right definition and still decides wrongly, because it did not know the campaign was protected, the stock was gone, or the number was two days stale |
A semantic layer is necessary and not sufficient. It tells an agent that revenue excludes refunds. It does not tell the agent that this week's figure is still inside the platform's restatement window, that the product behind the campaign went out of stock on Tuesday, or that the team agreed in a chat thread to hold launches until the quarter's target is met. The context layer is where those things live, kept current, so an agent reads them instead of reconstructing them from scratch, or worse, not at all.
We wrote a longer definition in what a context layer is and a comparison in semantic layer, ontology, context layer. The short form: the semantic layer defines the number, the context layer governs how it behaves in the world.
The work behind the term
If the context layer is the thing, context engineering is the job of building and keeping it. It is less greenfield than it sounds. Most of the meaning a business needs already exists, scattered across a catalog, a few glossaries, some runbooks, a channel history and several heads. The work is to find it, write it down as data rather than prose, connect it to the live state it describes, and keep it current as the business changes.
- Define each name once. Metrics, entities and relationships, with the platform labels that map to them. An agent that meets a name not in the catalog should refuse, not guess.
- Attach state and history. Every value carries when it was last confirmed. Changes are kept in order, so “what changed since Tuesday” is a lookup, not an investigation.
- Write the rules as rules. Targets, protected entities, limits and approval thresholds live as data the system evaluates, not as sentences the model is asked to remember.
- Keep it alive. A definition that nobody updates after the migration is worse than none, because it is confidently wrong. Ownership and a review cadence are part of the layer.
The layer nobody talks about
Everyone agrees meaning matters. Far fewer ask the next question: given the meaning, should this agent be allowed to do what it is about to do? That is a different layer, and it does most of the load-bearing work while getting a fraction of the attention.
Three things belong in it, and none of them is a prompt.
- Freshness, on every value. Not a single sync interval, but “as of” on each number and a live read of the specific records before anything changes. An agent acting on a figure the platform restated yesterday is confidently wrong in the most expensive way.
- Actions from a fixed, permissioned list. The agent requests named operations, bound to the rights of the person it acts for, inside limits that survive approval. Anything not on the list does not exist, however the request is phrased.
- A record of every run. The inputs with their sync time, the rule that fired, the plan, who approved it, the exact change and the read-back. With that, any decision can be explained in a sentence and undone with one action.
Rich context and clean definitions do not make an agent safe on their own. They make it fluent. Fluent and wrong is the failure everyone fears, and it comes from acting on meaning that was right in general and stale or forbidden in particular. The governance layer is what turns a well-informed agent into one you can leave running.
What to take from the moment
Strip away the noise and the argument is modest. Your business has meaning that was never written down. It used to be applied by people at the last step. Agents removed that step. So the meaning has to be written down as data, connected to live state, and surrounded by rules the system enforces. Call the first part a semantic layer, the second a context layer, and the third governance, or call the whole thing a context layer as most people now do. The names will settle. The work is the same either way, and it is the work that decides whether your agents are production or demo-ware.