Stateful Inference for Low-Latency Multi-Agent Tool Calling
Summary
This paper presents a stateful inference architecture for multi-agent tool calling that reuses KV cache across turns and employs speculative decoding, achieving 2.1x-4.2x speedup over vLLM and SGLang on agentic workflows.
View Cached Full Text
Cached at: 05/27/26, 09:07 AM
# Stateful Inference for Low-Latency Multi-Agent Tool Calling
Source: [https://arxiv.org/html/2605.26289](https://arxiv.org/html/2605.26289)
###### Abstract
Multi\-agent tool calling is emerging as the dominant interaction pattern for LLM\-based systems: orchestrators dispatch tool calls across multiple specialized agents, each maintaining its own conversation history with system prompts, tool schemas, and accumulated tool results\. Existing inference frameworks treat each tool call as an independent request, re\-processing the full conversation from scratch even when only a few tokens have changed\. This is wasteful: in a typical 5\-turn agent conversation, 85–95% of the prompt is identical across consecutive turns\.
We present an architecture that converts the𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)per\-turn cost of conventional inference into an𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)*delta\-only*cost, whereΔt\\Delta\_\{t\}is the new tokens appended on turntt\. The core construct is a stateful KV cache that lives across persistent sessions, advanced by ingesting only the new tokens on each turn\. A radix prefix cache extends this property across sequential and interleaved multi\-agent traffic via metadata\-only sequence aliasing in a unified KV cache; a prompt\-deterministic response cache eliminates GPU work entirely on repeated prompts; and a prompt\-lookup speculative decoder with concurrency\-capped admission accelerates the generation of structured tool\-call outputs\. We benchmark against two production inference engines \(vLLM and SGLang\) on multi\-agent tool calling workloads\. On*novel*multi\-turn workflows, where every token must be generated and no response is cached, the reference implementation is2\.1×2\.1\\timesfaster per turn than both vLLM and SGLang on a 6\-turn agentic workflow, and the advantage widens with conversation depth to4\.2×4\.2\\timeson the median turn of a 35\-turn coding workflow, roughly halving its end\-to\-end wall time\. The gain comes from reusing the monotonically\-growing conversation prefix and from speculating structured output, not from caching: a prompt\-deterministic response cache additionally serves exact\-repeat traffic at network latency \(a capability the compared engines lack\), but our headline results deliberately exclude it to isolate the speedup on genuinely new work\. At realistic generation lengths all three engines emit valid tool calls, so the advantage is in latency, not correctness\.
## 1Introduction
The agentic paradigm has shifted LLM inference from single\-shot question\-answering to multi\-turn, multi\-agent tool calling\. A modern AI application might orchestrate a travel planner, a code reviewer, and a data analyst simultaneously, each issuing sequences of tool calls and receiving structured results\. Each turn appends a few hundred tokens to a conversation that may span thousands\.
This workload has a distinctive structure: conversations grow monotonically, with each new turn appending a small delta to a large, previously\-seen prefix\. In a 5\-turn agent conversation with a 200\-token system prompt and 150 tokens per turn, the final turn’s prompt contains∼\\sim950 tokens, yet only∼\\sim150 are new\. The remaining 800 tokens have already been processed in prior turns\.
Existing inference frameworks handle this poorly\. Request\-driven systems such as vLLMKwon et al\. \([2023](https://arxiv.org/html/2605.26289#bib.bib1)\)and SGLangZheng et al\. \([2024](https://arxiv.org/html/2605.26289#bib.bib2)\)treat each API call as independent, discarding or partially preserving KV cache state between requests\. Some offer prefix caching \(RadixAttention in SGLang, automatic prefix caching in vLLM\), but these are designed for many users sharing a static system prompt, not for a single agent building a conversation incrementally\. When multiple agents interleave requests, cache eviction policies optimized for shared prefixes fail: Agent B’s request evicts Agent A’s cached state, forcing full recomputation on Agent A’s next turn\.
The wasted work is not academic\. Large production inference clusters are well known to run at sustained accelerator utilisation in the 10–45% band, and a substantial fraction of the gap to peak is consumed by exactly this pattern of redundant per\-request prefill, applied across the long tail of agentic traffic where every turn re\-processes the prefix of the previous turn\. For an orchestration framework dispatching thousands of tool calls per user session, the multiplier on cluster spend is direct:5×5\{\\times\}the FLOPs needed to make real progress translates into5×5\{\\times\}the GPU\-hours billed, and into proportionally lower effective utilisation\. Closing this gap requires preserving and reusing intermediate state across requests rather than treating each call as if it had never been seen before\.
We address this with nine mechanisms that together cover stateful inference, admission, prefix sharing, generation, and validation:
1. 1\.Stateful Sessions: A persistent KV cache that lives across requests instead of being rebuilt on each call, so a long\-lived conversation or data stream advances by ingesting only the new tokens each turn\. This is the premise the rest of the system is built on: that stateful, not stateless, inference is the right foundation for agents and real\-time AI
2. 2\.Sequence Pool: A pre\-allocated set of named sequence IDs within a single unified inference context, recycled across requests through a thread\-safe free list and reserved into a transient pool and a session pool, eliminating per\-request context construction
3. 3\.Radix Prefix Cache: A radix trie of cached prefixes whose state is shared across requests by metadata\-only sequence aliasing on the unified KV cache, restoring anmm\-token prefix in constant time independent ofmmand converting per\-turn cost from𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)to𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)
4. 4\.Cell\-Budget Admission with Prefix\-Aware Grouped Prefill: A continuous\-batching scheduler that admits prefills against a cell ceiling and groups slots sharing a byte\-identical prefix into a single leader\-follower prefill, collapsingNNredundant forward passes into one for shared system prompts and tool schemas
5. 5\.Prompt\-Deterministic Response Cache: A full\-response LRU cache enabled by seeding the sampler from an FNV\-1a hash of the prompt, so identical prompts produce identical outputs at any temperature and repeat requests return at network\-roundtrip latency with zero GPU work
6. 6\.Concurrency\-Capped Prompt\-Lookup Speculation: A per\-slot prompt\-lookup speculative decoder that predicts continuations from the slot’s recent token history and verifies them in a batched forward pass, with adaptive per\-slot caps that prevent throughput collapse under high admission
7. 7\.Streaming Tool\-Call Validator: A brace\-balanced JSON parser fed via an on\-piece streaming callback that emits an early\-stop signal at the structural close of a tool call and filters out hallucinated tool names against the declared\-tool set, eliminating wasted decode after the call is complete and rejecting invalid calls before they reach the client
8. 8\.On\-Device Greedy Sampling: Device\-specific argmax kernels that perform greedy token selection directly on the accelerator, eliminating the per\-token synchronise\-and\-scan round trip that otherwise dominates the sampling latency budget on short responses
9. 9\.RAII Session Lifecycle: Automatic acquisition and release of sequence slots under exception\-safe guards, preventing leaks under concurrent multi\-agent workloads
## 2Problem Formulation
### 2\.1Multi\-Agent Tool Calling Workload
ConsiderAAconcurrent agents, each executing a sequence ofTTtool calls\. Agentaaat turnttsubmits a prompt:
Pa\(t\)=\[𝐒a;𝐌a\(1\);𝐑a\(1\);…;𝐌a\(t\)\]P\_\{a\}^\{\(t\)\}=\[\\mathbf\{S\}\_\{a\};\\mathbf\{M\}\_\{a\}^\{\(1\)\};\\mathbf\{R\}\_\{a\}^\{\(1\)\};\\ldots;\\mathbf\{M\}\_\{a\}^\{\(t\)\}\]\(1\)where𝐒a\\mathbf\{S\}\_\{a\}is the system prompt \(tool schemas, instructions\),𝐌a\(i\)\\mathbf\{M\}\_\{a\}^\{\(i\)\}is theii\-th user/assistant message, and𝐑a\(i\)\\mathbf\{R\}\_\{a\}^\{\(i\)\}is theii\-th tool result\. The critical observation:Pa\(t\)P\_\{a\}^\{\(t\)\}is a strict prefix extension ofPa\(t−1\)P\_\{a\}^\{\(t\-1\)\}:
Pa\(t\)=\[Pa\(t−1\);𝐀a\(t−1\);𝐑a\(t−1\);𝐌a\(t\)\]P\_\{a\}^\{\(t\)\}=\[P\_\{a\}^\{\(t\-1\)\};\\mathbf\{A\}\_\{a\}^\{\(t\-1\)\};\\mathbf\{R\}\_\{a\}^\{\(t\-1\)\};\\mathbf\{M\}\_\{a\}^\{\(t\)\}\]\(2\)where𝐀a\(t−1\)\\mathbf\{A\}\_\{a\}^\{\(t\-1\)\}is the assistant’s tool call response and𝐑a\(t−1\)\\mathbf\{R\}\_\{a\}^\{\(t\-1\)\}is the returned tool result\.
For a single agent, prefix caching is straightforward: each turn extends the previous\. WithA\>1A\>1interleaved agents \(calls dispatched A1, B1, C1, A2,…\\ldots\), naive single\-entry caches evict each agent’s state to make room for the next, forcing every cross\-agent transition to recompute from scratch\. Holding allAAlive prefixes simultaneously requires cache capacity∑a=1A\|KV\(Pa\(ta\)\)\|\\sum\_\{a=1\}^\{A\}\|\\mathrm\{KV\}\(P\_\{a\}^\{\(t\_\{a\}\)\}\)\|, which exceeds what block\-paged caches can preserve under sustained interleaving\.
### 2\.2Cost Analysis
Letnt=\|Pa\(t\)\|n\_\{t\}=\|P\_\{a\}^\{\(t\)\}\|denote the total prompt length at turntt, andΔt=nt−nt−1\\Delta\_\{t\}=n\_\{t\}\-n\_\{t\-1\}the new tokens\. In a request\-driven framework without effective caching:
Cstandard=∑t=1T𝒪\(nt\)=𝒪\(T⋅n¯\)C\_\{\\text\{standard\}\}=\\sum\_\{t=1\}^\{T\}\\mathcal\{O\}\(n\_\{t\}\)=\\mathcal\{O\}\\left\(T\\cdot\\bar\{n\}\\right\)\(3\)wheren¯\\bar\{n\}is the average prompt length\. With perfect prefix reuse:
Ccached=𝒪\(n1\)\+∑t=2T𝒪\(Δt\)=𝒪\(n1\+T⋅Δ¯\)C\_\{\\text\{cached\}\}=\\mathcal\{O\}\(n\_\{1\}\)\+\\sum\_\{t=2\}^\{T\}\\mathcal\{O\}\(\\Delta\_\{t\}\)=\\mathcal\{O\}\\left\(n\_\{1\}\+T\\cdot\\bar\{\\Delta\}\\right\)\(4\)SinceΔ¯≪n¯\\bar\{\\Delta\}\\ll\\bar\{n\}in tool calling workloads \(typicallyΔ¯/n¯≈0\.05\\bar\{\\Delta\}/\\bar\{n\}\\approx 0\.05–0\.150\.15\), the savings are substantial\. The speedup factor for later turns approaches:
Speedupt=ntΔt≈ntnt−nt−1\\text\{Speedup\}\_\{t\}=\\frac\{n\_\{t\}\}\{\\Delta\_\{t\}\}\\approx\\frac\{n\_\{t\}\}\{n\_\{t\}\-n\_\{t\-1\}\}\(5\)
## 3Architecture
### 3\.1Sequence Pool
Constructing an inference context is expensive: it allocates the full KV cache memory and initialises GPU state\. For multi\-agent workloads where requests arrive frequently, per\-request allocation adds∼\\sim50–200 ms overhead\.
We instead allocate a single unified inference context at server startup and partition its sequence\-ID space into a fixed pool:
Pool=\{σ1,σ2,…,σN\}\\text\{Pool\}=\\\{\\sigma\_\{1\},\\sigma\_\{2\},\\ldots,\\sigma\_\{N\}\\\}\(6\)where eachσi\\sigma\_\{i\}is a named sequence within the unified KV cache\. Sequence IDs are split into two disjoint regions: a transient pool reserved for stateless requests and a session pool reserved for long\-lived stateful sessions\. Each incoming request acquires a sequence from the appropriate pool, uses it for the duration of the request, and returns it on completion through a mutex\-guarded free list\. If the pool is exhausted, the request blocks \(with a configurable timeout\) until a sequence is released\. The fixed pool size bounds GPU memory usage and provides predictable resource consumption\. An RAII guard returns the sequence on every exit path, preventing leaks under error conditions\.
This single\-context, multi\-sequence design is deliberate\. A single forward pass mixes prefill and decode tokens from any subset of sequence IDs in one batch, so prefix sharing across requests reduces to metadata\-only aliasing within the same KV cache rather than cross\-context coordination\.
### 3\.2Continuous Batching Scheduler
The sequence pool above is fronted by an*admit\-many / run\-few*continuous\-batching scheduler that builds heterogeneous PREFILL\+\+DECODE batches each iteration\. Four mechanisms together let many tool\-call requests, of widely different prefix\-cache\-hit profiles, coexist on one GPU\.
Cell\-budget admission\.The scheduler tracks unified KV cache occupancy in*cells*\(one cell per token per layer\) and admits a new prefill only when the projected total \(prompt\+max\_tokens\\text\{prompt\}\+\\text\{max\\\_tokens\}summed across admitted slots\) stays below a fixed ceilingCbudget=12\|pool\|C\_\{\\text\{budget\}\}=\\tfrac\{1\}\{2\}\|\\text\{pool\}\|\. The other half is reserved for radix\-cached prefixes and in\-flight state\. When occupancy crosses a high\-water mark \(95%\), incoming prefill chunks are deferred at chunk granularity rather than request granularity, providing fine\-grained backpressure without rejecting requests\.
Workload\-adaptive chunked prefill\.ForNNslots with pending prefill work, each slot is allocated a per\-iteration chunk of sizechunk=clamp\(nbatch/N,128,4096\)\\text\{chunk\}=\\mathrm\{clamp\}\(n\_\{\\text\{batch\}\}/N,\\,128,\\,4096\)tokens\. With one active prefill the chunk fills the batch \(up to 4,096 tokens\); with many concurrent prefills it shrinks so that decoding slots are not starved within the same iteration\. When a latency\-sensitive request \(smallmax\_tokens\) is co\-resident under contention, the ceiling narrows to a fair 1,024\-token chunk so that request’s decode interleaves promptly rather than waiting behind a large prefill\. This contrasts with static chunk sizes used by some serving systems \(e\.g\. vLLM’s default 512\) and prefill\-priority gating used by others \(e\.g\. SGLang\), both of which can stall decode under heavy admission\.
Prefix\-aware grouped prefill\.Slots whose prompts share a byte\-identical prefix beyond the radix\-cache match point, identified by FNV\-1a hashing the nextK=8K=8tokens, are grouped into a single leader\-follower prefill\. The leader processes the chunk; followers acquire the resulting state via metadata\-only sequence aliasing\. For shared system prompts and tool schemas, this convertsNNredundant forward passes into one\. This optimization is particularly effective at the burst\-onset of a multi\-tenant tool\-call workload, where many agents concurrently submit requests sharing the same schema preamble\.
Concurrency\-capped speculation\.The scheduler also drives the per\-slot prompt\-lookup speculative decoder of Section[3\.6](https://arxiv.org/html/2605.26289#S3.SS6)\. Without coordination, speculation collapses at high admission: verification cost scales as the product of the per\-slot draft length and the number of concurrent decoders, while acceptance rate falls on unfamiliar content\. The scheduler caps the per\-slot draft length as a joint function of the number of active decoders and the per\-slot historical acceptance rate, with specific thresholds tuned per accelerator class and model size\. The per\-slot prediction step is parallelized across worker threads, removing it from the critical path\.
### 3\.3Radix Prefix Cache
Shared prefixes across requests are tracked in a radix trie keyed by token sequences\. A trie node records the donor sequence ID whose KV state still holds the matched cells\. When a new request arrives whose prompt extends a cached branch, the scheduler restores the prefix into a freshly acquired sequence via a metadata\-only*sequence aliasing*operation on the unified KV cache: the new sequence’s page table is rewritten to point at the donor’s cells, and the operation completes in constant time independent of prefix lengthmm\.
Algorithm 1Radix\-Cached Per\-Turn Processing0:Prompt tokens
TT, radix trie
ℛ\\mathcal\{R\}, acquired sequence
σ\\sigma
1:
\(m,σdonor\)←ℛ\.longest\_prefix\(T\)\(m,\\sigma\_\{\\text\{donor\}\}\)\\leftarrow\\mathcal\{R\}\.\\text\{longest\\\_prefix\}\(T\)\{Walk the trie\}
2:if
m\>0m\>0then
3:
SeqAlias\(σdonor,σ,0,m\)\\text\{SeqAlias\}\(\\sigma\_\{\\text\{donor\}\},\\sigma,0,m\)\{Constant\-time, metadata only\}
4:endif
5:
npast←mn\_\{\\text\{past\}\}\\leftarrow m
6:
7:\{Process only the delta tokens — never re\-prefill cached cells\}
8:for
i=npasti=n\_\{\\text\{past\}\}to
\|T\|−1\|T\|\-1step
bbdo
9:
batch←T\[i:min\(i\+b,\|T\|\)\]\\text\{batch\}\\leftarrow T\[i:\\min\(i\+b,\|T\|\)\]
10:
Decode\(σ,batch\)\\text\{Decode\}\(\\sigma,\\text\{batch\}\)
11:endfor
12:
13:
ℛ\.save\(T,σ,npast\)\\mathcal\{R\}\.\\text\{save\}\(T,\\sigma,n\_\{\\text\{past\}\}\)\{Incremental: commit only delta cells\}
14:return
npastn\_\{\\text\{past\}\}\{Cells skipped on this turn\}
Trie structure\.Each radix node owns a token segment and a donor sequence ID; descending the trie walks shared prefix branches until the input diverges\. The trie is queried in𝒪\(m\)\\mathcal\{O\}\(m\)on the incoming token sequence, comparable to a single prompt\-side BPE pass\.
Eviction\.The radix uses a leaf\-oldest LRU policy: when a save would exceed the cell budget \(Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2)\), the trie sheds the leaf whose most recent touch is oldest, freeing its cells in the unified KV cache\. The leaf\-oldest rule preserves long shared branches \(tool\-schema preambles, system prompts\) while discarding stale conversational tails\.
Incremental save: process the delta, not the prompt\.A save commits only the delta cells that the current turn produced\. When a request extends an already\-cached branch byΔt\\Delta\_\{t\}tokens, the trie commit walks the branch to its tip and appends a new node holding theΔt\\Delta\_\{t\}delta cells; the previously cached cells are not re\-copied\. The same property applies on read: a fresh request that shares anmm\-token prefix with a cached branch processes only theΔt=\|T\|−m\\Delta\_\{t\}=\|T\|\-mdelta tokens through the forward pass\. Combined with the constant\-time alias on the prefix, this converts the per\-turn cost from𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)\(full re\-prefill\) to𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)for every cache\-hit turn\. For tool calling, where the typical delta\-to\-total ratio is 5–15%, the saved work is an order of magnitude\.
### 3\.4Render and Tokenize Caches
Caching KV state addresses the GPU side of the per\-turn cost; caching the chat\-template render and BPE tokenization addresses the CPU side\. The chat\-template render of anNN\-turn conversation is a strict prefix of the\(N\+1\)\(N\{\+\}1\)\-turn render: agents append, they do not rewrite history\. Tokenising a 5 k\-token prompt over a 128 k\-token vocabulary is on the order of tens of milliseconds of pure CPU BPE work, and that cost is paid by every request that arrives at a cold sequence\.
We maintain two small CPU\-side caches above the radix:
- •A 256\-entry render cache keyed by the structural digest of the request’s message list, holding the Jinja\-applied template output\.
- •A 64\-entry tokenize cache keyed by the rendered string, holding the BPE token sequence\.
Stateless tool\-call traffic exhibits high temporal locality at both layers: the system prompt and tool schemas repeat across nearly every request, and large segments of the message history repeat across consecutive turns of the same agent\. A hit in either cache eliminates the corresponding CPU stage entirely\. Combined with a radix hit, the cold CPU pass on a multi\-turn request drops to BPE\-tokenising only the delta tokens\.
### 3\.5Response Cache via Prompt\-Deterministic Sampling
A portion of agentic traffic consists of repeated identical prompts: retries, polling, and idempotent fan\-out across sub\-agents\. For this subset, we seed the sampler deterministically from the prompt,
seed=FNV\-1a\(T\)mod232\\text\{seed\}=\\text\{FNV\-1a\}\(T\)\\bmod 2^\{32\}\(7\)so that identical prompts produce identical outputs at any temperature \(equivalent to the OpenAIseedparameter\)\. A 1024\-entry LRU response cache is consulted before sequence acquisition; on hit the cached response is returned without GPU work, on miss the response is stored after normal generation\. This path matters for orchestration patterns where the same call recurs, but it is one mechanism among several rather than the principal source of advantage on novel agentic traffic\.
### 3\.6Concurrency\-Capped Prompt\-Lookup Speculative Decoding
Token generation is inherently sequential: each forward pass produces one token, and the next token depends on the previous\. For anmm\-token response, this requiresmmserial forward passes\. Classical speculative decodingLeviathan et al\. \([2023](https://arxiv.org/html/2605.26289#bib.bib6)\)addresses this by using a fast draft model to predict candidates, then verifying in batch, but draft models consume additional GPU memory, require a compatible tokeniser, and add a separate training and deployment surface\.
We observe that tool\-calling outputs are*highly structured and repetitive*: the same JSON patterns \(e\.g\.\{"name": "get\_weather", "parameters": \{\) recur across requests with different arguments, and within a single conversation a tool’s name and argument keys often appear earlier in the prompt itself\. We exploit this with*prompt\-lookup decoding*\(PLD\)Saxena \([2023](https://arxiv.org/html/2605.26289#bib.bib7)\): for each generation step, we scan the slot’s recent token buffer for the longest suffix\-anchored n\-gram that matches the trailing context, and propose its continuation as a batched speculative draft:
Algorithm 2Prompt\-Lookup Speculative Decoding0:Recent token buffer
RR, generated tokens so far
GG, min match
ℓ\\ell, max lookahead
NN
1:
predicted←LookupNgram\(R,Gtail,ℓ,N\)\\text\{predicted\}\\leftarrow\\text\{LookupNgram\}\(R,G\_\{\\text\{tail\}\},\\ell,N\)\{Longest suffix\-anchored match in
RR\}
2:
k←\|predicted\|k\\leftarrow\|\\text\{predicted\}\|\{0 if no confident match found\}
3:if
k\>0k\>0then
4:\{Batch\-decode current token
\+\+kkpredicted tokens in ONE forward pass\}
5:
batch←\[Glast,predicted\[0\],…,predicted\[k−1\]\]\\text\{batch\}\\leftarrow\[G\_\{\\text\{last\}\},\\text\{predicted\}\[0\],\\ldots,\\text\{predicted\}\[k\{\-\}1\]\]
6:
logits\[0…k\]←Decode\(σ,batch\)\\text\{logits\}\[0\\ldots k\]\\leftarrow\\text\{Decode\}\(\\sigma,\\text\{batch\}\)\{Single forward pass\}
7:
8:\{Verify: accept predictions while they match the model’s greedy choice\}
9:for
s=0s=0to
k−1k\-1do
10:
actual←argmax\(logits\[s\]\)\\text\{actual\}\\leftarrow\\arg\\max\(\\text\{logits\}\[s\]\)
11:if
actual≠predicted\[s\]\\text\{actual\}\\neq\\text\{predicted\}\[s\]then
12:break\{Mismatch: reject remaining predictions\}
13:endif
14:Accept
predicted\[s\]\\text\{predicted\}\[s\]as verified output
15:endfor
16:Trim KV cache to remove rejected speculative tokens
17:else
18:Decode single token \(standard path\)
19:endif
Acceptance gating\.A naive PLD implementation proposes a fixed window on every step, but the acceptance rate of speculated tokens is highly bimodal: structured tool\-call regions reach near\-100% acceptance, while free\-form prose can fall below 10%\. We gate the per\-step proposal length on a slot\-local exponential moving average of acceptance, dropping to a small floor when the slot’s acceptance falls below a confidence threshold\. This avoids paying the verification cost on novel content while keeping the speed\-up on repetitive structured output\.
Cost model\.Without speculation, generatingmmtokens requiresmmsequential forward passes\. Withkkcorrectly\-predicted tokens per accepted draft, the cost is:
Tpld=⌈m/\(k\+1\)⌉⋅TdecodevsTstandard=m⋅TdecodeT\_\{\\text\{pld\}\}=\\lceil m/\(k\+1\)\\rceil\\cdot T\_\{\\text\{decode\}\}\\quad\\text\{vs\}\\quad T\_\{\\text\{standard\}\}=m\\cdot T\_\{\\text\{decode\}\}\(8\)For tool calling where the proposal hits a recurringk=11k=11\-token JSON prefix, generatingm=20m=20tokens requires⌈20/12⌉=2\\lceil 20/12\\rceil=2batched decodes instead of2020sequential decodes, a substantial reduction in forward\-pass count for the predicted portion\.
Properties\.
- •Zero GPU memory: PLD operates entirely on the slot’s recent token buffer in CPU memory\.
- •Zero training: no draft model and no offline training; predictions come from the input prompt and the slot’s own recent output\.
- •Tokeniser\-agnostic: the matcher operates on raw token IDs\.
- •Correctness\-preserving: every speculated token is verified against the model’s actual logits; rejected tokens are discarded and the KV cache is trimmed back to the last accepted position\.
- •Concurrency\-aware: the scheduler’s per\-slot cap \(Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2)\) prevents speculation from degrading aggregate throughput under heavy admission\.
### 3\.7Streaming Tool\-Call Validator
PLD accelerates generation but does not constrain it to valid tool schemas\. An unconstrained model frequently emits malformed JSON, unknown tool names, mismatched quotes, or missing parameter keys\. These parse failures are the dominant source of tool\-call errors on smaller models, wasting the forward passes already spent on generation\.
We address this with a low\-overhead streaming validator that runs alongside generation rather than constraining sampling\. Two components cooperate:
Brace\-balanced JSON tracker with early stop\.Anon\_piececallback receives each newly sampled token’s decoded text fragment as soon as it is produced\. A small state machine tracks JSON depth across the assistant’s response: when it sees a tool\-call trigger \(the model’s tool\-call sentinel token, or a text match of an opening JSON object after the trigger\), it enters*tracking*state; depth is incremented on\{and decremented on\}; when depth returns to zero, the validator signals an early\-stop after a small grace window\. Generation halts as soon as the call is structurally complete, avoiding the trailing prose that an unconstrained model tends to emit after a tool call\. On agentic workloads with chained tool calls, this consistently saves 20–40% of decoded tokens per turn at no quality cost\.
Declared\-tool filter\.Models on smaller open\-weight backbones occasionally hallucinate tool names that do not exist in the declared\-tool list\. The validator extracts each closed JSON object via the brace tracker, parses it, and rejects any object whosenamefield is not in the set of declared tool names registered for the request\. Rejected calls do not reach the caller; the system reports either a clean text response or a constrained re\-generation, depending on configuration\.
This pair is cheaper than grammar\-based constrained decoding \(which masks logits on every generation step\): the brace tracker touches only emitted text pieces and runs entirely in CPU code paths concurrent with the next forward pass\. Its main contribution is efficiency: halting generation at the structural close of a tool call removes the trailing prose an unconstrained model otherwise emits, eliminating wasted decode after the call is complete\. At the realistic generation lengths used in our evaluation all three engines emit valid tool calls, so the validator contributes inference efficiency rather than a tool\-correctness advantage\.
### 3\.8On\-Device Greedy Sampling
Every generated token, whether single\-step or speculation\-batched, reduces to an argmax over the vocabulary logits\. Greedy sampling attemperature=0runs directly on the device through the platform\-specific reduction kernels described in our prior work on streaming inferenceNorgren \([2026](https://arxiv.org/html/2605.26289#bib.bib8)\); the batched variant of the same kernel verifiesk\+1k\{\+\}1speculated positions in one dispatch for Algorithm[2](https://arxiv.org/html/2605.26289#alg2)\. The host never materialises or scans the logits vector, eliminating a per\-token synchronise\-and\-scan round trip that would otherwise dominate latency on the short responses typical of tool calls\.
### 3\.9Why This Outperforms Request\-Driven Prefix Caching
Existing prefix caching implementations \(RadixAttention in SGLang, automatic prefix caching in vLLM\) are designed for a different access pattern: many concurrent users sharing a common static system prompt\. They maintain a radix or hash structure over fixed\-size token blocks and match incoming requests against it\.
For multi\-agent tool calling, these approaches have three structural limitations that our radix prefix cache, in combination with the scheduler of Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2), removes:
1. 1\.Restore cost\.Block\-paged caches share KV pages via copy\-on\-write or page\-table remap\. Restoring anmm\-token prefix requires reconstructing the page table mapping for⌈m/B⌉\\lceil m/B\\rceilblocks\. The radix prefix cache aliases the donor sequence’s pages in constant time, independent ofmm, by rewriting a single sequence\-to\-page pointer in the unified KV cache\.
2. 2\.Eviction under interleaving\.Under interleaving with capacity for fewer thanAAfull conversations, block\-paged eviction discards arbitrary blocks belonging to active agents\. The leaf\-oldest eviction policy, gated by the cell\-budget admission of Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2), preferentially preserves long shared branches \(system prompts, tool schemas\) and evicts at the leaf of each conversation, so the active prefix of every live conversation survives even under heavy pressure\.
3. 3\.Redundant prefill under burst\.When multiple agents simultaneously submit requests sharing the same schema preamble, block\-paged systems still run the prefix through the prefill kernel once per request \(the cache only kicks in for the second request onwards in a burst\)\. The prefix\-aware grouped prefill of Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2)groups concurrent prefills that hash\-match on the post\-radix tail, collapsingNNredundant forward passes into one leader pass plusN−1N\{\-\}1metadata aliases\. This is the mechanism that drives the burst\-onset advantage observed in Section[5](https://arxiv.org/html/2605.26289#S5)\.
Finally, neither block\-paged design optimizes for the case of repeat\-identical prompts, a common pattern in agentic retries, polling, and template\-driven tool calling\. Our prompt\-deterministic response cache, gated by an FNV\-1a hash with a token\-count collision guard, returns the cached response at network\-roundtrip latency without acquiring a sequence at all\.
### 3\.10Per\-Turn Cost
WritingTprefill\(n\)T\_\{\\text\{prefill\}\}\(n\)for the time to processnntokens,TrestoreT\_\{\\text\{restore\}\}for a constant\-time radix alias,TdecodeT\_\{\\text\{decode\}\}for one generation step, andThttpT\_\{\\text\{http\}\}for HTTP\+serialisation overhead, the per\-turn cost on turnttcollapses to three regimes:
T\(t\)=\{Tprefill\(nt\)\+m⋅TdecodeconventionalTrestore\+Tprefill\(Δt\)\+⌈m/\(k\+1\)⌉⋅Tdecoderadix \+ PLDThttpresponse cache hitT^\{\(t\)\}\\;=\\;\\begin\{cases\}T\_\{\\text\{prefill\}\}\(n\_\{t\}\)\+m\\cdot T\_\{\\text\{decode\}\}&\\text\{conventional\}\\\\\[2\.0pt\] T\_\{\\text\{restore\}\}\+T\_\{\\text\{prefill\}\}\(\\Delta\_\{t\}\)\+\\lceil m/\(k\{\+\}1\)\\rceil\\cdot T\_\{\\text\{decode\}\}&\\text\{radix \+ PLD\}\\\\\[2\.0pt\] T\_\{\\text\{http\}\}&\\text\{response cache hit\}\\end\{cases\}\(9\)
Conventional inference pays the full𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)prefill on every turn\. The radix\-plus\-PLD path replacesTprefill\(nt\)T\_\{\\text\{prefill\}\}\(n\_\{t\}\)with a constant\-time alias plus a delta\-only prefillTprefill\(Δt\)T\_\{\\text\{prefill\}\}\(\\Delta\_\{t\}\), and reduces the generation factor byk\+1k\+1when the speculative decoder acceptskkpredicted tokens \(typicalk≈11k\\approx 11on structured tool\-call output\)\. On a repeat prompt the response cache eliminates GPU work entirely\. For tool calling,Δt≪nt\\Delta\_\{t\}\\ll n\_\{t\}andmmis small \(4–50 tokens\), so the speedup is dominated by the prefill elimination and grows monotonically as conversations deepen\. whereLLis the number of layers,ddis the hidden dimension, andnnis the cached sequence length\. For Meta\-Llama\-3\.1\-8B \(L=32L=32,d=4096d=4096\) with a 1,000\-token conversation in BF16:
Mentry=2⋅32⋅4096⋅1000⋅2≈524MBM\_\{\\text\{entry\}\}=2\\cdot 32\\cdot 4096\\cdot 1000\\cdot 2\\approx 524\\text\{ MB\}\(10\)
ForAAactive agents and conversations averagingnntokens, the radix carries at mostA⋅nA\\cdot ncells of shared state in addition to the live transient and session sequences\. For our benchmark \(A=3A=3agents,∼\\sim950\-token conversations\) on a 32,768\-token unified KV cache, the cache entries fit comfortably alongside the live sequences\. The system degrades gracefully under pressure: the cell\-budget admission of Section[3\.2](https://arxiv.org/html/2605.26289#S3.SS2)preempts new prefills before the cache forces a save failure, and leaf\-oldest LRU sheds stale conversational tails first\.
## 4Experimental Setup
### 4\.1Benchmark Design
We designed a multi\-agent tool calling benchmark that captures realistic agentic workloads\. Three concurrent agents execute 5\-turn conversations each:
- •Agent A\(Travel Planner\):get\_weather,search\_flights,book\_hotel,search\_restaurants,create\_itinerary
- •Agent B\(Code Reviewer\):analyze\_code,run\_tests,check\_coverage,lint\_code,review\_pr
- •Agent C\(Data Analyst\):query\_db,create\_chart,export\_data,run\_pipeline,compute\_stats
Each agent has a distinct system prompt \(∼\\sim200 tokens\) with tool schemas\. Each turn appends an assistant tool call \(∼\\sim50 tokens\) and a user message with tool results \(∼\\sim100 tokens\)\. By turn 5, each agent’s prompt spans∼\\sim950 tokens\.
### 4\.2Scenarios
We report two families of scenarios\. The*novel*scenarios drive every result in Section[5](https://arxiv.org/html/2605.26289#S5)and force the engine to generate every token with no response\-cache assistance; the*repeated\-prompt*scenarios exercise the response cache and are summarised separately in Section[5\.4](https://arxiv.org/html/2605.26289#S5.SS4)\.
Novel workflows \(primary\)\.
1. 1\.Agentic \(6\-turn\): A coding agent performing a 6\-turn bug\-fix workflow \(read\_file,search\_code,write\_file,run\_command,get\_diagnostics, summary\) with unique file names per session, ensuring*zero response\-cache hits*\. Each turn builds on the previous, so only the radix prefix cache and the speculative decoder accelerate it\.
2. 2\.Deep coding \(35\-turn\): A single agent incrementally builds a web application over 35 turns, the conversation growing monotonically\. This stresses the depth property: the reusable prefix grows on every turn while no prompt ever repeats\.
Repeated\-prompt workflows \(response cache\)\.Three multi\-agent dispatch patterns \(sequential, interleaved, and round\-robin over 3 agents×\\times5 turns\) re\-issue identical prompts after warmup, exercising the prompt\-deterministic response cache; we summarise them in Section[5\.4](https://arxiv.org/html/2605.26289#S5.SS4)rather than in the main comparison, because on that traffic LayerScale returns a cached value instead of running inference\.
We report median per\-turn latencies \(and, for the deep workflow, end\-to\-end wall time\) over repeated iterations after warmup, to account for system noise\.
### 4\.3Systems Under Test
- •LayerScale: Sequence pool \(transient slots plus reserved session slots\), radix prefix cache with metadata\-only sequence aliasing, prompt\-deterministic response cache, and prompt\-lookup speculative decoding
- •vLLMKwon et al\. \([2023](https://arxiv.org/html/2605.26289#bib.bib1)\): automatic prefix caching enabled \(default\),vllm/vllm\-openai:latestDocker image,\-\-enable\-auto\-tool\-choice \-\-tool\-call\-parser llama3\_json
- •SGLangZheng et al\. \([2024](https://arxiv.org/html/2605.26289#bib.bib2)\): RadixAttention enabled \(default\),lmsysorg/sglang:v0\.5\.11\-cu130Docker image
All three systems use Meta\-Llama\-3\.1\-8B\-Instruct in BF16 precision, 32,768 context length, all layers resident on the GPU, flash attention enabled where supported\. All requests use the OpenAI\-compatible/v1/chat/completionsendpoint withmax\_tokens=128andtemperature=0\(greedy decoding\), so every engine generates a complete tool call\. Each server was benchmarked independently with a clean restart between runs and a cooldown period\.
### 4\.4Hardware
All experiments run on a single NVIDIA L40S accelerator \(48 GB GDDR6, 864 GB/s memory bandwidth\) in a single\-tenant configuration\. The same model checkpoint, tokeniser, and chat template are used across every engine to isolate the contribution of the inference stack\.
## 5Results
We evaluate the two regimes where no cache can stand in for fast inference and where production agentic systems spend most of their time:*novel multi\-turn workflows*, in which each turn extends the conversation but no prompt ever repeats, and*deepening conversations*, where the reusable prefix grows turn over turn\. Both force the engine to generate every output token, and neither benefits from any response cache, so these measurements isolate the architecture’s contribution to genuine inference speed\. We compare against vLLM and SGLang, the two most widely deployed open\-source serving engines, under identical settings \(Section[4](https://arxiv.org/html/2605.26289#S4)\)\. The response cache, which serves a different regime \(exact\-repeat traffic\), is treated separately in Section[5\.4](https://arxiv.org/html/2605.26289#S5.SS4)and excluded from every table and figure here\.
Figure 1:Median per\-turn latency on novel, fully\-generated tool\-call workloads \(no response\-cache hits\)\. LayerScale is2\.1×2\.1\\timesfaster than vLLM on the 6\-turn agentic workflow and4\.2×4\.2\\timesfaster on the median turn of the 35\-turn deep\-coding workflow; the gap widens as the reusable conversation prefix deepens\.### 5\.1Novel Multi\-Turn Workflow Latency
A coding agent performs a 6\-turn bug\-fix workflow \(read\_file,search\_code,write\_file,run\_command,get\_diagnostics, summary\) with unique file names per session, guaranteeing*zero response\-cache hits*\. Each turn builds incrementally on the previous, so the radix prefix cache and the prompt\-lookup speculative decoder carry the entire workload\.
Table 1:Novel 6\-turn agentic workflow: median per\-turn latency \(no response\-cache hits\)With no caching of any kind in play, per\-turn latency is2\.1×2\.1\\timeslower than vLLM and2\.2×2\.2\\timeslower than SGLang\. The advantage comes from two mechanisms working together: radix\-prefix reuse on the monotonically\-growing conversation prefix \(Section 3\.3\), which lets LayerScale process only the new tokens each turn while the competitors re\-prefill the full conversation, and speculation\-accelerated generation on structured tool\-call output \(Section 3\.6\)\.
Figure 2:LayerScale speedup over vLLM and SGLang on median per\-turn latency, with no caching of any kind in play\. The multiplier roughly doubles as the workflow deepens from 6 to 35 turns, reflecting the𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)versus𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)per\-turn cost difference between delta\-only processing and full re\-prefill\.
### 5\.2The Advantage Grows with Conversation Depth
The defining property of agentic workloads is that conversations deepen: every turn appends to an ever\-larger prefix\. We measure a 35\-turn coding workflow \(incrementally building a web application\), in which the conversation grows monotonically and each turn must attend over everything before it\.
Figure 3:Cumulative wall time over the 35\-turn novel coding workflow \(no response\-cache hits\)\. LayerScale finishes in roughly half the wall time, and the gap widens with every turn: it processes only the per\-turn delta while vLLM and SGLang re\-prefill the full and growing conversation on each turn\. The separation is the compounding cost of redundant prefix recomputation\.Table 2:Novel 35\-turn coding workflow: per\-turn latency and end\-to\-end wall time \(no response\-cache hits\)On the typical \(median\) turn the reference implementation is4\.2×4\.2\\timesfaster than both engines, and over the full workflow it completes in roughly half the wall time \(31 s versus 64 s\)\. The separation widens with depth for a structural reason: LayerScale pays𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)per turn by aliasing the cached prefix and processing only the appended delta, whereas a request\-driven engine pays𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\), re\-prefilling a conversation that grows on every turn\. The deeper the agent works, the larger the gap\.
### 5\.3Burst\-Mode Orchestration
A complementary regime is burst\-mode fan\-out, in which an orchestrator dispatches many concurrent tool calls\. At concurrency 8 \(40 requests across 5 iterations of an 8\-way burst\), the cached\-state path yields p99 tail latency an order of magnitude tighter than the closest competitor under the same load, because admitted slots share prefix state through metadata\-only aliasing rather than each re\-running prefill\. This is the second operationally relevant regime for orchestration alongside the novel\-conversation regime above\.
### 5\.4The Response Cache
A distinct slice of agentic traffic is exact\-repeat: retries, polling, and idempotent fan\-out across sub\-agents\. For that slice the prompt\-deterministic response cache \(Section 3\.5\) returns the stored response at network\-roundtrip latency, sub\-millisecond in our harness, with zero GPU work, a capability that neither vLLM nor SGLang offers\. We deliberately exclude this path from the comparisons above: it returns a cached value rather than performing inference, so reporting it alongside generation latency would overstate the architecture’s inference advantage\. It nonetheless represents a substantial operational advantage on repeat\-heavy traffic, and it composes with the generation\-time gains measured here\. The measurements in the preceding sections, by contrast, involve no cached responses: each reflects fully\-generated inference, and on every one the proposed architecture outperforms both baselines\.
A structural fit for agentic systems\.Conventional inference frameworks pay an𝒪\(nt\)\\mathcal\{O\}\(n\_\{t\}\)forward pass on every tool call, regardless of how much of the conversation they have already seen\. The proposed architecture pays𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)on novel turns through radix prefix reuse and speculation\-accelerated generation, so cost scales with the new work the agent is actually doing rather than with conversation history length\. This is the property that makes the architecture a structural fit for agentic systems, not a point optimization\.
## 6Discussion
### 6\.1Relationship to Streaming Inference
This work is complementary to our prior work on stateful data\-driven streaming inferenceNorgren \([2026](https://arxiv.org/html/2605.26289#bib.bib8)\)\. Streaming inference addresses continuous data ingestion with sporadic queries; tool calling addresses multi\-turn conversations with interleaved agents\. Both exploit the same insight: prior computation should persist across requests rather than being discarded\. The sequence pool, continuous\-batching scheduler, and radix prefix cache are shared infrastructure that serves both workloads\.
### 6\.2Limitations
Memory cost\.Cached prefixes consume KV cache capacity within each context’s GPU allocation\. For 3 agents with 1,000\-token conversations on an 8B model, the cache entries require∼\\sim1\.5 GB of KV cache space\. This scales linearly with the number of concurrent agents and conversation length, and must fit within the context’s allocated KV capacity alongside the working sequence\.
Cache invalidation\.Our prefix matching is exact: if any token in the prefix differs, the cache misses\. This is correct for tool calling \(where prefixes grow monotonically\) but would not handle prompt modifications or reordering\.
Single\-GPU scope\.The current implementation operates within a single GPU’s memory\. Multi\-GPU deployments would require distributed cache coordination, which we leave to future work\.
## 7Related Work
PagedAttention and vLLM\.vLLMKwon et al\. \([2023](https://arxiv.org/html/2605.26289#bib.bib1)\)manages KV cache as virtual memory pages, enabling efficient memory sharing across requests with common prefixes\. The paging mechanism is optimized for high\-throughput batch serving with many concurrent users\. Our approach targets low\-latency single\-user scenarios with multiple agents\.
RadixAttention and SGLang\.SGLangZheng et al\. \([2024](https://arxiv.org/html/2605.26289#bib.bib2)\)uses a radix tree to cache and share KV states across requests with matching prefixes\. This is effective for structured generation programs where many requests share common prefixes\. For multi\-agent interleaving, the radix tree may fragment cached state across agents, reducing hit rates\.
Prompt Caching\.Cloud providersAnthropic \([2024](https://arxiv.org/html/2605.26289#bib.bib3)\)offer prompt caching for repeated identical prefixes\. This is a binary mechanism: the entire prefix matches or it does not\. Our approach finds the longest matching prefix, enabling partial cache hits when conversations diverge\.
Disaggregated Prefill\.DistServeZhong et al\. \([2024](https://arxiv.org/html/2605.26289#bib.bib4)\)separates prefill from decode across instances to improve scheduling\. This addresses a different bottleneck \(prefill blocking decode\) but does not reduce redundant prefill computation\. Our approach eliminates the redundant prefill entirely\.
Continuous Batching\.OrcaYu et al\. \([2022](https://arxiv.org/html/2605.26289#bib.bib5)\)introduced iteration\-level scheduling for serving\. This improves throughput but does not address prefix reuse\. Our work is orthogonal and could be combined with continuous batching for both latency and throughput improvements\.
## 8Conclusion
Multi\-agent tool calling creates a workload where 85–95% of each request’s prompt has been processed in a prior turn\. Existing inference frameworks discard this computation between requests, paying full𝒪\(n\)\\mathcal\{O\}\(n\)prefill cost on every call\. We show that a radix prefix cache backed by metadata\-only sequence aliasing, combined with a pre\-allocated sequence pool and a cell\-budget continuous\-batching scheduler, enables𝒪\(Δ\)\\mathcal\{O\}\(\\Delta\)per\-turn processing by sharing intermediate representations across requests at constant restore cost\.
Against vLLM and SGLang on multi\-agent tool calling workloads that generate every output token, with no response cache in play, we achieve:
- •2\.1×2\.1\\timeslower median per\-turn latencyon a novel 6\-turn agentic workflow, where only the radix prefix cache and the speculative decoder accelerate generation
- •An advantage that widens with conversation depth:4\.2×4\.2\\timeslower median per\-turn latency on a 35\-turn coding workflow, completing it in roughly half the end\-to\-end wall time
- •Order\-of\-magnitude tighter p99 tail latencyunder 8\-way burst orchestration, where admitted slots share prefix state instead of each re\-running prefill
- •A prompt\-deterministic response cachethat additionally serves exact\-repeat traffic at network\-roundtrip latency with zero GPU work, a capability the compared engines lack; we report it separately so as not to overstate the generation\-time results
The contribution is systems\-level: recognising that multi\-agent tool calling has a monotonically\-growing prefix structure, that this structure is densely shared at the schema\-preamble level across concurrent tenants, and that existing per\-request caching fails to exploit either property\. By persisting KV state across the full conversation lifecycle through metadata\-only aliasing in a unified KV cache and by accelerating novel generation with prompt\-lookup speculative decodingSaxena \([2023](https://arxiv.org/html/2605.26289#bib.bib7)\)under per\-slot acceptance gating, we convert an𝒪\(n\)\\mathcal\{O\}\(n\)per\-turn cost into an𝒪\(Δt\)\\mathcal\{O\}\(\\Delta\_\{t\}\)delta\-only cost\. For novel agentic requests with structured outputs, the speculative decoder reduces the generation forward\-pass count by an order of magnitude on predicted token sequences\.
For operators of large inference clusters, the same techniques are equivalently a utilisation argument\. Each redundant prefill the radix cache eliminates, and each accepted speculative window the prompt\-lookup decoder validates in one forward pass, is FLOPs no longer spent re\-deriving state the cluster has already derived\. The 10–45% sustained utilisation band typical of large inference deployments is, in substantial part, a tally of exactly these redundant operations; removing them does not require new hardware or new model weights\.
## References
- Kwon et al\. \[2023\]Kwon, W\., Li, Z\., Zhuang, S\., Sheng, Y\., Zheng, L\., Yu, C\.H\., Gonzalez, J\., Zhang, H\., and Stoica, I\.Efficient Memory Management for Large Language Model Serving with PagedAttention\.*Proceedings of the 29th Symposium on Operating Systems Principles*, 2023\.
- Zheng et al\. \[2024\]Zheng, L\., Yin, L\., Xie, Z\., Huang, J\., Sun, C\., Yu, C\.H\., Cao, S\., Kober, C\., Sheng, Y\., et al\.SGLang: Efficient Execution of Structured Language Model Programs\.*arXiv preprint arXiv:2312\.07104*, 2024\.
- Anthropic \[2024\]Anthropic\.Prompt Caching\.*Documentation*, 2024\.
- Zhong et al\. \[2024\]Zhong, Y\., Liu, S\., Chen, J\., Hu, J\., Zhu, Y\., Liu, X\., Jin, X\., and Zhang, H\.DistServe: Disaggregating Prefill and Decoding for Goodput\-optimized Large Language Model Serving\.*OSDI*, 2024\.
- Yu et al\. \[2022\]Yu, G\.I\., Jeong, J\.S\., Kim, G\.W\., Kim, S\., and Chun, B\.G\.Orca: A Distributed Serving System for Transformer\-Based Generative Models\.*OSDI*, 2022\.
- Leviathan et al\. \[2023\]Leviathan, Y\., Kalman, M\., and Matias, Y\.Fast Inference from Transformers via Speculative Decoding\.*ICML*, 2023\.
- Saxena \[2023\]Saxena, A\.Prompt Lookup Decoding\.[https://github\.com/apoorvumang/prompt\-lookup\-decoding](https://github.com/apoorvumang/prompt-lookup-decoding), 2023\.
- Norgren \[2026\]Norgren, V\.Attention Once Is All You Need: Efficient Streaming Inference with Stateful Transformers\.*arXiv preprint arXiv:2605\.13784*, 2026\.[https://arxiv\.org/abs/2605\.13784](https://arxiv.org/abs/2605.13784)\.Similar Articles
Tool-Making and Self-Evolving LLM Agents in Low-Latency Systems
This paper presents a method for compiling repeated standard operating procedure steps into validated, versioned tools before deployment, replacing inference-time code generation. In a fulfillment center alarm-triage system, this approach reduces p50 latency by 42% and end-to-end error rate by up to 53%.
CacheRL:Multi-Turn Tool-Calling Agents via Cached Rollouts and Hybrid Reward
CacheRL trains small agent foundation models for multi-step tool-calling tasks, achieving 92% process accuracy (approaching GPT-5's 94%) with 100x less compute using cached rollouts and hybrid reward shaping, with innovations in knowledge transfer, cache-aware rewards, and iterative SFT/GRPO training.
Workload-Aware Caching for Multi-Agent Systems
This paper presents a workload-aware cache eviction policy for multi-agent systems that uses recomputation cost, DAG dependency count, and agent invocation frequency to retain valuable cached entries, reducing latency by up to 64.7% over uncached baselines and 31.1% over the next best finite-capacity method.
ReCache: Efficient KV Cache Reuse and Compression for Tool-Augmented LLM Agents
ReCache is a framework for efficient KV cache reuse and compression in tool-augmented LLM agents, achieving significant speedup and memory reduction while maintaining performance.
Task-Oriented Key-Layer KV Communication for Efficient Latent Multi-Agent Collaboration
The paper proposes KITE, a training-free framework that shifts latent multi-agent KV communication from sender-side state fidelity to receiver-side task sufficiency, transmitting only a task-effective key layer. Experiments show 28-36× communication reduction, up to 3× inference speedup, and accuracy gains of up to 23.3 percentage points across seven benchmarks.