← 首页|学术|TOPAS: Workflow-Aware Prefix-State Scheduling for Multi-Agent LLM Serving
cs.CL · 2608.25523 · 2026-08-26

TOPAS: Workflow-Aware Prefix-State Scheduling for Multi-Agent LLM Serving

Hongqiu Ni, Han Tian, Chi Zhang, Guopeng Li et al.
推理基础设施KVCache多智能体调度
💬 多智能体LLM服务中,给某agent保留长system-prompt的KV缓存能加速后续调用但挤占并发显存,TOPAS联合决定"缓存哪些前缀"与"调度哪些请求",把任务完成时间均值/p99最多降低约40%/49%,是支撑低延迟多智能体交互的基础设施拼图。

🎯 背景

前缀缓存在多智能体LLM服务中存在根本性权衡:为某agent保留长system-prompt的KV缓存能加速其后续调用,却会减少可用于批处理并发请求的GPU显存。在多阶段工作流中,现有调度器往往只优先前缀局部性或整体工作流进度中的一个,在共享KV缓存预算下单独优化任一目标都可能因下游延迟或频繁前缀替换而拉长任务级完成时间。

🔬 方法

TOPAS是一个任务导向的前缀感知调度器,联合决定保留哪些agent前缀在缓存中、调度哪些请求执行。它对候选的决策后状态打分,权衡"缩短每个任务最长剩余服务路径的预期收益"与"下游前缀复用的近期收益",并计入前缀迁移与抢占的代价,同时引入任务级老化机制防止饥饿。已在SGLang框架内实现。

📊 结果

在三个合成DAG工作负载和两个MetaGPT软件开发工作流上评测,相对每个负载/指标下表现最好的基线,TOPAS把均值/p99任务完成时间最多降低39.8%/49.4%(合成工作负载),在MetaGPT-SOP上降低均值9.8%,在MetaGPT-TL上降低均值/p99 22.0%/26.6%。

原文摘要

▶ Abstract
Prefix caching introduces a fundamental tradeoff in multi-agent large language model (LLM) serving: retaining a long system-prompt key-value (KV) cache for an agent accelerates future calls, yet it reduces the GPU memory available for batching concurrent requests. In multi-stage workflows, existing schedulers tend to prioritize either immediate prefix locality or overall workflow progress. However, under a shared KV cache budget, optimizing either objective in isolation can prolong tasklevel job completion time (JCT) through downstream delays or frequent prefix replacement. To strike a balance, we here propose TOPAS, a Task-Oriented Prefix-Aware Scheduler that jointly decides which agent prefixes to keep in the cache and which requests to schedule for execution. TOPAS scores candidate post-decision states by trading off the expected reduction in each task's longest remaining service path against the near-term benefit of downstream prefix reuse, accounting for the costs of prefix movement and preemption. A task-level aging mechanism is also incorporated to prevent starvation. We implement TOPAS within the SGLang framework and assess its performance on three synthetic DAGs and two MetaGPT software-development workflows. Compared with the best performing baseline for each workload and metric, TOPAS reduces the mean/p99 JCT by up to 39.8%/49.4% on the synthetic workloads, while lowering mean JCT by 9.8% on MetaGPT-SOP and mean/p99 JCT by 22.0%/26.6% on MetaGPT-TL.
来源: arXiv:2608.25523 · 精读由高松灯生成,基于摘要与 arXiv 页面信息