Cortex: Workflow-Aware Resource Pooling and Scheduling for Agentic Serving

Nikos Pagonas, Yeounoh Chung, Kostis Kaffes, Arvind KrishnamurthyarXiv 2025 · OpenReview

Abstract

We introduce Cortex, a prototype workflow-aware serving platform designed for agentic workloads. The core principle of Cortex is stage isolation: it provisions dedicated resource pools for each distinct stage of an agentic workflow. This simple yet powerful strategy mitigates inter-stage interference in compute and memory, leading to better KV cache utilization, higher throughput, and more predictable performance. By customizing resource allocation and scheduling within each distinct stage of agentic workflows, Cortex lays the groundwork for more advanced, agent-native serving paradigms, including malleable resource management, speculative execution of workflow branches, and a shared, multi-tiered cache for "agentic state."

Introduction

Most current Large Language Model (LLM) serving platforms are "workflow-agnostic," treating every request as an isolated, independent call. However, modern AI agents—such as Natural Language-to-SQL (NL2SQL) bots—follow complex call graphs involving iterative loops of reasoning and tool use. When these heterogeneous stages (e.g., generation, execution, error-fixing) share the same hardware pool, they suffer from inter-stage interference, cache inefficiency due to context bloat, and unpredictable tail latency. Cortex addresses these challenges by moving away from generic resource pools toward dedicated engine pools for specific workflow stages.

System Architecture and Methods

Cortex is built on the principle of Stage Isolation. Instead of a monolithic resource pool, Cortex partitions GPUs into dedicated engine pools for specific workflow stages.

Figure 1: The Cortex architecture illustrating stage isolation for an NL2SQL agentic workflow.

Key components include:

  • Dedicated Engine Pools: Specialized pools handle specific tasks, such as initial SQL generation or error correction, preventing long-running tasks from delaying quick ones.
  • Workflow-Aware Orchestrator: This component tracks the request lifecycle, calculates "SLO slack" (remaining time before a deadline), and prioritizes calls accordingly.
  • Stage-Local Scheduling: Each pool maintains its own queue and scaling policy, allowing the system to scale specific bottlenecks independently.
  • Opportunistic Resource Sharing: While pools are isolated, the orchestrator allows compatible stages to "borrow" idle engines to ensure high hardware utilization.

Evaluation and Key Results

The system was evaluated using a production-grade NL2SQL agentic workflow consisting of SQL generation, execution, and iterative error fixing. The performance of this workflow under standard "Co-location" (shared serving) was compared against Cortex's "Isolation" approach.

Memory Efficiency and Throughput

The most significant finding was the impact on memory efficiency. In a shared engine, the system must keep prompts for every stage hot in memory. By isolating stages, an engine only needs the context for its specific task.

Figure 2: Comparison of KV cache usage between co-location and stage isolation.

As shown in Figure 2, Cortex reduced the total KV cache footprint by approximately 50%, dropping from ~8000 tokens to ~4000 tokens. This memory reclamation enables larger batch sizes, directly increasing total throughput and providing more predictable tail latency by eliminating cross-stage interference.

Discussion and Future Work

Cortex serves as a foundation for future "agent-native" features. Potential advancements include malleable workflows that swap models based on resource availability, speculative execution of workflow branches to reduce latency, and a shared multi-tiered cache for "agentic state" to enable result reuse across concurrent agents. A remaining challenge is the design of standard interfaces that allow developers to easily declare these complex workflows to the underlying hardware.

Summary updated

BibTeX
@misc{pagonas2025cortex,
  author = {Nikos Pagonas and Yeounoh Chung and Kostis Kaffes and Arvind Krishnamurthy},
  title = {{Cortex: Workflow-Aware Resource Pooling and Scheduling for Agentic Serving}},
  year = {2025},
  eprint = {2510.14126},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.14126},
}
Figure