RAOP: Step-Level Resource Orchestration for LLM Agents across Edge and Cloud

Jinze Li, Xin Yang, Shuo Yang, Jinfeng Xu, Edith Cheuk-Han NgaiNeurIPS 2026

TL;DR

When an LLM agent runs across your phone and the cloud, deciding where each step executes doesn't just change how fast that single step finishes—it alters the generated text, tool calls, and cache states for the rest of the task. The authors introduce RAOP, a reinforcement learning policy that orchestrates agent steps by optimizing for the entire future trajectory rather than making short-sighted, one-step guesses. The result: cloud-level task accuracy with over 50% lower tail latency and 73% less data transfer.

What Problem Does This Paper Address?

Imagine an AI agent living partly on an edge device (like a robot or smartphone) and partly in the cloud. The cloud has massive, smart models, while the edge has zero wide-area network lag and keeps data local. How do you decide where to run the computation?

Traditional cloud offloading and "query routers" treat an incoming prompt as a static package: inspect the prompt, pick a server, and run it. But LLM agents don't work like that. Agents operate in loops—they think, call a tool, read the output, and rethink.

Crucially, the scheduler helps create the future workload. Sending step 1 to a smaller edge model produces different text (and perhaps a different tool call) than sending it to a 72B cloud model. Furthermore, bouncing back and forth destroys KV-caches—meaning if you switch servers mid-conversation, you have to re-upload and re-process the missing conversation history ("prefix replay"). The authors call this an endogenous, sequentially revealed workload (ESRW). Because current choices reshape future states, greedy, step-by-step schedulers leave massive performance on the table.

Methods

To solve this, the authors formalize agent scheduling as a controlled trajectory Markov Decision Process (MDP) and build RAOP (Resource Aware Orchestration Policy).

Here is what makes RAOP tick:

  • Causal Two-Stage Decisions: Instead of routing a whole prompt or blindly bundling generation and tool use together, RAOP decouples them at every step. First, it chooses where to generate the next message. Only after observing that message—and seeing if it actually invokes a tool—does a second policy head decide where to execute the tool.
  • System-Aware Workload Prediction: Using a Qwen2.5-3B encoder (with a lightweight LoRA adapter), RAOP predicts token lengths and payloads for candidate placements. It explicitly tracks system state: network bandwidth, cloud queue depth, edge KV-cache occupancy, and exactly how much prompt prefix each backend already has cached.
  • Full-Trajectory RL (GRPO): Rather than optimizing a hand-written cost formula for the next step, RAOP is trained via Group Relative Policy Optimization (GRPO)—a critic-free RL algorithm—rewarded directly on final task success and measured end-to-end wall-clock latency.
  • Action-Conditioned Replay Simulator: Training an RL router online against a live 72B model is prohibitively expensive and hard to reproduce. The authors cleverly pre-collect a library of real LLM and tool executions across diverse placements, then replay those exact language continuations while dynamically recalculating physical network, queue, and cache timings.

Datasets

The authors evaluate RAOP across three established agent benchmarks covering distinct workload dynamics (no new benchmarks are introduced, though they build an action-conditioned trajectory library from them):

  • GSM8K: Math word problems (tests multi-step generation and prefix cache reuse without external tools).
  • HotpotQA: Multi-hop question answering (exercises retrieval-tool placement alongside growing prompts).
  • WebShop: Interactive e-commerce navigation (long episodes with heavy HTML observations and frequent opportunities to switch backends).

Key Insights and Ideas

  • The "Butterfly Effect" of Placement (Endogeneity): Using a mathematical Bellman-regret bound, the authors show that myopic (one-step) policies fail proportionally to how much a placement decision alters future states. Empirically, as tasks exhibit higher "endogeneity" (measured by how much next-token probabilities and system states diverge under different placements), RAOP's advantage over greedy routing steadily climbs.
As episode-level endogeneity increases, the success rate gap between RAOP and a greedy analytical baseline grows substantially.
  • System Orchestration $\neq$ Just Model Routing: What if every tier runs the exact same model (Qwen2.5-7B)? Even with model quality held constant, RAOP cuts P99 latency by 51.4% vs. Cloud-Only and 36.3% vs. a greedy analytical baseline. It isn't just picking smarter brains; it's actively surfing queue depths, bandwidth, and KV-caches.
  • Why GRPO Beats PPO Here: A hard WebShop episode takes several seconds longer than an easy GSM8K math problem. Standard PPO struggles to train a single value critic across such wildly different latency scales, whereas GRPO normalizes rewards within a group of rollouts for the same prompt, yielding much cleaner credit assignment.
  • Natural Herd-Immunity Under Contention: When 16 clients share a cloud server, greedy policies see an open cloud and stampede toward it simultaneously, spiking queue tail-latencies. RAOP learns to back off preemptively, keeping easy browsing local and reserving cloud trips for high-stakes synthesis steps.

Key Results

Across both trace-driven simulations (Qwen2.5-3B on edge, 72B on cloud) and a real three-tier hardware testbed (Raspberry Pi + PC + Cloud), RAOP hits the sweet spot between quality and speed:

Table 1: Compact main results under full prefix-replay and prefill accounting. The full per-task table is in Appendix A.
  • Cloud Quality, Edge Speed: In main simulations, RAOP achieves a 71.7% average success rate—statistically matching Cloud-Only (71.5%) while cutting P99 tail latency by 52.7% (2.77s $\rightarrow$ 1.31s) and network communication by 73.3% (2.10 $\rightarrow$ 0.56 MB/query).
  • Trajectory vs. Step Optimization: RAOP beats NEURAL-MYOPIC (which shares the exact same neural architecture and workload predictor, but optimizes one step at a time) by +2.8 success points, and beats the strongest learned baseline (PPO-Step) by +2.5 points.
  • Real Hardware & Multi-Client Scale: On the physical Pi/PC/Cloud stack with 16 concurrent clients, RAOP maintains cloud-parity success (69.0% vs. 69.4%) while slashing P99 latency by 69.3% (from 13.2s down to 4.05s) and cutting mean cloud queue depth more than in half. And yes—these latency numbers include RAOP's own ~18–45ms planning overhead (which can be distilled down to 5–9ms with a 0.5B head).

Limitations and Future Work

The authors note that their evaluation is currently scoped to text-based agents operating over a bounded set of deployment tiers (two- and three-tier setups), and caution that their physical testbed represents a calibrated network envelope rather than every possible wide-area network condition. Moving forward, they highlight extending this trajectory-level orchestration framework to multimodal tools (where image/video payloads drastically shift transfer math), privacy-aware rewards (penalizing sensitive context leaving the edge), and multi-tenant fairness across competing users.

Summary updated

Abstract

LLM agents do not present a fixed inference job to an edge and cloud system. At each step, a placement decision chooses where to generate the next message, where to execute any resulting tool call, which prefix must be replayed, which cache state is updated, and whether the episode continues. As a result, the workload to be scheduled is partly produced by the scheduling decisions themselves. We formalize this problem as an *endogenous, sequentially revealed workload* (ESRW) controlled trajectory MDP. We then introduce **Resource Aware Orchestration Policy** (RAOP), a step level orchestration policy that first places language generation and then, after observing any tool call, places tool execution. RAOP predicts candidate action workloads from prefix replay, prefill, KV cache residency, queue, network, and tool payload features, and is trained with GRPO to optimize measured full trajectory success and latency rather than a one step latency surrogate. To make controlled evaluation auditable, the main simulator replays language and tool continuations produced by real model and tool execution while recomputing physical timing under the sampled placement sequence. As an analytical lens, we derive a Bellman regret decomposition showing that myopic placement policies incur error from workload prediction, success priors, and a controlled endogeneity term. On GSM8K, HotpotQA, WebShop, and a calibrated three tier deployment, RAOP matches the strong cloud only success reference while reducing P99 latency by about 53\% and communication by about 73\%. Against the strongest learned step level baseline, RAOP improves average success by 2.5 points, indicating that full trajectory optimization is central for agent orchestration.
BibTeX
@inproceedings{li2026raop,
  author = {Jinze Li and Xin Yang and Shuo Yang and Jinfeng Xu and Edith Cheuk-Han Ngai},
  title = {{RAOP: Step-Level Resource Orchestration for LLM Agents across Edge and Cloud}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=SgWUf8rREQ},
}
Figure