Astraea: A State-Aware Scheduling Engine for LLM-Powered Agents

Hongqiu Ni, Jiabao Zhang, Guopeng Li, Zilong Wang, Ruiqi Wu, Chi Zhang, Haisheng Tan · DOI

Abstract: Large Language Models (LLMs) are increasingly being deployed as intelligent agents. Their multi-stage workflows, which alternate between local computation and calls to external network services like Web APIs, introduce a mismatch in their execution pattern and the scheduling granularity of existing inference systems such as vLLM. Existing systems typically focus on per-segment optimization which prevents them from minimizing the end-to-end latency of the complete agentic workflow, i.e., the global Job Completion Time (JCT) over the entire request lifecycle. To address this limitation, we propose Astraea, a service engine designed to shift the optimization from local segments to the global request lifecycle. Astraea employs a state-aware, hierarchical scheduling algorithm that integrates a request's historical state with future predictions. It dynamically classifies requests by their I/O and compute intensive nature and uses an enhanced HRRN policy to balance efficiency and fairness. Astraea also implements an adaptive KV cache manager that intelligently handles the agent state during I/O waits based on the system memory pressure. Extensive experiments show that Astraea reduces average JCT by up to 25.5% compared to baseline methods. Moreover, our approach demonstrates strong robustness and stability under high load across various model scales.

1. Introduction

Traditional Large Language Model (LLM) serving systems, such as vLLM, were originally architected for "one-shot" inference tasks where a user prompt leads directly to a generated response. However, the rise of LLM agents has introduced a new paradigm: autonomous systems that alternate between "thinking" (local computation) and "acting" (calling external tools like web searches or databases).

This multi-stage workflow creates a significant mismatch with existing scheduling policies. Current schedulers treat each computational segment of an agent's workflow as an independent task, leading to Head-of-Line (HoL) blocking and myopic optimization. By focusing only on the response time of individual segments, these systems fail to minimize the Global Job Completion Time (JCT)—the total duration from the initial user request to the final agent output.

2. The Astraea Architecture

Astraea is designed as a lifecycle-centric inference engine that tracks the state of an agent across its entire execution. Its architecture is built around three core innovations designed to handle the unique dependencies of agentic workflows.

Astraea System Architecture: Integrating prediction and state-aware scheduling to manage the agent lifecycle.

2.1 Service Time Predictor

To optimize scheduling, Astraea must estimate the duration of future tasks. It utilizes offline profiling for "Prefill" stages, a length oracle for "Decode" stages, and category-based statistical modeling to estimate the latency of external API calls. This allows the system to distinguish between fast utility APIs and slower services like image generation.

2.2 Stateful-MLFQ Scheduler

Astraea replaces standard queues with a Multi-Level Feedback Queue (MLFQ) that operates on two levels:

  • Macro-level: It uses "Token Cost" as a deterministic metric to migrate requests between priority levels. I/O-bound requests that yield to APIs quickly are prioritized, while compute-heavy requests are demoted to prevent them from monopolizing resources.
  • Micro-level: Within each queue, Astraea employs an enhanced Highest Response Ratio Next (HRRN) policy. This balances efficiency by prioritizing shorter remaining tasks while ensuring fairness by increasing the priority of tasks that have waited longer.

2.3 Adaptive KV Cache Manager

During external API waits, the system must manage the agent's "memory" (the KV cache). Astraea dynamically chooses between Preserving the cache in GPU memory for low latency, Swapping it to CPU to balance resources, or Discarding it to save memory (requiring recomputation) based on real-time system memory pressure.

3. Evaluation and Results

Astraea was evaluated against baselines including vLLM (using FCFS, SJF, and LAS policies) and Infercept, utilizing a diverse dataset of agentic sub-tasks such as arithmetic operations, multi-hop QA, and image generation.

Performance of Astraea vs. baselines under varying memory availability and query loads.

3.1 Efficiency and Speedup

Experimental results demonstrate that Astraea significantly outperforms existing methods, reducing average JCT by up to 25.5% compared to vLLM-FCFS. The system's ability to account for the entire request lifecycle allows it to avoid the pitfalls of segment-level scheduling.

3.2 Robustness Under High Load

Astraea exhibits remarkable stability under stress. In scenarios with high query rates (5 QPS) and severe memory pressure (only 30% availability), Astraea’s JCT increased by only 16.2%, whereas baseline methods like vLLM-SJF saw JCT skyrocket by nearly 52%. This robustness is attributed to the adaptive KV cache management and the state-aware prioritization of the MLFQ scheduler.

4. Conclusion

Astraea represents a shift in LLM serving from segment-based optimization to holistic lifecycle management. By integrating service time prediction with state-aware scheduling and adaptive memory management, Astraea provides a scalable and efficient foundation for the next generation of LLM-powered agents. Future work will explore more sophisticated real-time latency tracking for stochastic API services and integration with disaggregated prefill/decode architectures.

Summary updated

BibTeX
@misc{ni2025astraea,
  author = {Hongqiu Ni and Jiabao Zhang and Guopeng Li and Zilong Wang and Ruiqi Wu and Chi Zhang and Haisheng Tan},
  title = {{Astraea: A State-Aware Scheduling Engine for LLM-Powered Agents}},
  year = {2025},
  eprint = {2512.14142},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.14142},
}
Figure