Efficient Serving for Dynamic Agent Workflows with Prediction-based KV-Cache Management

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Zheng, Haoyu, Fu, Fangcheng, Wu, Jia, Yuan, Binhang, Zhang, Yongqiang, Wang, Hao, Zhu, Yuanyuan, Yan, Xiao, Jiang, Jiawei
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866914539797217280
author Zheng, Haoyu
Fu, Fangcheng
Wu, Jia
Yuan, Binhang
Zhang, Yongqiang
Wang, Hao
Zhu, Yuanyuan
Yan, Xiao
Jiang, Jiawei
author_facet Zheng, Haoyu
Fu, Fangcheng
Wu, Jia
Yuan, Binhang
Zhang, Yongqiang
Wang, Hao
Zhu, Yuanyuan
Yan, Xiao
Jiang, Jiawei
contents LLM-based workflows compose specialized agents to execute complex tasks, and these agents usually share substantial context, allowing KV-Cache reuse to save computation. Existing approaches either manage KV-Cache at agent level and fail to exploit the reuse opportunities within workflows, or manage cache at the workflow level but assume that each workflow calls a static sequence of agents. However, practical workflows are typically dynamic, where the sequence of invoked agents and thus induced cache reuse opportunities depend on the context of each task. To serve such dynamic workflows efficiently, we build a system dubbed PBKV (\textbf{P}rediction-\textbf{B}ased \textbf{KV}-Cache Management). For each workflow, PBKV predicts the agent invocations in several future steps by fusing the guidance from historical workflows and context of the target workflow. Based on the predictions, PBKV estimates the reuse potential of cache entries and keeps the high-potential entries in GPU memory. To be robust to prediction errors, PBKV utilizes the predictions conservatively during both cache eviction and prefetching. Experiments on three workflow benchmarks show that PBKV achieves up to $1.85\times$ speedup over LRU on dynamic workflows, and up to $1.26\times$ speedup over the SOTA baseline KVFlow on the static workflow.
format Preprint
id arxiv_https___arxiv_org_abs_2605_06472
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Efficient Serving for Dynamic Agent Workflows with Prediction-based KV-Cache Management
Zheng, Haoyu
Fu, Fangcheng
Wu, Jia
Yuan, Binhang
Zhang, Yongqiang
Wang, Hao
Zhu, Yuanyuan
Yan, Xiao
Jiang, Jiawei
Machine Learning
LLM-based workflows compose specialized agents to execute complex tasks, and these agents usually share substantial context, allowing KV-Cache reuse to save computation. Existing approaches either manage KV-Cache at agent level and fail to exploit the reuse opportunities within workflows, or manage cache at the workflow level but assume that each workflow calls a static sequence of agents. However, practical workflows are typically dynamic, where the sequence of invoked agents and thus induced cache reuse opportunities depend on the context of each task. To serve such dynamic workflows efficiently, we build a system dubbed PBKV (\textbf{P}rediction-\textbf{B}ased \textbf{KV}-Cache Management). For each workflow, PBKV predicts the agent invocations in several future steps by fusing the guidance from historical workflows and context of the target workflow. Based on the predictions, PBKV estimates the reuse potential of cache entries and keeps the high-potential entries in GPU memory. To be robust to prediction errors, PBKV utilizes the predictions conservatively during both cache eviction and prefetching. Experiments on three workflow benchmarks show that PBKV achieves up to $1.85\times$ speedup over LRU on dynamic workflows, and up to $1.26\times$ speedup over the SOTA baseline KVFlow on the static workflow.
title Efficient Serving for Dynamic Agent Workflows with Prediction-based KV-Cache Management
topic Machine Learning
url https://arxiv.org/abs/2605.06472