GO TO A SECTION

↑ ↓ to navigate · Enter to openExplore all sections →
FDEInterviews logo
RecentarXiv preprint

ThunderAgent: A Simple, Fast and Program-Aware Agentic Inference System

Agents spend much time in tool calls, and LLM servers evict their KV cache while they wait. ThunderAgent schedules whole agent programs: 1.5-3.6x serving throughput, up to 3.9x faster RL rollouts.

Breakdown by FDE Interviews · 11 min read · Updated

About the original · 2026
AUTHORS
Kang, Li, Xu, Yang, et al.
FROM
Georgia Institute of Technology, University of Illinois Urbana-Champaign, Carnegie Mellon University, Together AI
PUBLISHED
Feb 2026 · arXiv preprint
CITED BY
27Semantic Scholar · Oct 2026
IN THIS BREAKDOWN · 10 SECTIONS

You can read 20% of this breakdown.

01

The paper in one minute

A coding or research agent loops: think on the GPU, call a tool (run tests, query an API, browse), append the result, think again. Its context only grows, so each turn could reuse almost all of the previous turn's KV cache. Today's stacks pair an inference engine (vLLM, SGLang) with a tool orchestrator (Kubernetes) and treat each turn as an independent request.

The authors measured three problems with that split on GLM-4.6 agents. KV cache thrashing: under memory pressure the engine evicts caches of agents waiting on tools to make room for others; when the tool returns, the whole history must be prefilled again, raising per-request latency up to 7.14x. Memory imbalance: routers that pin an agent's requests to one node for cache locality let nodes drift apart, up to 51% in a 90-minute rollout. Tool lifecycle blindness: finished agents' sandboxes and images stay on disk until it fills, and sandbox setup time grows with concurrency.

ThunderAgent adds a scheduling layer that knows about programs. Each request carries a program ID; the scheduler tracks each program's context length, phase (reasoning or acting) and status (active, paused, terminated). Every 5 seconds it checks each backend. If active programs need more KV than the backend holds, it pauses programs, acting ones and shorter ones first, freeing their caches; when room returns it restores waiting programs, reasoning ones and shorter ones first. Paused programs wait in one global queue and can resume on any node, which fixes imbalance. Acting programs' memory claims decay over time, so long tool calls give up their cache before short ones. Tool environments are prepared ahead of a program's restore and deleted when it ends.

On H100s, serving throughput was 1.48-3.58x vLLM's across SWE-agent, OpenHands, ToolOrchestra and a science agent; RL rollout was 1.79-3.92x faster than vLLM with SGLang's router; disk use fell 4.2x. It is open source and has been adopted in SkyRL.

THE IDEA, VISUALLY
THE PROGRAM, NOT THE REQUEST (SECTION 4.1) P = ⟨ id, context tokens, tool envs, backend, phase, status ⟩ phase: reasoning | acting status: active | paused | done EVERY Δt = 5 s, PER BACKEND (SECTION 4.3) over capacity → pause acting before reasoning, shortest context first; drop their KV cache room free → restore reasoning before acting, shortest context first, on any node (global queue) acting programs' claims decay as 2^(-t), so long tool calls lose their cache first TOOL RESOURCES (SECTION 4.4) prepare the sandbox before the program is restored, so setup overlaps someone else's reasoning; delete sandboxes, ports and images when it ends INTEGRATION (APPENDIX B) add program_id to each chat request, pass it to tool calls, POST /programs/release when done wraps vLLM or SGLang through OpenAI-style endpoints adopted in SkyRL; being integrated into NVIDIA Dynamo RL ROLLOUT, GLM-4.6, 2x8 H100 (TABLE 2) steps per minute, 144 programs mini-SWE-agent vLLM + router 375.4 ThunderAgent 671.8 (1.79x) OpenHands vLLM + router 69.1 ThunderAgent 270.8 (3.92x) SERVING, 4 AGENT WORKLOADS (FIGURE 4) 1.48-3.58x vLLM, 1.17-3.31x Continuum at 96 programs KV hit rate near 100% for coding agents throughput stays flat as programs exceed memory WHY: THE BASELINE'S PROBLEMS (SECTION 3) re-prefill after eviction: up to 7.14x per-request latency KV-aware routing: up to 51% memory imbalance across nodes uncollected sandboxes: disk grows until it runs out SCALE AND RESOURCES (SECTIONS 5.4, A.3) 4.2x less disk from sandbox cleanup speedup over SGLang router: 1.79x (2 nodes) → 2.39x (8) scheduler tick: 13.5 ms (2 nodes) → 22.7 ms (8)
ThunderAgent schedules agent workflows as programs: it keeps the set of active programs within KV cache capacity, pausing those in long tool calls first, lets paused programs resume on any node, and manages tool sandboxes alongside.
Research notes: the problem, approach and results
3.92x

OpenHands RL rollout throughput over vLLM with SGLang's router, GLM-4.6 on two 8xH100 nodes (69.1 to 270.8 steps/min)

7.14x

worst-case rise in per-request latency the authors measured from KV cache thrashing as agent concurrency grew

4.2x

less disk used once tool sandboxes are deleted when their programs finish

THE PROBLEM

Agent workflows alternate reasoning on the GPU with tool calls (compilers, sandboxes, APIs) and resend a growing history each turn. Inference engines see each turn as a separate request: under load they evict the KV cache of agents waiting on tools and must re-prefill it later, KV-aware routers pin agents to nodes and unbalance memory, and tool sandboxes pile up without cleanup.

THE IDEA

Model each workflow as a program (id, context length, phase, status, tool environments). Every few seconds, keep each backend's active programs within KV capacity: pause programs in tool calls and short ones first, restore reasoning and short ones first, from one queue shared by all backends. Decay the memory claim of long-idle tool calls, prepare sandboxes ahead of restore and delete them when programs end.

THE RESULT

Across coding, routing and science agents on H100s, serving throughput was 1.48-3.58x vLLM's and 1.17-3.31x Continuum's at high concurrency. RL rollout on two 8xH100 nodes ran 1.79-3.92x faster than vLLM with SGLang's router, and sandbox cleanup cut disk use 4.2x.

02

Why it matters to an FDE

Agent workloads look different from chat: long, growing contexts, long pauses in tools, and many concurrent sessions in batch jobs, evaluations and RL. A stack tuned for chat can lose most of its throughput to recomputation as concurrency rises.

Throughput can fall as you add agents. In the paper's vLLM baseline, adding parallel workflows past memory capacity reduced total throughput. Find the knee before scaling a customer's agent fleet, or use a scheduler that caps active programs automatically.

Measure prefix-cache hit rate per agent turn. Agents should hit near 100% because each turn extends the last. A falling hit rate under load means caches are being evicted during tool calls.

Tool infrastructure is part of inference cost. Sandbox setup time and leaked environments limit sustained throughput just as GPU memory does; cleanup tied to workflow completion is the fix.

THE FULL BREAKDOWN

Understand the mechanism. Try it on a real problem.

Unlock this breakdown and 149 more papers.

Premium opens every paper in full, plus every answer, concept, course and guide on the site. One payment for six months of access.

6 months · One payment · No auto-renewal

Get Premium · ₹2,000 / $25
  • ◇1 architecture diagram
  • </>1 runnable code experiment
  • ▦2 results tables
  • ?5 interview questions with answers
  1. 03Key takeaways

    Programs as the unit, pause and restore rules, global queue, tool management and three misreadings

    Free account
  2. 04How it works

    The program tuple, the periodic check, scoring, the global queue and tool hooks

    Premium
  3. 05The numbers that matter

    Setups, serving and rollout results, scaling, offloading and ablations

    Premium
  4. 06Try it yourself

    Check the rollout numbers, test the shortest-first proof, and simulate agents on a KV budget

    Premium
  5. 07Where it breaks

    Heuristic tuning, unpredictable tools, a single scheduler, evidence limits and slips

    Premium
  6. 08Using it on a deployment

    Diagnosing thrashing, capping concurrency, and wiring program IDs and tool cleanup

    Premium
  7. 09Interview angles

    Five questions this paper prepares you for, with answer hints

    Premium
Back to the paper library →