Case Study

The context graph and the context engine

November 17, 2026

This case study has no outside client. The client is us. We needed an agent that knew our own company, so we built the graph under it, broke it, and built it again. The same idea now runs at four scales: one member, one patient, one company and one market.

What we wanted to find out

An agent is only as good as the context it gets. A company’s context sits in six kinds of places: chat, meeting notes, the project tool, the CRM, documents and the numbers. Each one is an island. Could we join them into one map, keep it current, and hand an agent the right part of it at the moment it’s asked something?

And a second question, which mattered more later: would the same approach hold when the thing at the centre was not a company, but a patient, a member or a whole market?

What we built first, and how it failed

We took the obvious approach. We pointed a language model at everything and asked it to find the entities, draw the relationships and keep it all current.

It failed on real data. The model was free to turn meeting chatter into facts, and it did. One early graph ended up with 203 products. There were 3. The other two hundred were fragments of conversation, and they poisoned search: ask for a real product and a dozen invented cousins came back with it.

What the model proposed against what was real: 203 products where there were 3.
What the model proposed against what was real: 203 products where there were 3.

It did the same to us. Our own pipeline once minted a company called “Gmail”, because fifty-seven people in the data had gmail addresses.A stale contact record also soaked up 129 files that belonged to someone else. Each of these became a rule.

Most of what the graph needed to know was already written down in the project tools, clean and linked. The model ignored it and rebuilt it from raw text, with new names and wrong statuses. We were paying a model to reconstruct, badly, facts the company had already recorded.

The fix was not a better model. It was three rules.

Under the hood: the graph

Take structure as given. A task in a project tool already knows its project, its owner and its status. We read those as the facts they are, with no model in the way. The model works only on what no tool wrote down: the action item buried in a meeting, the decision made in passing. A thing gets into the graph because a structured source vouches for it, or because several independent sources agree. A single mention is not enough.

Keep time out of the graph. Some facts hold still: this project belongs to that product. Some move every week: the project’s status. We keep the facts that hold still in a frozen core we call the spine. Everything that moves hangs off the side as a timeline. The part you search stays small and stable.

The spine holds identity and holds still. Status, decisions and role changes hang off it as timelines.
The spine holds identity and holds still. Status, decisions and role changes hang off it as timelines.

Let people settle the names. One team says “the pricing review”. Another says “Project Lighthouse”. The words don’t look alike, so word similarity misses it. The people around them are the same people, and that is the signal we use to merge.The full argument for all three rules is in our research note, The future of AI runs on a context graph.

Under the hood: the engine

A clean graph is half the job. The other half is what we call the context engine: the part that answers an agent’s request with the right slice of the graph.

The engine reads identity from the spine and current state from the timelines, so “what is this project” and “where does it stand now” stop fighting each other. Every fact it hands over points back to its source: the email, the document, the meeting. And it carries each tool’s permissions through, so a person only ever sees what they could already see.

The tools feed the spine and its timelines. The context engine hands the agent the slice for one request, with the source of each fact and the access rules attached.
The tools feed the spine and its timelines. The context engine hands the agent the slice for one request, with the source of each fact and the access rules attached.

The engine has no opinion about which model reads from it. In Sketch, the everyday work runs on cheap, deterministic steps. When a question deserves the best model money can rent, that model plugs into the same catalogue over MCP and reads.

What runs on it today

Four systems, one idea. Each one puts a different thing at the centre.

The same idea at four scales: a context graph of one member, one patient, one company and one market.
The same idea at four scales: a context graph of one member, one patient, one company and one market.

One company: Sketch

Sketch is our own product, and the place where the graph and the engine live in full. It sits in the channels a team already talks in (Slack, WhatsApp and email) and resolves the team’s tools into one graph the whole company can ask.

It has four working parts. The agent does the reasoning. The context graph is the catalogue of every person, client and project. Automations act when something happens: a meeting ends, Sketch reads the transcript, works out what was promised and by whom, and sends the follow-ups to the people who owe them. Skills hold the procedures somebody worked out once.

Habuild runs Sketch across the whole organization, on their own infrastructure, as our first design partner. The hard part there was the entity graph: tens of thousands of entities across six tools, deduplicated with deterministic and LLM methods together.

One member: Beetu, at Habuild

Before Sketch, we built Beetu, Habuild’s member-facing WhatsApp assistant. Under it is a context graph of each member, assembled from every touchpoint: the app, WhatsApp, classes and payments. Beetu now handles over a million queries a month, about 50,000 a day. We built and maintained it with Habuild’s team for about two years, and it now belongs to them. Read the case study.

One patient: the digital twin, at Sugarfit

Sugarfit helps members manage type-2 diabetes. We fused five streams (the glucose monitor, doctor consultations, lab reports, coach meetings and in-app activity) into one profile per patient. Five services read that one profile: meal logging, a Doctor’s Co-Pilot, daily insights, SugarGPT and a glucose response model. It shipped to production and moved to Sugarfit’s team. Read the case study.

One market: the company graph, at Redseer

Redseer tracks hundreds of private companies. We built a graph where each company is one entity, with its products, business units, locations and holding structure resolved, even as names change over time. An agent on that graph drafts a full Consumer Due Diligence report in about 30 minutes. Specialists scoped the build at about six months. We delivered the core in a few weeks, then handed it to Redseer’s team. Read the case study.

Who uses it

Three client organizations run a system built on this idea in production: Habuild, Sugarfit and Redseer. Habuild runs two of them.

How it carries a million conversations

A million queries a month is not a model problem. The model is the same one everybody rents. Three decisions carry the load.

The context is assembled once, not per question. When a member writes to Beetu, nothing re-reads that member’s history from scratch. The graph already holds it. The assistant asks for one member and gets one clean picture back. That is why the answer is about the person, at about 50,000 questions a day.

The expensive model is not asked about everything. Filing, routing and noticing run on cheap, deterministic steps. The best model is called for the questions that deserve it, and it reads from the same catalogue.

Two lanes. The constant one never touches the expensive model. The rare one is why the catalogue exists.
Two lanes. The constant one never touches the expensive model. The rare one is why the catalogue exists.

Every mistake becomes a rule. The “Gmail” company became a rule: a personal email domain never vouches for a company. The contact that swallowed 129 files became a rule about when a match must hold back. Sketch now runs on roughly eighty such rules, its extraction prompt is on version fourteen, and about forty-five database tables exist only to keep the catalogue honest. Each rule has a name, a reason and the incident that created it. When one turns out wrong, we repeal that one rule.

It is the same at every scale. At Sugarfit, every signal folded into the twin made every service on top of it better. At Habuild, the work that paid off was assembling each member’s history cleanly, not tuning prompts on top.

What it does on our own company

Ask our graph about our company and it returns one node. That node unifies the company across five different names, drawn from email, the issue tracker, the meeting tool and the project tool. Nobody told it the five names were one company. The structure did.

A real node from our own graph: one identity, five names, every mention traceable to its source.
A real node from our own graph: one identity, five names, every mention traceable to its source.
Sketch · our own product · live
From 203 imagined products to the 3 real ones. One idea at four scales, in production at Habuild, Sugarfit and Redseer, and behind a WhatsApp assistant at 1M+ queries a month.

What we figured out

The model was never the problem. We had asked it to rebuild knowledge the organization already had: in its tools, in the difference between identity and time, and in its people. Reuse that structure, and spend the model only on what is missing.

Assemble the rich context object once, and everything standing on top inherits the benefit. That held for a member, a patient, a company and a market.

We are not the first to build a context graph. Graphiti, from the team behind Zep, is a good piece of work, and for a stream of plain conversation it is close to the best you can do. An organization is not a stream of plain conversation.

Read the research behind this build: The future of AI runs on a context graph and What the hell does a “company brain” even mean?