Agent Capsules: Quality-Gated Granularity Control for Multi-Agent LLM Pipelines
On the map: LLM agents and tool use → Software engineering coding agents
Abstract (arXiv)
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.
Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Software engineering coding agents, one of 16 directions in LLM agents and tool use. Builds on 4 of its 15 references that are in the map. First posted on arXiv 1 May 2026.
Builds on
4 of 15 references.
References · 4
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2023Gorilla: Large Language Model Connected with Massive APIscited by 1,302
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,107
- 2024AgentScope: A Flexible yet Robust Multi-Agent Platformcited by 120
Built on by
Citing papers per year: 2026: 1.
1 paper.
Similar, not cited
Close in wording, no citation either way
- 2026A Policy-Driven Runtime Layer for Agentic LLM Serving
- 2026TokenDance: Scaling Multi-Agent LLM Serving via Collective KV Cache Sharing
- 2026Control-Data Flow Separation: Stable Prompt Optimization in Multi-Agent LLMs
- 2026Do More Agents Help? Controlled and Protocol-Aligned Evaluation of LLM Agent Workflows
- 2025KVFlow: Efficient Prefix Caching for Accelerating LLM-Based Multi-Agent Workflows
- 2026Pythia: Exploiting Workflow Predictability for Efficient Agent-Native LLM Serving
- 2026Utility-Guided Agent Orchestration for Efficient LLM Tool Use
- 2026PipeSwift: Revisiting Pipeline Parallelism for Large-Scale Completion-Oriented Agentic LLM Serving