“MORTIS: Compiler-Guided KV-Cache Management for LLM Agent Programs” (2026), by Xiaoyu Ma et al. Computer Science research paper. Original abstract below, unchanged. A free PDF is available.

MORTIS: Compiler-Guided KV-Cache Management for LLM Agent Programs

Xiaoyu Ma, Jayanaka L. Dantanarayana, Savini Kashmira et al. · November 5, 2026 · Computer Science

Abstract

Existing agent serving systems divide each prompt into a reusable prefix and an opaque suffix, managing the KV-cache at this coarse granularity without distinguishing the components within each part. We observe that prompt components differ in which LLM calls share their values and how long those values remain reusable, a property we term intra-prompt heterogeneity. Our key insight is that, in frameworks that generate prompts from typed LLM function calls, these components correspond to program variables, allowing compiler analysis to recover their sharing patterns and lifetimes. We present MORTIS, a compiler-serving co-design that combines this analysis with runtime observations to improve KV-cache management. MORTIS reorders prompt components to expose additional prefix reuse and uses their predicted reuse and lifetimes to guide cache retention, eviction, and prefetching. Our evaluation shows that MORTIS achieves up to 1.99x job completion time (JCT) speedup and 1.97x throughput improvement over SGLang, with geometric-mean speedups of 1.45x and 1.49x, respectively.

Free PDF DOI: 10.48550/arxiv.2611.08638

Read papers like this every day in Nerdi

Three real papers a day, always with the original abstract. Free on iPhone.

More in Computer Science

All new Computer Science papers