KVMem: Virtualizing Million-Token Agent Workspaces on a Consumer GPU
On the map: LLM agents and tool use → Agent memory systems
Abstract (arXiv)
Modern LLM agents operate in persistent workspaces whose accumulated history can exceed both GPU KV capacity and the model's native context window. Existing systems typically compact older context into summaries or retrieve it later as text, either losing fine-grained execution evidence or repeatedly prefilling content that the model has already processed. We present KVMem, a KV-context virtualization system that preserves overflowed workspace history as paged KV state across GPU memory, host memory, and NVMe. KVMem uses lightweight, model-native attention-space indexes to select relevant historical blocks and materializes a query-dependent execution view bounded by the model's native context window. Extensive evaluations on long-context agent benchmarks spanning histories up to one million tokens, including LongMemEval, MemoryAgentBench, and AgentLongBench, show that KVMem generally achieves higher task utility and greater inference efficiency than compaction-based approaches, the de facto standard for handling context overflow. In the DeepSWE long-context test with Qwen3.8-27B, KVMem improves task success from 43.8% with compaction-only context management to 48.4%. In our local-deployment evaluation, KVMem runs Qwen3.6/3.8-27B NVFP4 with MTP on an off-the-shelf laptop equipped with a 24,GB RTX 5090 Laptop GPU, virtualizing agent workspaces of up to 1M tokens-four times the model's native 256K-token context window. In a single-session setting, KVMem generates ~50 tokens/s, providing interactive responsiveness for local agent execution. More broadly, by decoupling addressable workspace size from the LLM's native context window, KVMem provides a practical path toward long-running agents whose workspaces can grow beyond that window.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Agent memory systems, one of 16 directions in LLM agents and tool use. Builds on 15 of its 22 references that are in the map. First posted on arXiv 4 Sep 2026.
Builds on
15 of 22 references.
Closest ancestors · 3
Same direction, newest first
- 2025Evaluating Memory in LLM Agents via Incremental Multi-Turn Interactions7 Jul
- 2025Memory OS of AI Agent30 May
- 2025Mem0: Building Production-Ready AI Agents with Scalable Long-Term Memory28 Apr
Other references · 12
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2024SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineeringcited by 1,737
- 2023MemGPT: Towards LLMs as Operating Systemscited by 1,389
- 2024RULER: What's the Real Context Size of Your Long-Context Language Models?cited by 1,346
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Modelscited by 832
- 2024LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memorycited by 707
- 2024LLMLingua-2: Data Distillation for Efficient and Faithful Task-Agnostic Prompt Compressioncited by 348
- 2024CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusioncited by 223
- 2026DeepSWE: Measuring Frontier Coding Agents on Original, Long-Horizon Engineering Taskscited by 49
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2025TokenCake: A KV-Cache-centric Serving Framework for LLM-based Multi-Agent Applications
- 2025Breaking the Boundaries of Long-Context LLM Inference: Adaptive KV Management on a Single Commodity GPU
- 2026Akashic: A Low-Overhead LLM Inference Service with MemAttention
- 2026Persistent Context Graphs for Efficient Memory Compaction in LLM Agents
- 2026PLACEMEM: Toward a Compute-Aware Memory Plane for Lifelong Agents
- 2026MemDecay: Region-Aware KV Cache Eviction for Efficient LLM Agent Inference
- 2025KVCOMM: Online Cross-context KV-cache Communication for Efficient LLM-based Multi-agent Systems
- 2026FlowState: Execution State as Memory for Long-Horizon LLM Agents