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 StoicaarXiv 2025 · DOI

Abstract

As Large Language Model (LLM) usage evolves from simple one-shot queries to complex agentic workflows, existing serving engines struggle with inefficiencies like Head-of-Line (HoL) blocking and poor context reuse. We present Autellix, a novel serving engine that treats agentic workflows as first-class "programs." By implementing program-aware scheduling and locality-aware load balancing, Autellix achieves a 4–15× throughput improvement over state-of-the-art systems like vLLM while maintaining superior tail latency.

The Shift to Agentic Programs

The paradigm of LLM interaction is shifting. We have moved beyond simple chatbots to agentic programs—complex workflows involving loops, tool calls, self-reflection, and multi-threaded searches such as Monte Carlo Tree Search (MCTS).

Figure 1: Examples of agentic workflows, ranging from simple chatbots to complex multi-threaded MCTS agents.

Despite this shift, current serving engines remain "program-agnostic," treating every LLM call as an independent, isolated event. This leads to two critical inefficiencies:

  1. Head-of-Line (HoL) Blocking: Long-running requests from one program can stall short, quick requests from others.
  2. Context Blindness: Schedulers fail to recognize that multiple calls belong to the same agent session, missing opportunities to reuse Key-Value (KV) caches efficiently or prioritize calls on a program's critical path.

Methods: Architecture of Autellix

Autellix addresses these gaps by treating agentic programs as structured execution units rather than random requests. Its architecture focuses on three core optimizations: scheduling, locality, and memory management.

Program-Aware Scheduling

Instead of standard First-Come-First-Served (FCFS) scheduling, Autellix introduces algorithms inspired by classic Operating System principles to handle varying program lengths and structures:

  • PLAS (Program-Level Attained Service): Designed for single-threaded agents, PLAS prioritizes calls from programs that have consumed the least total execution time. This allows "short" programs to finish quickly and exit the system, reducing average turnaround time.
  • ATLAS (Adaptive Thread-Level Attained Service): For multi-threaded agents like MCTS, ATLAS estimates the "critical path" of a program's Directed Acyclic Graph (DAG). It prioritizes threads that are currently holding up the entire program's completion.
Figure 3: Comparison of scheduling strategies (FCFS, MLFQ, and PLAS) for a set of concurrent LLM programs.

Locality-Aware Load Balancing

Autellix tracks which engine instance holds the KV cache for a specific program. It "pins" long-running programs to specific GPUs to maximize cache hits. The researchers found that within a single program, cache hit rates often stay above 90%. Shorter, less context-heavy requests are load-balanced to less busy engines to maintain system fluidity.

Optimized Swap Kernel

To manage the high memory pressure of concurrent agents, Autellix utilizes a custom CUDA kernel for batching KV block transfers between CPU and GPU. This reduces swapping overhead by up to 18× compared to standard implementations, significantly boosting throughput during high-load periods.

Evaluation and Key Results

The system was evaluated using representative workloads including ShareGPT (chatbots), BFCL (ReAct-style tool use), and LATS (intensive tree searches).

  • Massive Throughput Gains: Autellix consistently outperformed vLLM by 4–15× across models like LLaMA-3.1 (8B/70B) and Falcon-180B.
  • Superior Tail Latency: In nearly all tested scenarios, Autellix maintained significantly lower P95 and P99 latencies, providing a more consistent user experience under heavy load.
  • Linear Scalability: The system scales effectively as more GPUs are added, thanks to its intelligent load balancer that respects data locality without creating centralized bottlenecks.

Conclusion and Future Work

Autellix demonstrates that treating LLM agents as programs allows for significant optimizations in scheduling and memory management. While highly effective, the current system is reactive; future work may explore "speculative execution" to pre-compute likely next steps in an agent's path. Additionally, further research into graph-level optimizations, such as merging nodes in a dynamic DAG, could yield even greater efficiency gains for the next generation of AI agents.

Summary updated

BibTeX
@misc{luo2025autellix,
  author = {Michael Luo and Xiaoxiang Shi and Colin Cai and Tianjun Zhang and Justin Wong and Yichuan Wang and Chi Wang and Yanping Huang and Zhifeng Chen and Joseph E. Gonzalez and Ion Stoica},
  title = {{Autellix: An Efficient Serving Engine for LLM Agents as General Programs}},
  year = {2025},
  eprint = {2502.13965},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.13965},
}
Figure