Skip to main content
Back

Harvard's Orla Cuts Multi-Agent AI Runtime by 38% With Smarter Routing

Orla is a Harvard-built serving layer that sits above vLLM and SGLang, routing agent workflow stages across models and caching KV state at the workflow level.

Pro

  • Orla is a new serving layer for LLM agent workflows that sits above vLLM and SGLang.
  • It routes each workflow stage to an appropriate model and backend via a pluggable stage mapper.
  • Stage mapping cut wall-clock time 38% and inference cost 35% on SWE-bench Lite versus a single Qwen3-8B baseline.
  • A workflow-aware memory manager preserves KV cache across stages, reducing time-to-first-token distribution.
  • Backends are OpenAI-compatible HTTP endpoints, swappable by changing one env var between SGLang, vLLM, and Ollama.
  • Open source at github.com/dorcha-inc/orla with GPU and laptop-CPU reproduction paths.

Building a multi-agent system today usually means gluing together an orchestration framework like LangGraph with an inference engine like vLLM, then hoping the seams hold. A new library called Orla, from researchers at Harvard and Boston University, argues that the seam itself is the problem, and it slots a new serving layer in between to handle stage routing, scheduling, and KV cache decisions that neither the framework nor the engine can see.

Orla acts as a serving layer above existing LLM inference engines: developers define workflows composed of stages, while Orla manages how those stages are mapped, executed, and coordinated across models and backends. The pitch is simple: treat the workflow, not the individual request, as the unit of optimization.

Why request-level serving falls short

Modern agent workflows are heterogeneous by nature. Within a single workflow, different stages often have different computational requirements. For example, a routing or summarization step may benefit from a small, fast model, whereas a synthesis or code-generation step requires a larger, more capable one. Stages may also run on different backends like SGLang, vLLM, or Ollama, each with their own scheduler.

Engines like vLLM handle continuous batching and paged KV cache brilliantly, but only for the single request in front of them. They have no idea that a summarization call will be followed by three tool invocations and a synthesis step that reuses the same context prefix. As a result, cache entries may be evicted in the middle of a workflow, forcing expensive re-prefill when the next stage executes.

Orla architecture diagram showing stage mapper, workflow orchestrator, and memory manager sitting above LLM backends

Three moving parts

Orla splits its control plane into three components that operate on a DAG of stages:

  • Stage mapper assigns each stage to a model and backend. Orla includes a OneBitStageMapper that uses a lightweight LLM call to classify each request as "simple" or "complex" and routes it to a light or heavy model accordingly. Explicit developer-specified mappings are also supported.
  • Workflow orchestrator does two-level scheduling. A stage scheduler picks which stage queue to serve, and a request scheduler picks the next request inside that queue. Developers can easily add custom policies; for example, adding a Shortest Job First (SJF) stage scheduler based on prompt length requires fewer than 20 lines of code.
  • Memory manager handles KV cache across stage boundaries with three built-in policies: preserve on small context increments, flush at workflow boundaries, and flush under memory pressure.

The whole thing talks to backends through an OpenAI-compatible HTTP API, so switching between backends requires only changing the endpoint URL in the stage configuration.

The numbers

The team evaluated Orla on SWE-bench Lite (2,294 requests) and a math reasoning dataset with multi-stage workflows. The baseline was every request going to Qwen3-8B on a single vLLM instance.

With the OneBitStageMapper routing simple prompts to Qwen3-4B and complex ones to Qwen3-8B, out of 2,294 requests, 956 are routed to the lightweight Qwen3-4B model and the rest execute on Qwen3-8B. This heterogeneous execution reduces wall-clock time by 38% (Figure 2a) and mean completion time by 60% (Figure 2b) compared to the single-model baseline. Because the lightweight model is cheaper per token in cloud deployments, stage mapping also reduces estimated inference cost by 35%.

On the cache side, comparing workflow-level flushing against a naive flush-after-every-request policy improved time-to-first-token across the entire latency distribution by reusing cache between consecutive stages on the same backend.

What it is and is not good for

Orla is useful when you have a genuine multi-stage workflow with mixed complexity, and especially when consecutive stages share long context prefixes such as tool call transcripts or accumulated reasoning. The customer support demo they ship walks through a classify then policy_check then reply pipeline where the classifier runs on a 4B model and the heavier reasoning runs on 8B, with cache preserved between the same-backend hops.

It is less compelling when your workload is a single monolithic prompt or when you already have a bespoke controller tuned for one model on one backend. Orla also does not optimize prompts themselves, which is DSPy's job, and it does not replace higher-level agent frameworks like LangGraph or AutoGen. It sits between them and the inference engine.

Availability

Orla is open source and available on GitHub. The repo ships a docker-compose setup with two reproduction paths: a GPU path using SGLang or vLLM with Qwen3-4B and Qwen3-8B, and a laptop path using Ollama with Qwen3 0.6B and 1.7B on CPU. The same workflow definition runs against either, which also makes Orla usable as a research testbed for anyone studying agentic scheduling or KV cache policies without needing GPU infrastructure.