LCM is Treeova's closed-loop context system for long-running agents. It combines an append-only message ledger, RL-aware recursive summarization, and hybrid full-text + semantic retrieval so agents retain decision-grade signal across sessions without exceeding model context windows. Depth thresholds, compaction routing, token budgets, and operator prompts are intentionally withheld.
Lossless Context Management
LCM is Treeova's closed-loop context system for long-running agents. It combines an append-only message ledger, RL-aware recursive summarization, and hybrid full-text + semantic retrieval so agents retain decision-grade signal across sessions without exceeding model context windows. Depth thresholds, compaction routing, token budgets, and operator prompts are intentionally withheld.
LCM organizes memory as raw ledger, recursive summaries, and assembled working context.
The raw ledger is append-only; summaries are derived and re-derivable.
Compaction is RL-aware: outcome tags and calibration signals propagate through the summary hierarchy.
Retrieval is hybrid: full-text over the ledger plus semantic similarity over summary embeddings.
Depth thresholds, compaction model routing, and summarization prompts are withheld.
LCM is Treeova's closed-loop context system for long-running agents. It combines an append-only message ledger, RL-aware recursive summarization, and hybrid full-text + semantic retrieval so agents retain decision-grade signal across sessions without exceeding model context windows. Depth thresholds, compaction routing, token budgets, and operator prompts are intentionally withheld.
Long-running trading agents face a fundamental constraint: model context windows are finite, but the history that matters to a good decision is not. Lossless Context Management (LCM) is Treeova's answer — a closed-loop memory system that lets an agent reason over months of activity while still fitting inside a single model call.
The "lossless" claim is structural: raw inputs are never deleted. Compression happens only in derived summaries, which can always be rebuilt from the underlying ledger when the agent needs nuance the current summary lacks.
Raw ledger. An append-only record of every agent-relevant message — user input, agent reasoning, tool calls, tool results. Nothing in this layer is ever overwritten or deleted.
Recursive summaries. A tree of derived summaries that compress contiguous slices of the ledger into successively higher-level views. Summaries are themselves summarized when they grow, producing a hierarchy that scales with history length.
Assembled context. The working window the model actually sees on a given call — composed of recent raw messages, relevant summaries pulled by retrieval, and any pinned system material the agent depends on.
The raw ledger is the source of truth. When older messages would exceed the assembled context, they are summarized into the recursive layer — they are never removed from the ledger. This is the basis of the "lossless" property: any summary's nuance can be recovered, because the underlying messages still exist.
Because the ledger is append-only, audit and replay are first-class operations. The exact sequence of inputs that produced a past decision can always be reconstructed.
As history grows, contiguous slices of the ledger are compressed into summaries. As summaries grow, they are themselves compressed. The result is a hierarchy in which a single high-level summary can cover a long stretch of history while finer-grained children remain available for selective retrieval.
Summaries are not snapshots — they are re-derivable. If a downstream decision reveals that an earlier summary missed material that turned out to matter, a fresh summary can be regenerated from the underlying ledger slice without disturbing the rest of the hierarchy.
A naive summarizer treats reinforcement-learning signals as background noise and smooths them out. LCM's compaction is structured: each summary carries explicit RL metadata — outcome tags, calibration signals, lifecycle markers — alongside its prose body.
When summaries are summarized again, those structured signals propagate upward rather than being averaged away. The calibration loop downstream (see WP-10) can therefore consume summary-derived signal without losing the phase-aware fidelity it depends on.
When an agent needs old context, LCM retrieves it through two complementary channels in parallel: full-text search over the raw ledger, and semantic similarity over summary embeddings. Full-text finds exact matches the agent literally said or saw; semantic finds passages whose meaning resembles the current question even if the wording differs.
Both result sets are merged into the assembled context with provenance — the agent can tell whether a snippet is raw or summarized, and the summary level it came from.
LCM is a memory architecture, not a reasoning upgrade. It cannot make a base model smarter; it can only ensure the model has the right history in front of it.
Retrieval quality depends on how distinctively past events were recorded. Vague or repetitive ledger entries are harder to find later, regardless of the retrieval channel.
A summary derived once can lose nuance; LCM's safeguard is re-derivation from the ledger, not infallible first-pass compression.
The system assumes the underlying message stream is itself faithful. LCM cannot correct hallucinations or omissions that were never written into the ledger to begin with.
Whitepaper FAQ
What is Lossless Context Management (LCM)?
LCM is Treeova's closed-loop context system that gives long-running agents effectively unbounded memory without losing the signal that drives their decisions. It combines an append-only message ledger, recursive summarization, and a hybrid retrieval layer so an agent can recover any past detail it needs without ever exceeding a model's context window.
How does LCM work at a high level?
LCM is organized in three layers: a raw append-only ledger of every message, a tree of recursive summaries derived from that ledger, and an assembled working context that the agent actually sees. When older material would exceed the working window, it is summarized — never deleted — so the underlying truth always remains recoverable.
What does 'lossless' actually mean here?
It means the original messages are never destroyed. Summaries are derived artifacts; the raw ledger remains the source of truth. If a summary loses nuance the agent later needs, the system can re-derive a fresh summary from the underlying messages rather than losing that nuance permanently.
How are reinforcement-learning signals preserved through compaction?
Summaries carry structured RL metadata — outcome tags, calibration signals, and lifecycle markers — alongside the prose. Compaction is RL-aware: signals that drive learning are propagated upward through the summary hierarchy rather than being smoothed away as 'irrelevant context.'
How does LCM retrieve old content?
LCM uses a hybrid retrieval layer that combines full-text search over the raw ledger with semantic similarity over summary embeddings. An agent asking about a past decision gets back both the exact original messages and the summary scaffolding that contextualizes them.
What does Treeova publish vs withhold about LCM?
Treeova publishes the three-layer architecture, the append-only guarantee, the RL-aware compaction principle, and the hybrid retrieval design. Treeova withholds the specific depth thresholds, the compaction model routing, the summary token budgets, and the exact prompts used by the summarization operators.
What are the limitations of LCM?
LCM is a memory architecture, not a reasoning upgrade. It cannot make a model recall content that was never written to its ledger, nor can it correct hallucinations baked into earlier summaries — it can only re-derive a fresh summary from the underlying truth. Retrieval quality also depends on how distinctively past events were recorded in the first place.