Memory · Software component
Trajectory Pruner
Software componentMemoryCognition & Memoryarc:TrajectoryPruner
A context window manager that removes useless (dead-end), redundant (restated) and expired (no-longer-relevant) information from an agent's accumulated reasoning trajectory before it is re-sent to the model.
Responsibility. Prunes waste from the agent trajectory carried in the prompt.
Also known as: Trajectory reduction, Trajectory cleaning, Context pruning
Variant of Context Window Manager abstract
When to choose. Choose for multi-step agents whose trajectories accumulate dead ends, restatements and stale turns.
Relationships
reads dependency
- Working Memory Buffer abstract Ch3.10
writes dependency
- Working Memory Buffer abstract Ch3.10
sends data to dynamic
alternative to variability
Design guidance
- SHOULD remove dead-end explorations, restated context and expired turns from trajectories while preserving task performance.
- SHOULD retain extraction results while discarding reasoning traces irrelevant to the final decision.
Quantitative guidance
As stated by the sources; verify before use.
- AgentDiet reduced input tokens by 39.9%-59.7% with identical task performance (Ch3.10).
- Loan agent: conversation history accumulated 1,800 tokens despite minimal relevance after extraction (Ch3.10).
Classification
- Patterns
- Trajectory reduction (AgentDiet)
- Technologies
- AgentDiet
- Quality attributes
- Cost efficiencyPerformance efficiency (ISO/IEC 25010)
- Risks mitigated
- Trajectory bloatContext window overflow
Sources
- 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.