Orla: A Library for Serving LLM-Based Multi-Agent Systems

Rana Shahout, Hayder Tirmazi, Minlan Yu, Michael Mitzenmacher

TL;DR

Orla is an open-source serving library designed specifically for LLM-based multi-agent systems. By shifting optimization from the individual request level to the overall workflow level, Orla coordinates model routing, stage scheduling, and KV cache management across heterogeneous backends. This workflow-aware approach slashes mean completion latency by 60% and cuts inference costs by 35% compared to standard single-model baselines.

What Problem Does This Paper Address?

Modern LLM applications are increasingly "agentic," meaning they solve complex tasks by executing iterative workflows—cycles of reasoning, planning, and tool use structured as a Directed Acyclic Graph (DAG) of distinct stages.

However, current LLM serving infrastructure (like vLLM or SGLang) is built for request-level execution. These engines optimize individual inference calls in isolation using techniques like continuous batching and request-level KV cache eviction (e.g., LRU). They remain completely blind to the broader workflow context. As a result, developers are forced to manually glue orchestration code to serving backends. This mismatch leads to major inefficiencies:

  • Heterogeneity Blindness: Simple tasks (like routing or classification) end up running on the same massive, expensive models as complex reasoning tasks.
  • Cache Thrashing: Request-level cache managers might evict a workflow's context right before its next stage executes, forcing expensive re-prefilling.
  • Poor Coordination: There is no centralized control plane to dynamically prioritize urgent tasks or manage resources across multiple concurrent agent workflows.

Methods

Orla introduces a serving layer that sits cleanly above existing LLM inference engines, separating request execution from agent-level policy.

Orla Architecture Design

As shown in Figure 1, Orla manages workflows through three core control-plane components:

  1. Stage Mapper: Assigns each workflow stage to the most appropriate model and backend. It supports both explicit developer-defined mappings and dynamic routing (e.g., using a lightweight OneBitStageMapper to classify tasks as "simple" or "complex" and route them accordingly).
  2. Workflow Orchestrator: Enforces stage dependencies, dispatches ready stages concurrently, and manages context propagation between stages via custom builder functions. It also handles hierarchical scheduling (e.g., prioritizing latency-sensitive tasks in the backend queues).
  3. Memory Manager: Coordinates the lifecycle of the KV cache across workflow boundaries. Instead of blindly evicting cache entries, it uses workflow signals (like stage transitions and completion status) to decide exactly when to preserve or flush the cache.

Crucially, Orla treats all inference engines as plug-and-play modules via a uniform, OpenAI-compatible HTTP API. This allows developers to seamlessly mix backends (e.g., SGLang on a cloud GPU alongside Ollama on a local CPU) without changing the underlying workflow definition.

Datasets

The authors evaluated Orla using two primary datasets:

  • SWE-bench Lite (2,294 requests): Used to evaluate the performance and cost benefits of Orla's heterogeneous stage mapping.
  • DAG-MATH-Formatted-CoT (2,894 requests): Used to evaluate agent-granularity KV cache management across multi-stage reasoning workflows.

Key Insights and Ideas

  • Workflow-Aware Caching Beats Request-Aware Caching: Traditional serving engines use request-level LRU eviction policies. Orla proves that knowing the workflow topology allows for far smarter cache preservation, preventing redundant prefills for consecutive stages that share large context prefixes.
  • Heterogeneity is a First-Class Citizen: Not all agent steps are created equal. By decomposing a customer support ticket workflow into distinct stages (e.g., classify, policy_check, reply), Orla can dynamically match task complexity to model scale, maximizing both speed and cost-efficiency.
  • A Unified Control Plane Simplifies Research: Because Orla abstracts the backend, researchers can swap out real GPU clusters for lightweight CPU simulators to study multi-agent scheduling and coordination deterministically, without expensive hardware.

Key Results

Orla was evaluated against a standard single-model vLLM baseline running Qwen3-8B.

Orla Performance Metrics

As illustrated in Figure 2, Orla's stage mapping yielded massive efficiency gains:

  • Latency Reduction: It reduced total wall-clock time by 38% (Figure 2a) and cut mean completion time by 60% (Figure 2b).
  • Cost Savings: By routing simpler tasks to a smaller Qwen3-4B model, it reduced estimated cloud inference costs by 35% (Figure 2c).

Additionally, Orla's workflow-level cache management significantly improved the Time-to-First-Token (TTFT) distribution compared to standard flush-per-request baselines, validating the benefit of cross-stage KV cache reuse.

Cache Management Impact on TTFT

Limitations and Future Work

While Orla demonstrates impressive gains, a few areas remain open for future exploration:

  • Simplistic Dynamic Routing: The current dynamic routing implementation relies on a basic binary ("simple vs. complex") classifier. Developing more sophisticated, learned routing mappers could further optimize heterogeneous setups.
  • Backend API Dependency: Orla's advanced memory management features rely on backends exposing explicit KV cache control APIs (like SGLang). Engines lacking these capabilities cannot fully exploit Orla's workflow-level cache policies.

Summary updated

BibTeX
@inproceedings{shahout2026orla,
  author = {Rana Shahout and Hayder Tirmazi and Minlan Yu and Michael Mitzenmacher},
  title = {{Orla: A Library for Serving LLM-Based Multi-Agent Systems}},
  booktitle = {CAIS},
  year = {2026},
  doi = {10.1145/3786335.3813227},
}
Figure