arXiv:2605.00410cs.CLcs.AI2026-05

智能调度多代理任务,既省token又保质量。

Agent Capsules: Quality-Gated Granularity Control for Multi-Agent LLM Pipelines

论文配图:Agent Capsules: Quality-Gated Granularity Control for Multi-Agent LLM Pipelines
图 1 · 摘自论文原文
  • 按质量动态控制代理合并粒度,避免提示压缩导致性能下降。
  • 在14代理和5代理任务中,减少42%~68%的token消耗,质量不降反升。
  • 无需调参或训练,自动适配不同模型与任务结构,适合工程化部署。

多代理系统每轮通常需调用N次LLM,合并调用可节省token,但简单合并会因工具丢失和提示压缩而降低质量。本文提出Agent Capsules,一种自适应执行运行时,将多代理执行视为带质量约束的优化问题。该系统测量每组协调开销,评估组合机会,选择三种合并策略之一,并基于滚动平均输出质量决定是否切换模式。实验表明,向合并调用注入更多上下文反而加剧压缩,因此框架采用渐进式策略(标准→双阶段→顺序)逐步恢复质量,而非重写提示。在多种设置下,控制器在每个(模型、分组、模式)组合上表现等同于人工调优的基准:仅当质量达标时才合并,否则回退至细粒度调度,且无需针对模型配置。相较于手写LangGraph实现的14代理竞争情报管道,其输入token减少51%(细粒度)和42%(合并模式),质量分别提升+0.020和+0.017;对比DSPy实现的5代理尽职调查流程,效率比未编译版本高19%,比MIPROv2高68%,质量提升+0.052。即使未启用合并模式,该系统已通过自动策略决策、缓存对齐提示与拓扑感知上下文注入实现高效运行,媲美人工与编译时基线,无需训练数据或定制开发。

原文摘要 · Abstract (English)

A multi-agent pipeline with N agents typically issues N LLM calls per run. Merging agents into fewer calls (compound execution) promises token savings, but naively merged calls silently degrade quality through tool loss and prompt compression. We present Agent Capsules, an adaptive execution runtime that treats multi-agent pipeline execution as an optimization problem with empirical quality constraints. The runtime instruments coordination overhead per group, scores composition opportunity, selects among three compound execution strategies, and gates every mode switch on rolling-mean output quality. A controlled negative result confirms that injecting more context into a merged call worsens compression rather than relieving it, so the framework's escalation ladder (standard, then two-phase, then sequential) recovers quality by moving toward per-agent dispatch rather than by rewriting merged prompts. On LLM-judged quality, the controller matches a hand-tuned oracle on every measured (model, group, mode) cell: routing compound whenever the oracle would, and reverting to fine whenever quality would fail the floor, without per-model configuration. Against a hand-crafted LangGraph implementation of a 14-agent competitive intelligence pipeline, Agent Capsules uses 51% fewer fine-mode input tokens and 42% fewer compound-mode input tokens, at +0.020 and +0.017 quality respectively. Against a DSPy implementation of a 5-agent due diligence pipeline, the framework uses 19% fewer tokens than uncompiled DSPy at quality parity, and 68% fewer tokens than MIPROv2 at +0.052 quality. Even before compound mode fires, the runtime delivers efficiency through automatic policy resolution, cache-aligned prompts, and topology-aware context injection, matching both hand-tuned and compile-time baselines without training data or per-pipeline engineering.

多代理系统推理优化运行时调度

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。