arXiv:2610.21390cs.NIOct 2026

Manuscript Offprint

arXiv:2610.21390

PriorityFEC: Deadline-Aware Streaming FEC for KV-Cache Handoff in Edge Multi-Agent Systems

Han Shen, Qifu Tyler Sun, Fanyang Meng, Ye Wang, Yongsheng Liang

Han Shen, Qifu Tyler Sun, Member, IEEE, Fanyang Meng, Member, IEEE, Ye Wang and Yongsheng Liang

Abstract—Multi-agent large language model (LLM) systems are increasingly deployed at the edge to support complex tasks that require collaboration and information exchange among multiple agents. However, when task contexts are passed across agents, shared context that has already been processed by upstream agents often needs to be prefilled again, resulting in substantial redundant computation. Reusing an already prefilled key-value (KV) cache can avoid this recomputation, but requires the reusable KV state to be transferred across the network before the receiving agent can begin generation. Under strict time-to-first-token (TTFT) deadlines and unreliable edge links, delivering the complete KV cache may be infeasible, making it necessary to prioritize and protect the most valuable KV information within a limited transmission budget. This paper proposes PriorityFEC, a utility-aware KV-cache handoff scheme that jointly exploits model-side KV importance and transport-side reliability. PriorityFEC first constructs a utility-aware source stream by placing high-utility KV blocks at earlier transmission positions. It then protects the ordered stream using a feedback-adaptive Streaming Forward Erasure Correction (FEC) mechanism, which schedules repair packets according to receiver feedback before the TTFT deadline. We implement PriorityFEC on a distributed edge LLM serving prototype and evaluate it with Qwen2.5-7B-Instruct and Llama-3.1-8B-Instruct across multiple datasets. Results show that PriorityFEC achieves superior task quality over the compared transport schemes, with its advantages becoming particularly pronounced under stringent deadline constraints. These results demonstrate the importance of jointly optimizing KV-cache utility and deadline-aware transport reliability when reusable LLM state must be handed off across unreliable edge networks.

Index Terms—Large language model serving, KV cache, collaborative inference, KV-cache handoff, Streaming FEC, deadline-aware transport.

I. INTRODUCTION

The growing complexity of LLM-based applications is increasingly driving inference toward distributed and collaborative architectures, where multiple LLM workers or agents jointly execute tasks while maintaining a shared and continuously evolving context [1], [2]. In such systems, different agents may be dynamically activated or assigned to distinct stages of a long-running task, resulting in computation and model states being distributed across multiple edge nodes. To ensure seamless task continuation, the accumulated inference context must therefore be efficiently transferred between agents as execution proceeds, allowing newly activated agents to resume inference without reconstructing the task state from scratch.

To generate the first output token, an LLM agent must first perform a prefill stage that processes the input context

(a) Realiable Transmission

Figure

(b) PriorityFEC (ours)

Figure

Fig. 1. Motivation for deadline-constrained KV-cache handoff. (a) Reliable transport waits for loss recovery before the receiving agent can use the complete reusable KV state, delaying agent activation and TTFT. (b) PriorityFEC places high-utility KV blocks earlier in the source stream and uses FEC, allowing useful KV state to be reconstructed before the TTFT deadline.

and materializes the corresponding key-value (KV) cache, which constitutes a major component of the time-to-first-token (TTFT). During agent handoff, a newly activated agent would conventionally need to prefill the entire accumulated context before decoding can proceed. Yet, most of this context has already been processed by the upstream agent, making the repeated prefill computation largely redundant. Instead of reconstructing the same inference state from the original tokens, the upstream agent can directly transfer the materialized KV cache to the receiving agent for reuse. Such KV cache handoff eliminates redundant prefill computation and enables the receiving agent to resume inference from the existing context with substantially lower handoff latency.

KV cache reuse can eliminate redundant context recomputation only when the cached state is delivered to the receiving agent within the required time budget [3]. This condition is particularly difficult to satisfy in collaborative edge multi-agent systems, where KV states produced by an upstream agent may reside on a different edge node and must traverse bandwidth-constrained and potentially unreliable links before they can

Corresponding authors: Qifu Tyler Sun, Fanyang Meng.

be exploited by downstream agents. The challenge is further amplified for long-context inference, which can generate large KV states whose communication delay may dominate the overall handoff latency under limited network capacity. Moreover, congestion, user mobility, wireless interference, and handovers can induce bursty and temporally correlated packet losses, making timely and reliable KV delivery increasingly difficult to guarantee.

Existing KV-cache systems have largely focused on cache storage, reuse, compression, placement, and high-throughput data movement within centralized computing environments, such as data centers and GPU clusters [4], [5]. These techniques improve how reusable KV states are represented, managed, and accessed, but typically assume that the underlying interconnect can deliver the required state with sufficiently high and stable throughput. Such an assumption becomes fragile in collaborative edge inference, where reusable KV states may reside on remote agents connected through bandwidth-constrained and lossy links.

In collaborative multi-agent applications, agents are often required to make decisions and respond within stringent latency constraints. When a task is handed off to a newly activated agent, the reusable KV cache must be made available in time to support subsequent inference; otherwise, delayed state transfer can directly slow down agent activation and disrupt task coordination. Under a tight TTFT budget, waiting for the complete KV cache to be reliably delivered can be overly restrictive, especially when the cache is large, and the underlying network is lossy or bandwidth-constrained. This motivates a different transport objective: rather than insisting on eventual delivery of the entire KV cache, the transport layer should make the most useful KV state available within the limited TTFT budget. A deadline-aware and loss-tolerant KV-cache transport mechanism can therefore provide a more flexible solution by trading completeness for timely availability of task-relevant model state.

Conventional transport mechanisms are poorly matched to this deadline-aware objective. As illustrated in Fig. 1, reliable protocols such as TCP [6] and QUIC [7] ensure eventual delivery through retransmissions, but loss recovery may consume a substantial fraction of the handoff budget. Unreliable transport such as UDP avoids retransmission-induced delay, yet directly exposes the receiving agent to missing KV state. Packet-level forward erasure correction (FEC) offers an attractive alternative by recovering losses without waiting for retransmissions [8]. However, under a strict deadline, redundancy itself competes with source transmission for scarce transmission opportunities: sending more repair packets improves robustness but leaves fewer opportunities to deliver additional KV state. Moreover, conventional fixed-rate or fixed-schedule FEC treats packets largely uniformly and does not adapt redundancy to either time-varying network conditions or the receiver's decoding progress. As a result, redundancy may be wasted when delivery proceeds smoothly, while becoming insufficient during burst losses precisely when timely recovery is most critical.

The above observations expose two coupled challenges for deadline-constrained KV-cache handoff.

• First, which KV blocks should receive the earliest transmission opportunities? When the complete KV cache cannot be delivered before decode startup, different source positions have different opportunities to become available by the deadline. Treating all KV blocks uniformly can therefore waste favorable source positions on model state with limited downstream utility.

• Second, when should the limited repair budget be consumed? A fixed FEC schedule injects redundancy independently of decoding progress. Such a schedule may waste repair opportunities when transmission proceeds normally, while reacting too slowly when correlated losses cause the unresolved coding window to grow.

Motivated by these challenges, we develop PriorityFEC around two complementary mechanisms. First, a utility-aware source ordering maps model-derived KV utility to equal-size transport blocks and places high-utility blocks earlier in the transmission stream, while preserving all KV blocks for possible reconstruction. Second, a feedback-adaptive Streaming FEC mechanism protects the resulting stream by adjusting repair transmissions according to decoding progress under a predefined repair budget.

These two mechanisms address different aspects of deadline-constrained KV handoff: utility-aware ordering determines which KV states receive earlier delivery opportunities, whereas adaptive Streaming FEC determines when recovery opportunities should be introduced. Together, they improve the utility of the reconstructed KV state before the TTFT deadline without requiring packet-level retransmissions.

The main contributions of this work are summarized as follows.

• Deadline-aware KV-cache handoff. We formulate KV-cache handoff over bandwidth-constrained and unreliable edge links as a deadline-constrained transport problem, with the objective of maximizing the utility of the KV state available at decode startup rather than eventual byte completeness. Controlled KV-perturbation experiments show that equal amounts of recovered KV data can preserve substantially different levels of model-relevant information, establishing the need for utility-aware state delivery under tight latency budgets.

• Utility-Aware Source Ordering and Queue Design. We propose PriorityFEC, which maps offline model-derived KV importance scores to equal-sized transport blocks and organizes them into a utility-aware transmission queue, placing higher-utility blocks at earlier and more favorable source positions for stronger pre-deadline protection.

• Deadline-aware source–repair optimization. We formulate adaptive KV-cache protection as a finite-horizon source–repair scheduling problem under hard deadline and repair-budget constraints. Unlike fixed FEC schedules, the proposed formulation explicitly captures the opportunity cost between transmitting additional high-utility source packets and consuming transmission opportunities for loss recovery. We formulate the sequential decision process as an MDP and instantiate the scheduler using a lightweight Double DQN that adapts repair decisions to causal transport feedback and KV utility. Experimental results demonstrate that adaptive source–repair allocation is particularly beneficial in the target regime where complete KV-cache delivery is infeasible before decode startup.

References (35)