LRAgent: Efficient KV Cache Sharing for Multi-LoRA LLM Agents

Hyesung Jeon, Hyeongju Ha, Jae-Joon Kim

Executive Summary

LRAgent is a novel framework designed to drastically reduce the memory and computational overhead of multi-agent Large Language Model (LLM) systems. By decomposing the Key-Value (KV) cache into a shared "base" component and a lightweight "adapter" component, LRAgent achieves up to a 2.46x throughput increase and 4.44x lower latency, all while maintaining accuracy nearly identical to resource-intensive, non-shared baselines.

The Problem: The Hidden Cost of Multi-Agent Systems

Modern AI workflows increasingly rely on multi-agent systems where different LLMs assume specialized roles—such as a "Planner" outlining a task, an "Actor" executing tools, and a "Reflector" evaluating the results. To optimize storage, these agents typically share a single pretrained backbone model (e.g., Llama-3) and utilize Low-Rank Adaptation (LoRA) to inject role-specific behaviors.

However, this architecture introduces a massive hidden cost: KV Cache redundancy. As agents pass long conversation histories (trajectories) back and forth, each agent independently recomputes and stores its own KV cache for the exact same text. In long-context tasks, this redundancy creates a "memory wall" and forces redundant "prefill" computations, severely bottlenecking system speed. Existing cache-sharing methods either sacrifice too much accuracy by forcing agents to share everything or require highly complex architectural overhauls.

The LRAgent Solution

The authors of LRAgent made a crucial observation: across different specialized agents, the activations generated by the shared backbone model are nearly identical (cosine similarity > 95%). The differences are almost entirely isolated within the small LoRA adapter outputs (similarity $\approx$ 0.05).

To exploit this, LRAgent decomposes the cache and introduces two primary sharing schemes:

  1. BaseShared: Agents share a single "base cache" derived from the pretrained weights, but maintain their own lightweight Low-Rank (LR) cache. This significantly reduces memory usage while preserving agent-specific behaviors.
  2. BaseLRShared: By utilizing a "Shared-A" LoRA architecture—where agents share the initial down-projection matrix—agents can share both the base cache and the low-rank cache. This allows a subsequent agent to entirely skip the prefill computation for context already processed by a previous agent.

Technical Innovation: Flash-LoRA-Attention

To make this decomposition efficient at runtime, the researchers developed a custom kernel called Flash-LoRA-Attention. Standard attention mechanisms would require expanding the low-rank cache back to its full, massive dimension before processing—a highly expensive operation.

Flash-LoRA-Attention bypasses this bottleneck by reordering the mathematics. It applies attention to the low-rank cache first and only up-projects the result at the end. By leveraging associativity ($O = P V_{base} + (P V_{lr}) B$), the computation scales with the small LoRA rank ($r$) rather than the full model dimension ($d_{out}$).

Experimental Setup

The researchers evaluated LRAgent using synthetic agent trajectories (Plan-Action-Reflect cycles) to simulate real-world multi-agent interactions. They tested the framework on two primary benchmarks requiring multi-step reasoning and tool use:

  • HotpotQA: A multi-hop question-answering dataset.
  • ScienceQA: A dataset requiring scientific reasoning and external knowledge integration.

Key Results

LRAgent demonstrates that you can share the "core" of the model's memory without losing the "personality" of the specific agent.

  • Accuracy Preservation: While a "FullShared" baseline (sharing the entire cache across agents) causes accuracy to drop by up to 5.3%, LRAgent's BaseShared method stays within 0.7% of the expensive, non-shared baseline.
  • Massive Speedups: The BaseLRShared scheme achieves up to 2.46x higher throughput and reduces Time-to-First-Token (TTFT) latency by up to 4.44x.
  • Memory Efficiency: In a standard three-agent setup, the framework reduces KV cache memory footprint by nearly 33%, bringing memory usage remarkably close to the theoretical minimum of a single-model system.
  • Scalability: LRAgent successfully handles long contexts (up to 66k tokens) without crashing, whereas standard non-shared approaches hit Out-of-Memory (OOM) errors much earlier.

Limitations and Future Directions

While LRAgent offers a massive leap in multi-agent efficiency, it has a few constraints:

  • Shared-A Requirement: The highest-performing version (BaseLRShared) requires the model to be trained with a shared down-projection matrix. Utilizing existing, independently trained LoRAs requires falling back to the slightly slower BaseShared method or retraining the adapters.
  • Agent Heterogeneity: The study primarily focused on the common "Plan-Action-Reflect" trio. Performance dynamics with dozens of highly diverse agents remain an open area for exploration.
  • Implementation Scope: Currently, the framework is optimized for specific LoRA configurations (applied to Query and Value projections). Expanding this to all linear layers introduces complex Rotary Positional Embedding (RoPE) challenges that future work will need to address.

Summary updated

BibTeX
@inproceedings{jeon2026lragent,
  author = {Hyesung Jeon and Hyeongju Ha and Jae-Joon Kim},
  title = {{LRAgent: Efficient KV Cache Sharing for Multi-LoRA LLM Agents}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=ooRukY3zjQ},
}
Figure