Mo CherifAI, SOFTWARE & BUSINESS

The Context Layer: Teaching Agents Why We Do Things

Surviving the SaaSpocalypse

Ask an experienced finance manager "should we approve this discount?" and they won't answer right away. They'll ask who the customer is, how big the deal is and whether it's a renewal. Then whether we've had service problems with them, whether we've approved something similar before, and who carries the risk if it goes wrong.

All of those questions are context, and context is exactly what most AI agents are missing.

A model can give you a confident answer with almost no background. Confidence and judgment are different things, though, and the gap between them is context: the surrounding facts that change what the right answer should be.

I first wrote about this back in January, and I've only gotten more convinced since.

Imagine a new account manager taking over a renewal. The previous manager promised to hold the price until a support issue was resolved, but the CRM only shows last year's rate. The new manager could follow the pricing policy exactly and still break a promise to the customer. An agent reading the same record would have the same problem.

Plenty of information, very little context

Most companies don't lack information. What they have is fragmented context. The brand strategy is in a deck, the product truth is in the docs, customer insight is in call recordings, objections are in sales notes, proof is in case studies, and the legal constraints are buried in an approval thread from eight months ago.

An agent can retrieve pieces of all that. Retrieval gets you documents, though, and what the agent needs is how they relate. I like putting it this way: a campaign brief is content, and why the campaign exists is context. A case study is content, and which claim it proves is context.

Without that, agents just make you faster at being inconsistent. Each one works from its own partial picture, so you get more emails, more briefs and more summaries, all slightly off in different directions. I'd rather have one agent with good context than ten without it.

Context, the harness and the decision trace

Three terms get thrown around a lot here, and they're simpler than they sound.

Context is the background. For a support agent, that's the customer's plan, open tickets, recent outages, contract terms and renewal date. For a marketing agent, it's the audience, approved claims, brand tone, legal constraints and what worked last time. It's whatever would change the answer.

The harness is the setup around the agent, a bit like the process a new employee gets on day one. It decides what information to gather, which systems to check, which tools the agent can use, when a person needs to review, and where the final decision gets saved. For the discount example, a harness might check the renewal date and contract size, compare the request against finance policy, send anything outside the normal range to a manager and save the decision along with its reason.

The third idea is the one I think matters most. Foundation Capital wrote a good piece on context graphs that names something I'd seen for years without having a word for it. Systems of record capture what happened. What they mostly miss is what Foundation Capital calls decision traces: "the exceptions, overrides, precedents, and cross-system context that currently live in Slack threads, deal desk conversations, escalation calls, and people's heads."

Your CRM can show that a customer got a 20% discount. It probably can't show that the discount was approved because they'd had several outages, were at risk of churning, and a similar exception went through last quarter. That missing "why" is where a lot of a company's judgment lives. When nobody captures it, people rediscover the same reasoning over and over (or make a new decision without knowing about the old one).

A context graph tries to keep that reasoning as connected memory. The customer links to the contract, the contract to the renewal, the renewal to the discount request, and from there to the policy, the exception, the approver and the reason it was allowed. None of those facts is special on its own. The connections are what turn records into something an agent can act on.

Why the 20% discount was approved

What the CRM shows

20% renewal discountApproved

What the decision trace adds

Service historySeveral outages put the renewal at risk.
PrecedentA similar exception was approved last quarter.
DecisionFinance approved the exception because of the outage history.
Illustrative decision trace. The discount is the recorded outcome. The connected evidence explains when the exception might apply again.

Memory that agents inherit

There's a lot of energy right now around giving AI a durable memory. Andrej Karpathy's LLM Wiki describes "a pattern for building personal knowledge bases using LLMs," where the model "incrementally builds and maintains a persistent wiki" instead of rediscovering everything from raw files on every question. Garry Tan's GBrain pitches itself as a way to "give the agent you already use a memory you control." Both are personal versions of the same pattern, a place where knowledge, decisions and relationships accumulate so the system doesn't start from zero.

Companies need the company version. For a B2B company, I'd want that memory to connect products, audiences, use cases, claims, proof points, objections, competitors, decisions and approved language. If a claim depends on a specific proof point, the agent should know. If legal approved a phrase for one market and not another, the agent should know that too.

The part people underestimate is upkeep. A context graph that depends on someone summarizing decisions after the fact becomes yet another database nobody updates. The systems that work capture context while the work is happening, as a side effect of the harness doing its job.

That changes what people do, too. Someone has to decide what gets remembered, what's trusted, what gets retired and what agents are allowed to act on. I think of it as context stewardship, and I expect it to quietly become part of a lot of jobs.

Where context sits in the five layers

In my SaaSpocalypse five-layer picture, context sits right next to the systems of record. The systems of record hold the final state: the price, the ticket, the field that changed. Context holds the meaning and the history around it. The harness is how agents use both safely, and signals are what bring the right context to the right moment. The durable work that carries context from one run to the next is what I wrote about in Artifacts Are the New Blackboard.

Context is also what makes the in-between company from my Forty post possible. That company has a shared product at the core and an implementation shaped for each customer, and what makes each implementation unique is mostly that customer's context.

If you want one place to start, take a decision your team makes every week (a discount, an exception, a content approval) and write down the last five, with the reason for each. That's a tiny context graph. Then notice how much of it lived only in someone's head.

I do a smaller version of this in Story Engine. I give it the audience and rules for each series once, and it plays the setup back before I let it create the specialists. That's my chance to fix a misunderstanding before the researcher and writer both start making decisions based on it.

Originally published on The Agentic Practice as "Context Is the New Competitive Advantage" (January 28, 2026) and "The Hidden Map AI Needs to Do Real Work" (May 23, 2026). Rewritten and combined for mocherif.com.

Sources