Skip to content

Agentic Context Management: Solving Agent Memory and Cost by Treating Them as Lifecycle and Architecture Problems

A position paper + system report that names the “what does an agent hold in mind, and how” problem Agentic Context Management (ACM) and reframes it from a storage-and-retrieval question into a lifecycle question spanning ingestion, scoping, anticipation, and compaction across an organizational scope hierarchy. The economic argument is the load-bearing piece: naive context accumulation grows token cost quadratically in conversation length, crude summarization buys linear cost at an accuracy cliff, and validated compaction is the only recipe that gets linear cost with preserved fidelity. The paper introduces five primitives (architecting, ingesting, scoping, anticipating, compacting & consolidation) and reports a reference multi-tenant implementation, Maximem Synap, at 92% LongMemEval and 93.2% LoCoMo under a Section-6 configuration. Notable for Luma because it stakes out the engineering discipline around agent memory that the two filed surveys (Memory in the Age of AI Agents, Rethinking Memory Mechanisms of Foundation Agents in the Second Half: A Survey) treat only taxonomically — and it operationalizes them.

  • Production agent failure is dominated by context management, not reasoning quality — conversation histories, large prompts, tool definitions, and ballooning tool outputs cause missing recalls within and across conversations even when the underlying model reasons well [Abstract].
  • The incumbent framing of agent memory as storage-and-retrieval is too narrow; ACM is a lifecycle spanning what to remember, how to structure it, per-data-type store selection, consolidation and forgetting with preserved provenance, current-turn relevance, next-turn anticipation, and budget-constrained compaction [Abstract].
  • In production, memory must be scoped across an organizational hierarchy rather than per-user only — this scope structure is treated as a first-class primitive of the discipline [Abstract].
  • ACM decomposes into five primitives — architecting, ingesting, scoping, anticipating, and compacting & consolidation — proposed as the load-bearing surface for both engineering and evaluation [Abstract].
  • Cost curves as a function of conversation length: naive accumulation grows quadratically in tokens; crude summarization gets linear cost but with an accuracy cliff; only validated compaction achieves linear cost with preserved fidelity [Abstract].
  • Reference implementation Maximem Synap realizes the five primitives as a multi-tenant service; reports 92% on LongMemEval and 93.2% on LoCoMo under the Section-6 configuration [Abstract, §6].
  • Existing memory benchmarks miss three evaluation dimensions the category needs — latency, token efficiency, and context-rot resistance [Abstract].

The paper is a hybrid position + system report. It first delimits ACM from adjacent framings (RAG-as-storage, context engineering, KV-cache compression, parametric memory) by insisting on lifecycle over store. It then decomposes ACM into five primitives operating over an organizational scope hierarchy:

  1. Architecting — deciding what data types exist and which store each lives in (episodic, semantic, procedural, working).
  2. Ingesting — extracting and structuring conversation / tool-output content into the chosen stores.
  3. Scoping — resolving which slice of the memory graph is relevant now (organization → team → user → session).
  4. Anticipating — pre-fetching what the next turn will need.
  5. Compacting & Consolidation — budget-constrained rewriting that preserves what matters and forgets the rest with provenance.

The economic model is central to the framing: at conversation length LL, naive accumulation costs O(L2)O(L^2) tokens (each turn re-processes all prior turns), crude summarization achieves O(L)O(L) but degrades monotonically with each round of lossy rewrite, and validated compaction — compaction gated on retention of load-bearing facts — is presented as the only path to O(L)O(L) with preserved fidelity. Maximem Synap is described as the reference implementation, with concrete configuration deferred to §6 and benchmark numbers (LongMemEval 92%, LoCoMo 93.2%) as validation.

The two filed agent-memory surveys (Memory in the Age of AI Agents Forms × Functions × Dynamics; Rethinking Memory Mechanisms of Foundation Agents in the Second Half: A Survey substrate × cognitive mechanism × subject) provide taxonomy but no engineering discipline. ACM fills that gap by promoting memory operations — ingest, scope, anticipate, compact — to first-class citizens with an explicit economic model, complementing rather than duplicating the taxonomies. Sharpens the design surface for tool-use agents: the Tool-Use Agents page currently tracks memory as one design axis alongside interaction depth, cost asymmetry, and cross-domain transfer; ACM’s cost curve argument (quadratic naive vs linear validated-compaction) gives a quantitative frame for the Databricks harness-cost finding in Benchmarking Coding Agents on Databricks' Multi-Million Line Codebase that per-turn context budget dominates cost at fixed capability. Also connects to Training-Free Group Relative Policy Optimization‘s experience-library recipe — Training-Free GRPO is a specific ACM instance (external-text + experiential + evolution-heavy), and the ACM primitives (especially compacting & consolidation) are what would be needed to scale that pattern beyond ~100 examples.