Agent 流量成推理服务器特殊负载,Inferact 在 vLLM 上做前缀缓存优化
Inferact 的人在讲 Agent 请求为啥跟普通聊天不一样:每轮重发一大段相同前缀,vLLM 的前缀缓存和 KV-cache 复用才是省钱的重点。
在 DigitalOcean 的 Open Intelligence Summit 上,Inferact 的 Yifan Qiao 分享了在 vLLM 上运行 Agent 生产流量的经验。Agent 每轮都会重发很长的近似相同前缀(system prompt、tool schemas、历史记录),而只请求一次简短的 tool call 回复。这种流量形状让前缀缓存和 KV-cache 复用比单纯的 tokens per second 更关键。一旦长前缀缓存未命中,长任务的每一轮都要重新支付完整 prefill 的成本。
Agent traffic is a strange workload for an inference server.
Each turn resends a long, nearly identical prefix (system prompt, tool schemas, history) and asks for a short tool call back.
At DigitalOcean’s Open Intelligence Summit, Yifan Qiao of Inferact is giving a Serve track session on running vLLM on agentic production workloads.
That shape of traffic is why prefix caching and KV-cache reuse matter more for agents than raw tokens per second. A cache miss on a long prefix means paying for the full prefill again, on every turn of a long task.