A Policy-Driven Runtime Layer for Agentic LLM Serving
This paper proposes a new architectural "agent runtime layer" that bridges the gap between multi-agent frameworks and LLM serving engines to enable policy-driven optimizations, demonstrating through the CacheSage system that this approach significantly improves cache hit rates, time-to-first-token, and throughput across diverse multi-agent workloads.
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
Imagine you are running a busy, high-end restaurant.
The Current Setup: A Communication Breakdown
Right now, your restaurant has two distinct layers that don't talk to each other well:
- The Head Chef (The Agent Framework): This person knows the menu, the roles of the waiters, and the specific instructions for each table. They know who is ordering and what they need. However, they never see the kitchen floor; they don't know which pots are currently on the stove or which ingredients are running low.
- The Kitchen Staff (The Serving Engine): This team sees every single order that comes in. They know exactly how many pots are boiling and how fast they can cook. But they have no idea who the customers are or what the "story" of the meal is. To them, every order is just a generic request.
The Problem: The "Seam" Where Things Break
Because these two groups don't share information, the restaurant makes inefficient decisions.
- Example: The Head Chef knows that Table 4 always orders the same appetizer before their main course. But the Kitchen Staff doesn't know this. So, every time Table 4 orders, the kitchen has to start chopping onions from scratch, even though they just did it five minutes ago for the same table.
- The paper calls this the "seam." Currently, if you want to fix this, you have to patch the Head Chef's notes or the Kitchen's workflow with a specific, one-off rule. It's messy and doesn't scale.
The Solution: The "Agent Runtime Layer" (The New Floor Manager)
The authors propose building a third layer right between the Chef and the Kitchen: a Floor Manager.
This Floor Manager has a special job. They listen to the Chef (to know the roles and identities) and watch the Kitchen (to see the cooking events). They use this combined knowledge to make smart decisions using four simple tools:
- Observe: "I see a new order coming in from the 'Planner' waiter."
- Score: "Based on history, this 'Planner' order is very important and likely to be followed by a 'Coder' order. Give it high priority."
- Predict: "I bet the next order will be from the 'Coder' waiter. Let's get their ingredients ready now."
- Act: "Go ahead and pre-warm the stove for the 'Coder' so there's no delay."
This Floor Manager acts as a universal translator. Any new rule (like "be fair to all tables" or "save energy") can plug into this manager without breaking the Chef or the Kitchen.
The Case Study: "CacheSage" (The Smart Pantry)
To prove this works, the authors built a specific Floor Manager called CacheSage to handle the "pantry" (the computer's memory, or KV cache).
- The Old Way: The kitchen throws away ingredients (memory) based on how long ago they were used. If the "Planner" waiter comes back after a break, the kitchen has to re-chop everything because the ingredients were tossed out.
- The CacheSage Way: The Floor Manager learns the patterns. They notice that "Planner" almost always leads to "Coder."
- When the "Planner" finishes, the Floor Manager says, "I predict 'Coder' is next."
- They keep the "Planner's" ingredients safe (so they don't get thrown out) and even start prepping the "Coder's" ingredients before the order even arrives.
The Results
When they tested this on five different real-world "restaurant" scenarios (complex AI tasks):
- Less Waste: They kept the right ingredients in the pantry 13% to 37% more often than before.
- Faster Service: Customers got their food 12% to 29% faster because the kitchen didn't have to start from scratch.
- More Customers: The restaurant could serve 6% to 14% more tables per hour.
In Summary
The paper argues that to make AI agents run efficiently, we can't just tweak the top layer (the logic) or the bottom layer (the hardware). We need a dedicated "middle manager" that understands both the identity of the agents and the events of the engine, using a simple set of four rules to make the whole system smarter and faster.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.