LLM Context Management
LLM: Large Language Model
Overview
This field studies how language models and agents can use conversation history, documents, tool outputs, and memory when their working context is limited or grows costly. Common approaches include truncation and summarization, relevance-based retrieval, structured or external memory, and adaptive policies that decide what to retain, restore, or discard; some systems also manage attention or KV-cache state directly. Methods are tested on tasks such as long-horizon search, coding, multi-turn question answering, and tool use. The central tension is reducing tokens, latency, and cost without losing evidence, dependencies, or safety constraints needed for later decisions, and results vary substantially by task and model.
Latest papers
251 papers37 papers in the last four weeks, up 48% on the four weeks before. 0.2% of all new papers.
Structured Prompt Language: Declarative Context Management for LLMs
Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?
To Retrieve or To Think? Cross-Boundary Context Evolution for Multi-hop Complex Reasoning
CaveAgent: Transforming LLMs into Stateful Runtime Operators
LLM-as-Text-Generator'' to LLM-as-Runtime-Operator.'' CaveAgent introduces a dual-stream architecture that inverts the conventional paradigm: rather than treating the LLM's text context as the primary workspace with tools as auxiliary, CaveAgent elevates the persistent Python runtime as the central locus of state, with a lightweight semantic stream serving as its orchestrator. Beyond leveraging code generation to resolve interdependent sub-tasks (e.g., loops, conditionals) in a single step, CaveAgent introduces Stateful Runtime Management: it injects, manipulates, and retrieves complex Python objects (e.g., DataFrames, database connections) that persist across turns, unlike existing code-based approaches that remain text-bound. CaveAgent further provides a runtime-integrated skill management system that extends the Agent Skills open standard, enabling ecosystem interoperability through executable skill injections. This persistence mechanism serves as a high-fidelity external memory that reduces context drift in multi-turn interactions and preserves processed data for downstream applications without information loss. Evaluations show consistent improvement across challenging benchmarks, enabling CaveAgent to handle data scales that cause context overflow in both JSON-based and code-based agents. The accessible runtime state further provides programmatically verifiable feedback, enabling automated evaluation and reward signal generation without human annotation and establishing a structural foundation for future research in Reinforcement Learning with Verifiable Rewards (RLVR).