Memory · Software component

Context Window Manager

Software componentMemoryCognition & MemoryVariation point (abstract)arc:ContextWindowManager

A memory component that tracks and manages how much conversation, reasoning, and observation history fits within the model's context window, signalling when older context will be dropped.

Responsibility. Selects and budgets content to fit the context window.

Also known as: Context limit tracking, Context filtering, Summarization layer, Hierarchical context builder, State pruner, State pruning strategy, Context slimming, Context management, Working memory manager, Conversation history management strategy, Context pruning

reads; writesconstrains; is invoked byinvokes; constrainsis invoked byemits telemetry tosends data tois specialized byinvokesis specialized byis triggered byis specialized byis specialized byis specialized byis specialized byWorking Memory Buffer: reads; writesWorking Memory BufferPrompt Context Builder: constrains; is invoked byPrompt Context BuilderMemory Retriever: invokes; constrainsMemory RetrieverAgent Controller: is invoked byAgent ControllerTrace Collector: emits telemetry toTrace CollectorConversational (Chat) Interface: sends data toConversational (Chat) In…Summarizing History Compressor: is specialized bySummarizing History Comp…Context Compressor: invokesContext CompressorHierarchical History Compressor: is specialized byHierarchical History Com…Context Budget Allocator: is triggered byContext Budget AllocatorFull Conversation Buffer: is specialized byFull Conversation BufferSliding-Window History Truncator: is specialized bySliding-Window History T…Trajectory Pruner: is specialized byTrajectory PrunerImportance-Weighted History Retainer: is specialized byImportance-Weighted Hist…
Direct neighbourhood (hover for relationship types)

Variants

VariantWhen to choose
Full Conversation BufferChoose for moderate conversation lengths (roughly 10-20 exchanges) where perfect recall of prior turns matters; switch to sliding-window or summarizing variants when history approaches token limits.
Hierarchical History CompressorChoose for long-running conversations where historical context determines current interpretation and users reference earlier turns, accepting retrieval latency and the need to decide which history to fetch.
Importance-Weighted History RetainerChoose for goal-oriented conversations in which certain turns establish critical constraints or preferences that later turns build on, provided an accurate relevance model is available.
Sliding-Window History TruncatorChoose as the simplest bound when losing early conversation detail is acceptable.
Summarizing History CompressorChoose when early context (user goals, key facts, binding decisions) remains relevant later and naive truncation would lose it.
Trajectory PrunerChoose for multi-step agents whose trajectories accumulate dead ends, restatements and stale turns.

Relationships

invokes dependency

is invoked by dependency

reads dependency

writes dependency

emits telemetry to dynamic

is triggered by dynamic

sends data to dynamic

constrains control

Design guidance

Quantitative guidance

As stated by the sources; verify before use.

Classification

Patterns
Hierarchical contextSummarizationOn-demand retrievalBounded stateDynamic memory-retrieval budgetingTruncationHierarchical compressionImportance-weighted retention
Quality attributes
Reliability (ISO/IEC 25010 | NIST AI RMF: valid and reliable)Cost efficiencyFunctional suitability: correctness and validity (ISO/IEC 25010 | NIST AI RMF: valid)Performance efficiency (ISO/IEC 25010)
Risks mitigated
Context window exhaustionLoss of original task specificationRepetitive actions from forgotten historyLost in the middleContext pollution between agentsContext bloatUnbounded state growthContext window overflowOut-of-memory errorsLatency degradation over long conversationsSilent context truncationLost-in-the-middle effectContext accumulation across multi-turn conversationsLoss of early-conversation constraints

Sources

  1. Ch1.1A: T. Nguyen, "Designing User Interfaces for Intuitive Human-Agent Interaction," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.1A. ISBN: 9798244538229.
  2. Ch1.2: T. Nguyen, "Core Agent Patterns," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.2. ISBN: 9798244538229.
  3. Ch1.4: T. Nguyen, "Memory and Perception Systems," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.4. ISBN: 9798244538229.
  4. Ch1.6: T. Nguyen, "Stateful Orchestration - Pitfalls, Integration, and Synthesis," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 1.6. ISBN: 9798244538229.
  5. Ch3.6: T. Nguyen, "Trace Analysis and Execution Debugging," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.6. ISBN: 9798244538229.
  6. Ch3.10: T. Nguyen, "Efficiency Metrics," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 3.10. ISBN: 9798244538229.
  7. Ch5.7: T. Nguyen, "Episodic Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.7. ISBN: 9798244538229.
  8. Ch5.9: T. Nguyen, "Working Memory," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 5.9. ISBN: 9798244538229.
  9. Ch8.3: T. Nguyen, "Token Economics and Architecture," in Mastering Agentic AI Systems: Guide for the NVIDIA NCP-AAI Exam, 1st ed. 2026, ch. 8.3. ISBN: 9798244538229.
  10. Ref5.04: C. Stryker, "What is AI agent memory?," IBM Think. Accessed: Sep. 27, 2026. [Online]. Available: https://www.ibm.com/think/topics/ai-agent-memory