IN THIS BREAKDOWN · 10 SECTIONS
You can read 20% of this breakdown.
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.
Research notes: the problem, approach and results
OpenHands RL rollout throughput over vLLM with SGLang's router, GLM-4.6 on two 8xH100 nodes (69.1 to 270.8 steps/min)
worst-case rise in per-request latency the authors measured from KV cache thrashing as agent concurrency grew
less disk used once tool sandboxes are deleted when their programs finish
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.
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.
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.
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.
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
- ◇1 architecture diagram
- </>1 runnable code experiment
- ▦2 results tables
- ?5 interview questions with answers
- 03Key takeaways
Programs as the unit, pause and restore rules, global queue, tool management and three misreadings
Free account - 04How it works
The program tuple, the periodic check, scoring, the global queue and tool hooks
Premium - 05The numbers that matter
Setups, serving and rollout results, scaling, offloading and ablations
Premium - 06Try it yourself
Check the rollout numbers, test the shortest-first proof, and simulate agents on a KV budget
Premium - 07Where it breaks
Heuristic tuning, unpredictable tools, a single scheduler, evidence limits and slips
Premium - 08Using it on a deployment
Diagnosing thrashing, capping concurrency, and wiring program IDs and tool cleanup
Premium - 09Interview angles
Five questions this paper prepares you for, with answer hints
Premium - 10Read next
Where to go from here on this site
Premium
