← Latest papers
🤖 AI

Learning Agent Execution for KV-Cache Management in Agentic Serving

This paper introduces CacheScout, an agent-aware KV-cache runtime that learns online agent execution transitions to proactively manage cache eviction and prefetching, significantly improving hit rates and reducing latency for multi-agent LLM serving without requiring predefined workflow graphs.

Original authors: Rui Zhang, Chaeeun Kim, Shaoting Feng, Kuntai Du, Yuhan Liu, Yi Zhong, Cheng-Wei Ching, Junchen Jiang, Liting Hu

Published 2026-08-18
📖 6 min read🧠 Deep dive

Original authors: Rui Zhang, Chaeeun Kim, Shaoting Feng, Kuntai Du, Yuhan Liu, Yi Zhong, Cheng-Wei Ching, Junchen Jiang, Liting Hu

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

In the modern world of artificial intelligence, a new way of building smart assistants has taken hold. Instead of asking a single, all-knowing computer brain to solve a complex problem in one go, developers now break tasks down into a team of specialized digital workers. Imagine a travel planner that first asks one agent to find flights, then hands the job to another agent to book hotels, and finally passes it to a third to locate restaurants. Each of these agents is a large language model, a type of software that predicts the next word in a sentence based on patterns it has learned. To do this, the software must hold a vast amount of information in its short-term memory, known as a key-value cache. This memory acts like a workspace where the model keeps the rules of the game, the definitions of the tools it can use, and the examples of how to behave. Every time a new agent joins the conversation, it brings its own set of instructions and examples, creating a large chunk of data that the system must process before it can start answering the user's specific question.

The challenge arises because these digital teams are dynamic. The first agent might finish its job, and the system might immediately switch to a completely different agent, or it might loop back to the first one later. Current computer systems that run these AI teams manage their memory reactively. They keep the most recently used information and discard the older stuff to make room for new requests. This works well for simple conversations, but in a multi-agent team, it creates a frustrating inefficiency. The system often throws away the fixed instructions and examples for an agent just because that agent hasn't spoken in the last few seconds, even though that same agent is likely to be called again in the very next step. When the agent returns, the system has to re-read and re-process all those instructions from scratch, wasting time and computing power. This cycle of discarding and re-learning slows down the entire operation, making the AI feel sluggish and expensive to run.

Researchers at the University of California, Santa Cruz, and other institutions have developed a new approach to solve this problem, calling it CacheScout. Instead of simply watching what has happened in the past, this system learns to anticipate what will happen next. It treats the flow of the conversation not as a random series of events, but as a pattern of transitions between different workers. By observing how often a travel agent is followed by a hotel agent, or how a coding agent might switch to a review agent, the system builds a mental map of the workflow as it runs. It does not need a pre-written script or a map provided by the developers; it learns these connections on the fly, updating its understanding with every single request it processes.

The core of this new system is a lightweight layer that sits between the AI agents and the computer hardware. When an agent finishes its task, this layer looks at the history of the conversation and predicts which agent is most likely to speak next. If the system is confident about the next step, it takes two specific actions to speed things up. First, when it needs to clear out old data to make space, it refuses to delete the instructions for the agent that is predicted to return soon, even if that agent hasn't spoken in a while. It protects these valuable chunks of memory based on their future importance rather than their past usage. Second, while the system is waiting for the next request, it quietly and invisibly prepares the memory for that predicted agent. It loads the necessary instructions into the fast memory before the user even asks for them, so that when the agent finally starts working, it can begin immediately without delay.

The researchers tested this system on real-world tasks, including planning trips, solving math problems, and writing software code. They found that by remembering the patterns of agent behavior, the system could keep the right information in memory much more often than before. In their tests, the rate at which the system successfully reused existing memory jumped by ten to eighteen percentage points. This improvement translated directly into speed. The time it took for the first word of an answer to appear dropped by as much as forty-five percent, and the overall time to complete a single turn of the conversation fell by nearly forty percent. The system also handled more requests at once, increasing the total number of tasks it could finish per second by up to fifty-seven percent.

Crucially, the researchers showed that this approach works even when the workflow is not fixed. In many modern applications, the next step is decided by the AI itself in real time, meaning the path can change unpredictably. The new system adapts to this fluidity, learning the most common paths as they happen and adjusting its predictions accordingly. It also proved effective with much larger and more complex AI models, maintaining its speed advantages even when the memory requirements were significantly higher. The system achieves all of this without slowing down the computer or requiring complex new hardware; it simply adds a small amount of intelligence to the memory management process, turning a passive storage system into an active participant that knows what is coming next.

The findings suggest that the future of efficient AI serving lies in understanding the context of the work, not just the data itself. By recognizing that a travel agent is likely to be followed by a hotel agent, the system stops treating every moment as a fresh start and begins to see the conversation as a continuous journey. This shift from reacting to the past to preparing for the future allows these digital teams to work much faster and more efficiently, removing the bottlenecks that have slowed down the deployment of complex AI applications. The result is a system that feels more responsive and capable, capable of handling the intricate, multi-step tasks that define the next generation of artificial intelligence services.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →