SAGE 1.5.0 addressed durability. It introduced embedding-model versioning and background auto-maintenance so that a long-lived memory store would not degrade when an embedding model was replaced or when writes accumulated over months of operation. This document summarizes the changes made in the releases that followed, from 1.6 through 1.10, and the reasoning behind them.
The work divides into four areas: improving how the memory layer reasons over what it retrieves, adding a general context-management subsystem, instrumenting the runtime for observability, and hardening the write path for concurrent operation. Each is treated in turn below.
Background and Motivation
A memory system performs two distinct functions. The first is retrieval: locating the relevant record given a query. The second is utilization: producing a correct answer once the relevant record is present in the context window. These are separable, and by the 1.5 line the two had diverged. Retrieval quality was high. Utilization was not.
An analysis of end-to-end failures on standard conversational-memory tasks showed that the majority were not retrieval errors. In most failing cases the necessary evidence was already present in the assembled context. The model then declined a date calculation it was capable of performing, undercounted a set of items it could enumerate, or disregarded a stated preference it had been given. Improving search does not address failures of this kind, because the evidence is not missing. The releases described here therefore concentrate on utilization rather than retrieval.
Deterministic Computation in Code
The central design decision of the 1.6 and 1.7 releases is that tasks with deterministic answers should not be delegated to the language model. The model is used to extract the relevant elements from context; the result is then computed in code and supplied to the model as a completed value.
Three mechanisms follow from this principle.
Aggregation digests handle counting and summation. When a query requests a count or a total, the model is asked only to extract the distinct items as a list. The count or sum is computed in code and injected as a canonical value. A distinction is enforced between counting discrete items and summing quantities, because an earlier implementation summed incidental numbers on questions that required only a count.
Temporal-delta digests handle date arithmetic, which language models perform unreliably even when the relevant dates are present in context. The model identifies each event’s date; the interval is computed in code. The computed value is injected only when the extracted date appears verbatim in the retrieved context, which prevents a hallucinated date from influencing the result. This confidence gate is load-bearing: an earlier version without it degraded accuracy rather than improving it.
Usage guidance is a short instruction block prepended to the assembled context when memory content is present. It directs the model to enumerate every relevant item before answering, to compute intervals stepwise, to apply known user attributes, and not to abstain when the required facts are available. It adds no retrieval and no additional model calls.
Knowledge Update and Supersession
A significant fraction of memory queries concern values that change over time. A user reports living in one city, then moving to another, then to a third. The correct response to a query about the present names only the most recent value; every prior value is a distractor.
The 1.9 and 1.10 releases reworked supersession. The dual-surface design retains a verbatim record of each conversation alongside the distilled facts, which allows recall of details that were never distilled. A consequence is that a superseded value can recur many times across the raw transcript and, by sheer frequency, outweigh the single current fact. The supersession guard now marks superseded values explicitly in the assembled context and identifies the distilled fact as authoritative, so that frequency in the transcript does not determine the answer.
The 1.10.1 release corrected a subject-identity error observed in production. When a user described several family members, the system treated every person’s name as a single overwritable field, so that one relative’s name superseded another’s and the user’s own name was displaced from active memory. The correction is deterministic: the subject of a fact is derived from its sentence structure rather than from a fixed list of attributes, and a value may only replace a value belonging to the same subject. Distinct subjects can no longer overwrite one another, while a genuine change to a single subject still supersedes correctly.
The Context Engine
SAGE 1.10 introduces a context-management subsystem that operates independently of the memory layer. It governs how any input that exceeds a model’s context budget is reduced to fit, whether that input is a document set, a large tool result, or an extended conversation history. Memory is one source of such input, but the subsystem makes no assumption that memory is involved.
It is composed of a small set of primitives.
A chunker and context index provide retrieval over arbitrary content. Content is segmented, embedded, and indexed, after which queries return only the relevant passages rather than the whole corpus.
A map-reduce primitive addresses the complementary case, in which the whole corpus must be read rather than searched. It folds a large body of text through parallel map operations and a reduce step. A plan-first, sharded variant partitions the work explicitly and verifies coverage, which reduces the number of model calls required for a full scan while ensuring the material is covered.
A content router selects among these strategies. Given content and a token budget, it decides how the content should enter context: used directly if it fits, retrieved by relevance if a query is available, summarized if the whole is required, or truncated only as a last resort. The routing decision is deterministic and the heavy operations are supplied as strategies, so the router remains a thin policy layer.
The behavioral consequence is that inputs which previously exceeded the context window, and which naive truncation would have silently cut, are instead reduced to their relevant content and answered. The entire subsystem is disabled by default and does not alter existing deployments until it is enabled.
The Write Path
Two changes improve the quality of what enters the store rather than how it is read.
Dedup-on-write provides the extractor with the set of already-known facts before it writes, so that it emits only new or changed facts. Without this step, restating an existing fact in different wording accumulates near-duplicate records that enlarge the profile and consume context budget. With it enabled, a restated fact produces no new record, while a genuinely new fact is still stored.
Dedupe-aware packing addresses a retrieval failure specific to large documents. Ranked retrieval over overlapping segments frequently places several near-copies of the same passage at the top of the results, which fill the budget and exclude the distinct passage containing the answer. Packing now skips near-duplicates as it fills the budget, so a greater amount of distinct content is retained.
Traceability
Prior to this release, the provenance of a given output could not be reconstructed. SAGE 1.10 emits a span for every meaningful operation: memory extraction and retrieval, retrieval-augmented search, map and reduce operations, context assembly, each language-model call, each tool execution, the agent loop, and workflow steps. Spans are linked by a trace identifier, a span identifier, and a parent identifier, forming a tree in which any output can be traced to its root through the operations, timings, and token costs that produced it.
The active span is propagated through the call stack automatically, so nested operations attach to their parent without any context being threaded manually through application code. Spans conform to the OpenTelemetry data model and can be exported to any OTLP-compatible collector, or to a custom sink.
Instrumentation is disabled by default and imposes no cost until enabled. With tracing off, each instrumentation point reduces to a direct call of the underlying function, with no additional allocation.
Concurrency-Safe Writes
The write path performs contradiction detection followed by deduplication and storage. This is a read-modify-write sequence: it reads the current state, decides whether to supersede or merge, and then writes. When two writes for the same subject execute concurrently, and no coordination is present, both observe the pre-write state and both act, producing either a duplicate record or a lost supersession. The condition does not arise under serialized execution on a single node and appears only when writes proceed concurrently.
The 1.10 release adds a pluggable lock, following the same design as the pluggable storage interface. The default implementation is an in-process lock that serializes the write critical section per subject, which is correct for single-process deployments. For multiple replicas, or for a shared store written by many agents, a distributed lock implementing the same interface is supplied instead. Writes concerning different subjects do not contend. The behavior is verified by a test that widens the write window to make the race deterministic, reproduces the duplicate without the lock, and confirms a single write with the lock in place.
Limitations and Ongoing Work
Two limitations are stated explicitly.
The first concerns aggregation across many sessions. Questions requiring the enumeration of instances spread across a large number of sessions remain the hardest category, and the constraint is a property of extraction by the language model rather than of retrieval. The relevant instances are present in the assembled context. Adjustments to retrieval breadth, scope hints, and temporal gating did not change the outcome; only moving the enumeration into code produced an improvement, which is consistent with the diagnosis.
The second concerns scale beyond the write lock. Concurrency-safe writes remove the first obstacle to multi-replica operation. The remaining work is incremental and paginated data access, so that no single operation loads a subject’s entire history, and a measured characterization of retrieval precision at large corpus sizes using production-grade embeddings. Both are scoped and in progress.
Release Summary
| Subsystem | Role | Default |
|---|---|---|
| Deterministic digests | Counting and date arithmetic computed in code | On |
| Supersession guard | Subject-aware knowledge update, current value wins | On |
| Context engine | Budget-aware routing of oversized inputs | Opt-in |
| Tracing | Back-traceable spans, OpenTelemetry export | Opt-in |
| Concurrency lock | Serialized write critical section, pluggable | On |
Taken together, the 1.6 through 1.10 releases extend SAGE from a memory library into a runtime with three complementary layers: a memory that reasons over what it retrieves, a context engine that fits arbitrary inputs to a model’s budget, and an observability layer that records how each result was produced. The common design commitment is to perform deterministic work in code, to supply the model only the context it requires, and to keep every result traceable to its origin.