top of page

What "Context" Actually Means — And the Five Layers You Need Before an Agent Can Act on Its Own

  • Writer: Gandhinath Swaminathan
    Gandhinath Swaminathan
  • 7 minutes ago
  • 10 min read

Here's what you'll walk away with: the five layers that make up everything anyone means by "context," which of seven vendor categories is building each one, the layer almost nobody is selling you at all, and one question you can ask before your next AI purchase that tells you exactly which layer you're actually buying.


Salesforce will tell you context is everything assembled in front of the model. Snowflake will tell you it's a governed metric. Neo4j will tell you it's a living map of entities and the reasoning behind every decision made about them. Gartner and Forrester, watching all of them from outside, have each independently published research pointing at the same five-part shape. Every one of these answers is correct. Each one is also, on its own, one-fifth of the picture.


This is the fourth post in a series that has been building toward this exact map. Domain Modeling for Agentic AI showed that Customer 360 is a modeling decision, not a platform purchase. The posts on job-contextual semantic modeling and the semantic layer for agentic AI went deeper, showing that meaning has to be governed at the level of the job an entity is doing before an agent can act on it with confidence. This post names the five layers those three posts were quietly built on top of, and shows you which one the market still hasn't figured out how to sell.

Consultant at a whiteboard explaining the five-layer context stack for agentic AI — identity, ontology and relationships, semantic governance, runtime assembly, and provenance and decision memory — drawn as stacked labeled layers with simple icons in a bright, sunlit office.
Five layers, one governed context: identity → ontology → semantics → runtime assembly → provenance.

The Five Layers

Every definition of "context" you'll ever hear from a vendor is doing one of these five jobs. Nothing more, nothing less.

  1. Identity — confirms which real-world thing a record refers to, and keeps that answer stable as the record moves across systems.

  2. Ontology — maps how those things relate to each other, and proves that a label in one system points to the same thing as a label in another.

  3. Semantics — defines what a business term measures, once, so every tool and every agent returns the same number.

  4. Assembly — delivers the right slice of identity, ontology, and semantics to a model at the exact moment it acts.

  5. Decision memory — records what an agent did, on what evidence, and why, so a person can review the decision later.


Keep this list nearby. Every vendor category below fills one or two of these five boxes. None fills all five, and the box left thinnest at the end of this piece is the one worth paying closest attention to.


The Word Has Been Waiting Forty Years for This Moment

Long before Salesforce or Snowflake existed, a Stanford researcher named John McCarthy sat with a problem that sounds almost quaint now:

how do you write a rule that stays true no matter how the world around it changes?

McCarthy's answer, laid out in his notes on formalizing context, was to stop treating context as background noise and start treating it as something you could name, enter, exit, and carry a truth through — a formal object, not an afterthought.


His notation was simple: ist(c, p), or "proposition p is true in context c." His insight was not simple at all. A fact proven true inside one context does not automatically stay true inside another. Something has to carry it across the boundary — what McCarthy called a lifting rule, described in his logical AI approach to context. That lifting rule is exactly what has to happen between each of the five layers above: an identity resolved in layer one has to survive the trip into an ontology in layer two, a relationship confirmed in layer two has to survive the trip into a governed metric in layer three, and so on. Skip the lift at any seam, and a perfectly valid fact in one layer becomes a confidently delivered mistake in the next.


Seven Vendor Categories, Mapped to the Five Layers

Here is where the seven categories currently competing for the word "context" actually land.

Vendor category
Who's building it
Layer it fills
What it gives you

Assembled payload

Salesforce, Anthropic, Google

4. Assembly

An agent that acts on the full picture at the moment it needs it

Governed meaning

Snowflake, dbt, Cube

3. Semantics

A metric that means the same thing to every team and every agent

Entities and relationships

Independent ontology practitioners, ThoughtSpot

2. Ontology

Confidence that "customer" means the same customer everywhere

Decision record

Langfuse

5. Decision memory

A story you can stand behind, months later

Reach and real-time connectivity

MuleSoft, CData, Gartner's "context mesh"

4. Assembly

An agent that can actually get to the data it needs, safely, in real time

Retrieved proximity

Pinecone and vector databases

4. Assembly

Fast access to knowledge no model was trained on

Living structure and memory

Neo4j, Gartner's "context graphs," Forrester

2 and 5. Ontology plus decision memory

Institutional judgment a new agent doesn't have to relearn from zero

Notice what that table just showed you. Layer four — assembly — has three separate vendor categories racing to fill it, because it's the most visible layer and the easiest to demo. Layer two and layer five each have one category paying real attention. And layer one has none.

Diverse team of professionals collaborating around a whiteboard in a bright, creative office, discussing ideas while one team member writes notes.
Every vendor sees a different layer of the same stack — the work is getting them to agree on one.

Salesforce, Anthropic, and Google built layer four first because it's what you see when a model answers. Salesforce's own guide to context engineering calls it broader than a prompt and broader than retrieval — instructions, tools, memory, and data, assembled fresh for the task at hand. Anthropic's Model Context Protocol, unveiled in its November 2024 announcement, standardizes how that payload travels from a system to a model. Google's approach to grounding narrows it further to verifiable sources an answer can point back to.


Snowflake, dbt, and Cube built layer three, because a warehouse or a metrics engine is exactly where governed definitions belong. Snowflake's semantic views turn a metric definition into a database object, so the number is the number no matter who asks. Cube's take on semantic layers for agents puts it plainly: text-to-SQL gives an agent access; a semantic layer gives it understanding. Snowflake pushed further in 2026 with what Typedef describes as Horizon Context — definitions plus lineage plus trust, stacked on top of the semantic layer. dbt Labs reached the same expanded shape from the opposite direction in its own structured context layer post. Two competitors landed on the identical idea independently, the moment they both had to serve agents instead of dashboards.


A quieter camp of practitioners built layer two on purpose, insisting a semantic layer and an ontology are two different jobs. A widely shared breakdown of semantic layer versus ontology versus context layerdraws the line clearly: a semantic layer defines what a metric means; an ontology defines how entities relate and confirms a label in one system is the same real-world thing as a label in another. ThoughtSpot's engineering team makes the same case in its framework for architecting a clean context layer: a system with governed metrics and no relationship layer underneath is a dictionary with no grammar.


Langfuse built layer five. Its data model captures every step an agent takes — tool calls, retrievals, generations — tied to a session and a user, so anyone can walk back through exactly what happened and why. This is the layer most vendor pitches skip past on their way to the exciting part, and the one that turns an autonomous action into something a person can stand behind.


MuleSoft and CData feed layer four from the connectivity side, and Gartner has recently given this specific job its own name and its own warning. A January 2026 Gartner report, summarized in Kong's analysis of Gartner's "context mesh," argues that wrapping existing APIs with a connector and calling it agent-ready is no longer sufficient — the replacement is a real-time context mesh, built outside-in from the agent's goal, combining dynamic tool discovery with real-time state instead of batch synchronization. Gartner projects forty percent of agentic AI initiatives are at risk of cancellation by 2027 if integration stays connector-first rather than context-first. MuleSoft's long-running API-led connectivity model and CData's integration with Microsoft Agent 365, promising a semantic-rich model across 350-plus systems, both sit here.


Vector database vendors feed layer four from the retrieval side. Pinecone's own explanation of retrieval-augmented generation describes pulling the nearest matching text and handing it to the model. One benchmark cited in Tellius's research on semantic layers evolving for agentic AI jumped from roughly sixteen percent accuracy to fifty-four percent the moment an ontology — layer two — sat underneath the vector search, rather than instead of it.


Neo4j, and now two independent research firms, are the only camp building layers two and five together. Neo4j's own engineering team draws the line in a three-part series on the difference between a graph, a knowledge graph, and a context graph: a knowledge graph adds meaning to connections; a context graph goes further and captures what matters right now — permissions, current state, and the reasoning behind a decision. Atlan's summary of Gartner's own context graph research quotes Gartner directly on the same point: "Knowledge graphs are not replaced by context graphs, but are augmented by them and work together for supporting AI agents' knowledge and decision layers." Gartner forecasts more than fifty percent of enterprise AI agent systems will run on context graphs by 2028. Forrester reached a strikingly similar two-part shape from a different angle entirely. In a 2026 analysis titled "Context Graphs Are A Convergence, Not An Invention," the firm traces the entity-relationship half back forty years to enterprise architecture practice, then argues the genuinely new contribution is the decision trace sitting on top of it — defined as "a queryable layer of sensemaking abstractions that connects entity state to decision rationale across systems and time."


The Layer Almost Nobody Is Selling

Look back at that table one more time. Six of the seven vendor categories are pouring investment into layers three, four, and five — semantics, assembly, and decision memory. Layer two, relationships, has real energy behind it, especially now that Neo4j, Gartner, and Forrester are all pointing at it independently. Layer one — identity, the simple question of whether a record in the CRM and a record in the CDP refer to the same actual customer — has no vendor category racing to claim the word "context" for it at all.


That's not a gap this post discovered by accident. It's the exact gap the Customer 360 post opened this series with: entity resolution and identity resolution are the quiet, unglamorous foundation everything above assumes is already finished. Every one of the seven camps above builds confidently on top of layer one without checking whether it's solid. A beautifully governed metric, a beautifully modeled ontology, a beautifully assembled prompt, and a beautifully recorded decision trace all inherit the same weakness if the identity underneath them was never resolved in the first place. The market is racing to sell you layers two through five. Nobody is racing to sell you layer one, because it isn't a product. It's a modeling decision only your organization can make.


The One Question

Before the next platform pitch, ask one question: which of the five layers does this actually strengthen, and is the layer beneath it already solid? A semantic layer purchase only pays off if the ontology beneath it is trustworthy. An ontology only pays off if identity resolution beneath it is finished. A beautifully assembled agent prompt inherits every gap in the three layers underneath it, silently. That one question, asked before signing rather than after the first bad decision an agent makes, is the entire difference between buying the layer you need next and buying the layer that happened to have the best demo.

The domain model gives you the human-readable version of the business. The semantic layer gives you the machine-readable version of that same business. Context is what carries a validated truth safely from one layer to the next — and safely is the whole game.

Same Store, Same Week, Two Different Contexts

Take a retail example. Two jobs, same store, same five layers, same week.


Job one: prevent a stockout at a single store before the weekend rush. Identity narrows to one SKU at one location. Ontology narrows to the path from that store back through its distribution center to its supplier. Semantics narrows to days-of-supply and safety-stock thresholds. Assembly pulls a live feed of point-of-sale scans and inventory counts. Decision memory logs why an auto-replenishment order went out, and under which vendor terms.


Job two: personalize a promotion for a loyalty member browsing the same store's app that same afternoon. Identity now has to resolve one shopper across a loyalty number, an email, and an app login — a completely different slice of the customer graph than job one ever touched. Ontology shifts to household-to-individual and brand-affinity relationships. Semantics shifts to propensity-to-redeem and active-shopper definitions, not days-of-supply. Assembly pulls real-time browsing and purchase history instead of a warehouse feed. Decision memory logs which offer was shown, and under which consent and eligibility rule.


Same five layers. Same store. Same week. Almost nothing else in common. The only thing that decided which identities mattered, which relationships mattered, which metric governed, which data got assembled, and which decision got recorded, was the job. Change the job, and every layer repopulates with a different answer — not because the technology changed, but because the question changed.


The Thread This Whole Series Has Been Pulling

The instinct reinforced by nearly every vendor in the seven camps above is to build the layers first — resolve identity broadly, model the ontology comprehensively, govern every metric, assemble everything available — and assume a job will find what it needs inside that completeness later. That instinct is expensive and it is backwards. Context isn't a warehouse of resolved entities and governed metrics sitting ready for any question that might arrive. Context is what a job-to-be-done reaches into that warehouse and pulls out, on purpose, for the specific action it's about to take.


Forrester's own definition of a decision trace gets close to the same idea from the analyst side, describing "what triggered a decision, what context informed it, what rules governed it, and what outcome it produced." The trigger — the job — comes first in that sequence. Name it first, and the rest resolves cleanly, layer by layer. Skip it, and an organization is left holding five beautifully engineered layers with no way to know, in the moment, which pieces of any of them actually apply.


That is what this series has been building toward from the first post. Domain Modeling for Agentic AI established identity and ownership of meaning as the foundation everything else sits on. Job-Contextual Semantic Modeling took the next step, showing that a term only means one thing once the job it serves is named. The Semantic Layer for Agentic AIcarried that same idea into the layer agents actually query. None of those three posts were really about the technology used to implement them. They were about recognizing that a job-to-be-done is the thing that gives context its shape, its boundary, and its reason for existing at all.


The vendors and the analysts racing to own the word "context" are, without quite saying it, racing to build better containers for something that only becomes useful once an organization has already named the job the container needs to serve. Name the job first, and it tells you exactly which slice of identity, ontology, semantics, assembly, and decision memory actually matters this time. That's the organization whose agents earn the trust to act, not just the permission to try.

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page