@bojie_li: If you run LLM agents in production you know the tax. Every turn re-reads the same long context — a system policy, tool…
Summary
Researchers introduce Programmable KV Cache, a method for editing and composing KV caches to avoid re-prefilling long contexts during LLM agent inference, achieving 53–398× reduction in p90 time-to-first-token while maintaining decision identity.
View Cached Full Text
Cached at: 07/07/26, 01:32 PM
If you run LLM agents in production you know the tax. Every turn re-reads the same long context — a system policy, tool specs, retrieved docs — and prompt caching (Anthropic’s, OpenAI’s) only helps across an exactly shared prefix. Change one token early — a timestamp, a user id, an order’s status — and the keys and values of every later token are invalidated. Your support agent flips “order #4471: in transit” and pays to re-prefill 10,000 tokens it computed a second ago.
So you try the obvious surgery: refresh just that field’s keys and values, keep the rest. The model promptly acts on the old value, as if the edit never happened. That puzzle bugged me for weeks — until we traced the cause, causally, across four model families: transformers don’t defer their reasoning to decode time. At prefill the model has already written the field-conditioned conclusion onto downstream tokens — onto the aggregator and delimiter tokens later positions read through. The field’s own KV drives under 1% of the decision. The KV cache isn’t a frozen byproduct; it’s a notebook of memoized conclusions.
Read it that way and two powers fall out. Editable: don’t recompute the notes, amend them — an append-only “erratum” (“X is now Y”) overrides the stale conclusion. Composable: the notes are position-portable, so a precompiled skill can be RoPE-repositioned and spliced into any context, indistinguishable from full recompute (logit cosine 0.90–0.999 across twelve models) at O(L) instead of O(L²).
The muscle: because the erratum is append-only it rides on top of production prefix caching rather than fighting it — in a live vLLM benchmark it keeps a 98.5% cache hit-rate and cuts p90 time-to-first-token 53–398×, decision-identical to full recompute. A KV cache you can program, not just extend.
Site: https://01.me/research/programmable-kv… Code: https://github.com/19PINE-AI/programmable-kv… Paper: https://arxiv.org/abs/2606.17107
Similar Articles
@IntuitMachine: PEEK: The 1k-Token Map That Just Killed the Long-Context Tax Your LLM agent is reading the same 50k-token codebase for …
Microsoft introduces PEEK, a 1,024-token 'context map' that caches orientation knowledge for LLM agents, cutting redundant reasoning and achieving up to 34% accuracy gains with 93–145 fewer retries and 5.8× cost reduction.
@akshay_pachaar: https://x.com/akshay_pachaar/status/2074502882812952666
A practitioner's guide to KV cache management, introducing the open-source LMCache architecture that cuts input token costs by 90% and speeds up LLM inference by up to 14x by eliminating redundant context processing in agentic workflows.
TokenPilot: Cache-Efficient Context Management for LLM Agents
TokenPilot is a dual-granularity context management framework that reduces inference costs in long-horizon LLM sessions by stabilizing prompt prefixes and conservatively managing context segments, achieving 61-87% cost reduction on benchmarks while maintaining competitive performance.
TTKV: Temporal-Tiered KV Cache for Long-Context LLM Inference
TTKV introduces a temporal-tiered KV cache that mimics human memory to cut 128K-context LLM inference latency by 76% and double throughput while reducing cross-tier traffic 5.94×.
@techNmak: Your LLM inference is burning 50% of its compute on work it has already done. If you're running RAG or Multi-Turn Chat,…
LMCache is an open-source library that makes KV cache persistent and shareable across requests, eliminating recomputation in RAG and multi-turn chat workloads, achieving up to 15x throughput gain and 3-10x reduction in time-to-first-token.