Table of Contents
Fetching ...

Autellix: An Efficient Serving Engine for LLM Agents as General Programs

Michael Luo, Xiaoxiang Shi, Colin Cai, Tianjun Zhang, Justin Wong, Yichuan Wang, Chi Wang, Yanping Huang, Zhifeng Chen, Joseph E. Gonzalez, Ion Stoica

TL;DR

The paper tackles end-to-end latency and throughput challenges in serving agentic LLM programs by introducing Autellix, a program-aware, non-clairvoyant serving system. It formalizes agentic programs as DAGs and presents two scheduling algorithms—PLAS for single-threaded programs and ATLAS for dynamic multi-threaded programs—along with a data locality–aware load balancer to minimize program-level blocking and KV-cache recomputation. Across diverse LLMs and workloads, Autellix achieves 4–15x higher throughput at the same latency and up to 1.5x better throughput over conventional load balancers, while maintaining reasonable tail latencies. The work also demonstrates practical deployment aspects, including a stateful frontend, multi-engine support, and memory-swap optimizations, making it a scalable solution for agentic AI deployments.

Abstract

Large language model (LLM) applications are evolving beyond simple chatbots into dynamic, general-purpose agentic programs, which scale LLM calls and output tokens to help AI agents reason, explore, and solve complex tasks. However, existing LLM serving systems ignore dependencies between programs and calls, missing significant opportunities for optimization. Our analysis reveals that programs submitted to LLM serving engines experience long cumulative wait times, primarily due to head-of-line blocking at both the individual LLM request and the program. To address this, we introduce Autellix, an LLM serving system that treats programs as first-class citizens to minimize their end-to-end latencies. Autellix intercepts LLM calls submitted by programs, enriching schedulers with program-level context. We propose two scheduling algorithms-for single-threaded and distributed programs-that preempt and prioritize LLM calls based on their programs' previously completed calls. Our evaluation demonstrates that across diverse LLMs and agentic workloads, Autellix improves throughput of programs by 4-15x at the same latency compared to state-of-the-art systems, such as vLLM.

Autellix: An Efficient Serving Engine for LLM Agents as General Programs

TL;DR

The paper tackles end-to-end latency and throughput challenges in serving agentic LLM programs by introducing Autellix, a program-aware, non-clairvoyant serving system. It formalizes agentic programs as DAGs and presents two scheduling algorithms—PLAS for single-threaded programs and ATLAS for dynamic multi-threaded programs—along with a data locality–aware load balancer to minimize program-level blocking and KV-cache recomputation. Across diverse LLMs and workloads, Autellix achieves 4–15x higher throughput at the same latency and up to 1.5x better throughput over conventional load balancers, while maintaining reasonable tail latencies. The work also demonstrates practical deployment aspects, including a stateful frontend, multi-engine support, and memory-swap optimizations, making it a scalable solution for agentic AI deployments.

Abstract

Large language model (LLM) applications are evolving beyond simple chatbots into dynamic, general-purpose agentic programs, which scale LLM calls and output tokens to help AI agents reason, explore, and solve complex tasks. However, existing LLM serving systems ignore dependencies between programs and calls, missing significant opportunities for optimization. Our analysis reveals that programs submitted to LLM serving engines experience long cumulative wait times, primarily due to head-of-line blocking at both the individual LLM request and the program. To address this, we introduce Autellix, an LLM serving system that treats programs as first-class citizens to minimize their end-to-end latencies. Autellix intercepts LLM calls submitted by programs, enriching schedulers with program-level context. We propose two scheduling algorithms-for single-threaded and distributed programs-that preempt and prioritize LLM calls based on their programs' previously completed calls. Our evaluation demonstrates that across diverse LLMs and agentic workloads, Autellix improves throughput of programs by 4-15x at the same latency compared to state-of-the-art systems, such as vLLM.

Paper Structure

This paper contains 26 sections, 3 equations, 19 figures, 2 algorithms.

Figures (19)

  • Figure 1: Execution workflows for Agentic Programs. Agentic programs are highly dynamic execution workflows that follow a directed acyclic graph (DAG). It consists of LLM calls from one or more LLM agents and external interrupts (i.e. tool calls, humans).
  • Figure 2: Gantt chart of LLM call execution on an LLM serving engine with a max batch size (BS) of 2 (Y-axis) over decoding steps (X-axis). (a) Four programs vary in the number of LLM calls and decode steps per call. Long programs (A, B) and short programs (C, D) are shown. (b) First-Come First-Served (FCFS) incurs head-of-line blocking as long LLM calls delay short LLM calls, resulting in a waiting time of 18 units. (c) Multilevel Feedback Queue (MLFQ) reduces blocking with preemption but still incurs program-level blocking. Programs A and B's new LLM calls are placed in the highest priority queue, delaying Program D, incurring 18 units of waiting time. (d) Program-Level Attained Service (PLAS) leverages program-level statistics, delaying subsequent calls in A and B to prioritize programs C and D, reducing waiting time to 12 units.
  • Figure 3: AI Agent Infrastructure. Top: Developers and users build and execute agentic programs that orchestrate execution and persist global, cumulative history across agents, tools, and humans. Bottom: LLM serving systems process agents' LLM calls and route calls across one or more LLM engines.
  • Figure 4: Number of LLM calls in serving engine during steady state over 1 hour. Optimizing programs' wait times increases the volume of LLM calls at steady state.
  • Figure 5: Program execution and wait times, over different programs and system loads. With moderate loads, programs spend the most time waiting. The duration of waiting depends on the workload.
  • ...and 14 more figures