TL;DR
AgentWeave is a high-performance serving system designed for complex LLM agent workflows. By adopting an "aggregated" architecture and introducing a novel flow decomposition mechanism, it eliminates the idle "bubbles" found in traditional pipelines and prevents long-running tasks from blocking shorter ones, resulting in up to a 1.81× throughput boost and a 2.45× reduction in average latency.
What Problem Does This Paper Address?
Modern AI agents aren't just single LLM calls; they are sophisticated workflows (or "modules") involving multiple LLM steps, document indexing, retrieval, and external tool invocations. Serving these workflows efficiently is surprisingly difficult due to two main architectural pitfalls:
- Disaggregated Architectures: Most current systems deploy different modules on separate devices. Because module latencies are highly imbalanced—for example, synthesizing an answer takes much longer than indexing a document—faster GPUs often sit idle waiting for slower ones. This creates "pipeline bubbles" that kill throughput.
- Naive Aggregated Architectures: A natural fix is to put all modules on all GPUs to keep them busy. However, this leads to request blocking. If a short request is batched with a long one, the short request is forced to wait until the long one finishes its current stage before it can advance.
As shown in Figure 3 below, the latency imbalance across different agent types is severe, making the "bubble" problem a primary bottleneck for distributed serving.
Methods
AgentWeave introduces two core technical innovations to solve the "aggregated architecture" dilemma:
- Flow Decomposition: Instead of treating a request as one giant block of work, AgentWeave treats the data moving between modules as "flows." It identifies which flows (like a list of documents to be reranked) can be split into independent "subflows."
- Semantic Preservation: For modules that require global context (e.g., a "Rerank" module needs all documents to find the top-k), AgentWeave uses supplement dependencies. This allows the system to process chunks of data while passing along the accumulated state, ensuring the final output is identical to a non-decomposed run.
- Flow-Adaptive Scheduler: Decomposing a request into too many tiny pieces adds scheduling overhead. AgentWeave uses an online optimization algorithm to dynamically pick the best decomposition size. It balances the throughput gain (from letting short requests finish early) against the cost penalty (the overhead of managing more tasks), ensuring that long-tail latency doesn't skyrocket.
Figure 1 illustrates how AgentWeave (c) compares to existing methods, showing how it breaks up long requests (R2, R4) to let short ones (R1, R3) exit the system much faster.
Datasets
The authors evaluated AgentWeave across four representative agent applications using standard benchmarks:
- RAG & Knowledge-Base RAG: Evaluated using the TriviaQA dataset.
- DeepSearch Multi-Agent: Evaluated using the GAIA benchmark for general AI assistants.
- Multimodal Generation: Evaluated using T2I-CompBench for text-to-image generation.
Key Insights and Ideas
- Data is the Unit of Work: The "aha moment" here is realizing that the bottleneck in agent serving isn't just the model weights, but the volume of data (tokens, documents, sub-queries) flowing through the graph. Decomposing the data flow is the key to unlocking parallelism.
- Aggregated > Disaggregated: By co-deploying all modules, the system can utilize all available hardware for every step of the workflow, effectively eliminating the "dead time" inherent in fixed pipelines.
- Dynamic Granularity: A fixed chunk size for decomposition is a trap. The scheduler must be "flow-adaptive," looking at the current queue state to decide if it's worth the overhead to split a task further.
Key Results
AgentWeave was tested against state-of-the-art baselines like Ayo and Autellix. The results were significant:
- Throughput: Improved by 1.81× on average.
- Latency: Reduced average latency by 2.45× and P90 (tail) latency by 2.04×.
- Robustness: The system maintained these gains across different hardware (A100 vs. H200 GPUs) and varying model sizes (from 14B to 32B parameters).
- Accuracy: Because the decomposition preserves agent semantics, there was zero drop in accuracy compared to standard serving methods.
Limitations and Future Work
- Manual Specification: Currently, developers must manually define which flows are decomposable and specify the dependencies. The authors aim to automate this "flow discovery" from general agent code in the future.
- Offline Profiling: The scheduler currently relies on offline profiles to estimate execution times. Moving toward online, real-time profile adaptation would make the system more robust to fluctuating workloads.
- Complex Environments: Future work will explore how AgentWeave handles external tool failures and multi-tenant deployments where different users might be running entirely different agent workflows on the same cluster.
Summary updated