Context Memory for AI: Keeping Agents and Teams on the Same Page
An agent solves a problem on Monday. By Friday, a different agent, or the same agent in a new session, has no idea that problem was ever solved. A…
An agent solves a problem on Monday. By Friday, a different agent, or the same agent in a new session, has no idea that problem was ever solved. A teammate asks a question in Slack that was already answered in a thread three weeks ago, buried under forty other messages. A support agent re-investigates a bug that engineering already root-caused and shipped a fix for. None of this is a hypothetical edge case. It is the default behavior of every AI system built on stateless context windows, and it is the single biggest reason AI agent deployments stall out after the first use case.
The root cause is architectural, not a prompting problem. Large language models have no persistent memory between sessions. Every conversation starts from zero unless something outside the model reconstructs the relevant history and hands it back in. Most teams solve this today with retrieval-augmented generation: chunk your documents, embed them, run a similarity search at query time, stuff the top results into the prompt, and hope the model finds the needle. This works for simple lookup. It fails for anything that requires understanding how information relates, changes, or supersedes itself over time. That is where context memory, as distinct from a vector database or a longer context window, becomes the actual engineering problem worth solving.
This article covers what context memory actually is, why context windows and naive RAG are not the same thing as memory, how bi-temporal context graphs solve the staleness and contradiction problems that plague most agent memory systems, and what to look for when evaluating a context management layer for production agents.
What "context memory" actually means (and why context windows aren't it)
A context window is the amount of text a model can process in a single inference call, measured in tokens. GPT-4-class models might handle 128K tokens, some newer models push past a million. Context memory is a different thing entirely: it's the system that decides which facts, decisions, and relationships get surfaced into that window in the first place, and it persists across sessions, agents, and time.
Confusing the two leads to a common and expensive mistake: teams assume that because context windows keep growing, memory is a solved problem. It isn't. A bigger window just means you can stuff more irrelevant tokens into a prompt before the model gets confused. Research on long-context models consistently shows performance degrades on retrieval and reasoning tasks well before the window fills up, a pattern often called "lost in the middle." Throwing 400K tokens of raw Slack history and Notion docs at a model doesn't give it memory. It gives it noise, higher latency, and a bigger bill.
Real context memory has three properties that a raw context window does not:
- Persistence: facts and decisions survive after the session ends and are retrievable by a different agent, in a different tool, days or months later.
- Resolution: contradictions, updates, and duplicate information are reconciled into a single current answer, not left for the model to guess between at query time.
- Structure: relationships between entities (this ticket relates to this customer, which relates to this contract, which supersedes this older contract) are explicit, not inferred fresh every time from unstructured text.
Without these three properties, you don't have context memory. You have a search index with a chat interface bolted on.
Why naive RAG breaks down at scale
Retrieval-augmented generation was a genuine improvement over pure prompt-stuffing, and it remains useful for pure document lookup. But standard RAG has structural weaknesses that show up predictably as usage scales past a single use case:
It has no concept of time. A vector database stores an embedding of a document chunk and a similarity score. It does not know that the pricing doc from March was superseded by the one from June. Ask a naive RAG system "what's our enterprise pricing" and it may return both, ranked by semantic similarity rather than by which one is actually current. The model then has to guess, and it guesses wrong often enough to matter.
It resolves meaning at query time, every time. Every single query re-runs the same disambiguation work: which "Acme" did the user mean, is this ticket still open, does this customer's plan include SSO. That resolution work is repeated, inconsistently, on every call, burning tokens and introducing variance into answers that should be deterministic.
It has no cross-session or cross-agent continuity. Each agent session starts a new retrieval from scratch. If Agent A figured out that a customer's integration issue was caused by a webhook misconfiguration, Agent B has no path to that conclusion unless it happens to be phrased similarly enough to match a semantic search weeks later.
It conflates relevance with correctness. Semantic similarity finds text that sounds related. It does not verify that the text is still true. A contract clause that was amended, a Slack message that was later corrected in a follow-up reply, an outdated runbook: all of these will happily surface in a similarity search because they're topically relevant, even though they're wrong.
The result is a pattern every team building agents past their first demo recognizes: the prototype impresses everyone, then accuracy quietly degrades as the knowledge base grows, contradicts itself, and drifts out of date.
Resolving meaning at write time, not query time
This is the architectural decision that matters most, and it's where most context systems get it backwards.
The standard approach resolves ambiguity at query time: a user or agent asks a question, the system retrieves candidate chunks, and the model attempts to figure out, in that single inference pass, which facts are current, which entities are being referred to, and how they relate. This is expensive (every query re-does the same reasoning work), inconsistent (the same question asked twice can get different resolutions depending on what the retriever surfaces), and it scales token cost linearly with ambiguity.
Sentra's context graph resolves meaning once, at write time. When new information enters the system, whether it's a Slack thread, a support ticket, a code change, or an agent's own output, it gets reconciled against the existing graph immediately: entities are linked, contradictions with prior facts are flagged and resolved, and outdated information is marked superseded rather than deleted. By the time an agent queries the graph, the ambiguity has already been resolved. The agent gets a single, current, structured answer instead of a pile of candidate chunks it has to reason over itself.
This shift has a direct, measurable effect on token spend, because the model is no longer spending inference cycles re-deriving context it should already have. Teams running agents on Sentra's context graph see roughly 70% lower token spend compared to naive RAG pipelines doing the equivalent work, because the expensive reasoning happens once at ingest instead of on every single query.
Bi-temporal modeling: why "when it happened" and "when we knew it" are different questions
Most memory systems, if they track time at all, track a single timestamp: when the record was created or last updated. This is insufficient for anything resembling real organizational knowledge, because organizations deal with two independent timelines constantly.
Consider a concrete casea customer's contract said they were entitled to 99.9% uptime SLA, effective January 1. In April, finance discovers a billing error and issues a corrected contract, backdated to January 1, but the correction is only entered into the system in April. Now ask: what did the customer's SLA look like on February 15th?
- Valid time: the period during which a fact was true in the real world (the corrected SLA was valid from January 1 onward).
- Transaction time: the period during which the system asserted that fact (the system only knew about the correction starting in April).
A single-timestamp system collapses these into one and gives you a wrong or ambiguous answer. A bi-temporal graph keeps both axes distinct, so an agent (or an auditor) can query "what did we know, and when did we know it" as well as "what was actually true, at any given point." This matters enormously for compliance-sensitive workflows, incident postmortems ("what information was available to the on-call engineer at the time of the page"), and any customer-facing agent that has to reason about entitlements, pricing, or contractual state that changed retroactively.
This is a core structural piece of Sentra's context graph: every node and edge carries both valid-time and transaction-time metadata, so agents reasoning over history get answers that are correct for the specific temporal question being asked, not a flattened, ambiguous merge of "current" and "past."
Context management across multiple agents and teams
Individual agent memory is a narrower problem than organizational context memory. The harder version of the problem shows up once you have more than one agent, or a mix of agents and humans, operating over the same underlying knowledge.
The failure mode here is specificAgent A (say, a support triage agent) concludes that a customer's issue is caused by an expired API key. That conclusion needs to be available to Agent B (an account management agent) without Agent B re-investigating from scratch, and without a human having to manually paste the finding into another tool. It also needs to be available to the human account manager who checks in on the customer next week, and to whatever agent picks up the thread three months from now when the customer churns and someone wants to know why.
This requires a shared, org-wide context graph rather than per-agent memory stores. Per-agent memory (the pattern most agent frameworks default to, where each agent or each session maintains its own scratchpad) actively works against this: it creates exactly the same silos that plague human teams using disconnected tools, just faster and with more agents involved. Sentra's context graph is built as a single company-wide "brain": one graph that every authorized agent and every team draws from and writes back into, with permissions and provenance tracked per node so you know which system, agent, or person asserted which fact and when.
Evaluating context management approaches: a comparison
Teams typically arrive at this decision point after already trying one or two of the simpler approaches and hitting a wall. Here's how the common approaches compare on the dimensions that actually matter in production.
| Approach | Persists across sessions | Resolves contradictions | Time-aware (bi-temporal) | Cross-agent shared memory | Token efficiency |
|---|---|---|---|---|---|
| Sentra (context graph) | Yes, org-wide graph | Yes, resolved at write time | Yes, valid time + transaction time | Yes, single shared graph | ~70% lower spend vs. naive RAG |
| Naive vector RAG | Per index, not agent-aware | No, ranks by similarity only | No, single timestamp at best | No, siloed per implementation | Low, re-resolves every query |
| Long context window only | No, session-scoped | No, model must infer | No | No | Very low, cost scales with tokens stuffed |
| Per-agent scratchpad memory | Yes, but siloed to one agent | No, no cross-check mechanism | Rarely | No, defeats the purpose | Moderate |
| Manual documentation (wikis, tickets) | Yes, but manually maintained | Depends on human diligence | No | Partial, humans must sync it | Not applicable, no token cost but high human cost |
Verdictnaive RAG and long context windows solve retrieval, not memory. Per-agent scratchpads solve continuity for a single agent but recreate silos across a team. Manual documentation is only as good as human discipline, which degrades under time pressure exactly when it matters most. A shared, bi-temporal context graph that resolves meaning at write time is the only approach on this list that addresses persistence, contradiction resolution, time-awareness, and cross-agent sharing simultaneously, which is why it's the architecture Sentra is built around.
Measuring whether your context memory actually works
Most teams evaluate context systems on vibes: "the agent seemed to remember that." This is not a rigorous enough standard for production. Concrete measures worth tracking:
- Contradiction rate: when the same question is asked twice, six months apart, do you get consistent answers reflecting the current state, or does the system surface stale and current facts with equal confidence?
- Token cost per resolved query: how many tokens does it take to get a correct, current answer, including retrieval and reasoning overhead. This is where the difference between query-time and write-time resolution shows up directly on the bill.
- Cross-agent recall: if Agent A learns a fact, can Agent B retrieve it without being told explicitly where to look? What's the latency between A writing it and B being able to use it?
- Task success on long-horizon, multi-step work: Sentra's context graph has been benchmarked at approximately 88% on Terminal-Bench 2.1, a benchmark designed around exactly this kind of multi-step, context-dependent agentic task, substantially ahead of approaches relying on naive retrieval or session-local memory.
If you can't measure these four things for your current setup, that's itself a signal that you're relying on retrieval, not memory.
Security, governance, and self-hosting considerations
Context memory that spans an entire organization is, by definition, a system that touches sensitive information: contracts, customer data, internal strategy discussions, code. Any serious evaluation of a context management layer needs to treat this as a first-class requirement, not an afterthought bolted on after the memory architecture is already decided.
Sentra is built to SOC 2 and ISO 27001 standards, and supports self-hosted deployment for teams that need the context graph to live inside their own infrastructure rather than a third-party cloud. This matters specifically because a context graph, unlike a stateless RAG index, is cumulative: it holds a growing, permanent record of organizational knowledge, including exactly the contradictions, corrections, and sensitive resolutions that make it valuable. Provenance tracking (knowing which agent, integration, or person asserted a given fact, and when) is not just a nice-to-have audit feature here. It's the mechanism that makes the bi-temporal model trustworthy in the first place, and it needs to hold up under the same compliance scrutiny you'd apply to any system of record.
Closing takeaway
Context memory and context windows solve different problems, and conflating them is why so many agent deployments work in a demo and degrade in production. A bigger window gives a model more room to reason within a single call. Real context memory gives every agent, and every person, access to an organization's accumulated, reconciled, time-aware knowledge, without re-deriving it from scratch on every query. The teams that get past the "Monday to Friday amnesia" problem are the ones that stop treating memory as a bigger retrieval index and start treating it as a graph: persistent, contradiction-resolved, bi-temporal, and shared across every agent and team that touches it. That's the architecture Sentra is built on, and it's the reason the difference shows up not just in fewer repeated questions, but in measurably lower token spend and measurably higher task success on the kind of long-horizon, multi-step work agents are actually being asked to do now.