Trading Cycles for Rate-Limited Tool Gateways Shared by Parallel Agents

Parallel language-model agents are fast in isolation. They compile a request into a graph of tool calls and fire independent calls at once. In deployment, though, many such agents share the same search, retrieval, or database API, and that API has a rate limit. The limit puts the agents back in a single line. A first-come-first-served queue then gives scarce early slots to whichever calls arrived first. Many of those calls are speculative prefetches or calls whose results nobody will read for several more seconds. This note proposes that the gateway in front of the shared API should never reorder its queue by fiat. It should reorder only by trades: a call that can afford to wait swaps its early slot with a call that cannot, and only when nobody ends up later than they actually need.

The tool for finding such trades comes from fair division, the study of splitting indivisible items among agents. There, an allocation is certified as Pareto optimal (no reallocation helps someone without hurting anyone) by checking that a directed "who would like whose item" graph has no cycle containing a strict preference. That check runs in linear time. Applied to the gateway, it gives two things. The first is a scheduler that clears these improvement cycles every scheduling epoch. The second is a certificate the operator can show tenants: no tenant was made worse off than under the first-come-first-served queue, and no further no-loss improvement was left on the table.

Core Claim

The claim has three parts. First, modern parallel agents create a lot of slack: the time between when a call is issued and when the agent will actually consume its result. Second, slack turns each call's preference over time slots into a simple two-level ordering: any slot before its "need-by" time is equally good, and later slots are worse. Third, under such preferences, cycle clearing in an exchange graph recovers most of the latency that a central earliest-deadline-first scheduler would recover. It does so while also guaranteeing that no tenant is ever worse off than its first-come-first-served position, and while giving tenants no gain from exaggerating urgency.

The third part is what separates this from just running a priority scheduler. A tenant that claims every call is urgent declares no indifference. It therefore offers nothing to trade and gains nothing. Under earliest-deadline-first, the same lie moves that tenant ahead of everyone else.

Concretely, call $c$ is issued at time $a_c$ and has need-by time $d_c$, the moment its consumer (a planner still streaming, a reasoning step, or an unconfirmed speculative branch) will be ready to read the result. Its preference between slots $s$ and $s'$ in the current epoch is

$$ s \succeq_c s' \iff \max(s, d_c) \le \max(s', d_c), $$

so all slots up to $d_c$ tie, and later slots are ranked by earliness.

The exchange graph has one node per call. It has an edge from $c$ to the holder of slot $s$ whenever $c$ weakly prefers $s$ to its own slot. The edge is strict when that preference is strict. An allocation is Pareto optimal with respect to these reports exactly when the graph has no cycle containing a strict edge. This is the single-unit form of the characterization that Optimal Reallocation under Additive and Ordinal Preferences proves for lexicographic preferences, where it reduces verification to linear-time cycle detection.

At the tenant level, a tenant holds a bundle of calls and counts how many meet their need-by times. Tenant utilities are then additive with two values per call. That is the regime in which Efficient reallocation under additive and responsive preferences shows improvements can be found by maximum flow, rather than the coNP-complete regime of general cardinal utilities.

Why the Two Directions Meet Here

The parallel-execution papers motivate the problem. They supply the workloads and leave the contention question open. An LLM Compiler for Parallel Function Calling dispatches a dependency graph of calls as soon as parents resolve, and a streamed planner launches early calls while planning continues. Flash-Searcher prefetches downstream data before prerequisites finish and corrects branches later. Speculative Actions pre-executes guesses from a small model and discards those the main model rejects. P-ReAct issues tool calls first and reasons while waiting. Each of these designs deliberately creates calls with slack. Flash-Searcher and EvoC2F both note that aggressive parallelism runs into API rate limits and resource contention. Both treat that contention with queues or serialized locks, and both optimize a single agent's plan, not the shared resource.

The two nearest coordination papers constrain the design. The Orchestrator Bottleneck chooses sequential, parallel, or hierarchical execution for one workflow using closed-form thresholds. Its finding that planning overhead above about 15% erases coordination gains is a hard budget for any gateway logic, including ours. Towards Pareto-Optimal Tool-Integrated Agents uses "Pareto" for the accuracy-versus-tool-count trade-off of one policy trained by reinforcement learning. It does not concern allocation among agents.

On the fair-division side, the cycle-elimination machinery is reused directly, but the source papers are static and offline. Necessarily Optimal One-Sided Matchings certifies optimality under partial preferences by acyclicity of a trade graph. This matters because our need-by times are estimates. Almost proportional allocations of indivisible chores clears envy cycles among agents bearing costs. None of these handles items that expire in milliseconds or agents that arrive mid-epoch. That online adaptation is the technical work here.

Research Program

We would build a gateway that sits in front of a rate-limited API. It batches pending calls into epochs of $W$ seconds, so a limit of $R$ calls per second yields $RW$ slots per epoch. Each agent runtime attaches a need-by estimate to every call. The estimate comes from what the runtime already knows: whether the planner is still streaming, the expected length of the reasoning step before the result is consumed, or whether the call sits on an unconfirmed speculative branch.

Initial slots follow arrival order, which serves as the endowment. The gateway then repeatedly finds a cycle with a strict edge and rotates slots along it, in the spirit of top-trading cycles, until the certificate holds. Calls that arrive mid-epoch join at the tail with their first-come-first-served slot. Cross-tenant reordering is safe because tenants' calls are independent. Within one tenant, a swap that would violate that tenant's own dependency order is simply never preferred. Write calls of the kind EvoC2F marks as side-effecting keep their relative order within a tenant.

Three analyses accompany the system. First, we would prove or refute that misreporting urgency cannot help a tenant under this single-unit trading rule with ties. We treat this as a conjecture, since strategy-proofness with indifferences is delicate. Second, we would measure how often reported need-by times are wrong, and use the necessary-optimality view from Hosseini et al. to schedule conservatively when estimates are uncertain. Third, we would check the per-epoch cost of cycle clearing against the 15% overhead budget.

Baselines

The naive reference point is the first-come-first-served queue that rate-limited gateways and the cited agent systems effectively use today. It is the endowment our method starts from, so every gain is measured against it. Beating it is necessary but not sufficient.

The strongest competitor is earliest-deadline-first scheduling on the same reported need-by times. It uses exactly the same information as our method but reorders centrally. Under truthful reports it should match or beat us on mean and tail latency. It will be run on identical replayed traces and receive identical need-by estimates, with no tuning advantage on either side; the only free parameter, epoch length $W$, is swept equally for both. Beating it means one of two outcomes. Either we come within a small margin of its mean latency while showing zero tenants worse off than first-come-first-served, where it shows some. Or we strictly beat it once some fraction of tenants overclaims urgency.

A global critical-path scheduler sees every tenant's full dependency graph and true call durations and minimizes total completion time. It serves as an oracle upper bound on achievable latency, not as a deployable competitor.

A per-tenant fair-share scheduler, which gives each tenant a fixed share of the rate limit in round-robin order, represents the standard multi-tenant answer.

Two ablations isolate the proposal's ingredients. The first restricts trades to pairwise swaps, with no longer cycles, to test whether cycle structure matters. The second keeps full cycle trading but sets every need-by time to the issue time, which removes slack. Since all slots are then ranked purely by earliness, any gain that remains cannot be credited to slack information.

No reported result was found on Lacuna for any scheduler under multi-tenant API contention. The closest single-tenant reference numbers come from runs that report no shared rate limit. LLMCompiler reports a 1.8x to 3.7x speedup over ReAct. Flash-Searcher reports reducing BrowseComp execution time from 27.4 to 9.6 minutes against OAgents. Part of our study is measuring how much of these speedups survives contention.

Why not just…?

Why not just use earliest-deadline-first on the reported need-by times? This is the real threat. If tenants report honestly and operators do not care about any tenant being made worse off, it may simply win on mean latency. The proposal's case rests on two measurable differences. The first is individual rationality: earliest-deadline-first can push a tenant behind its arrival-order slot, while trading cannot, and we count such violations per epoch. The second is robustness to overclaiming: under earliest-deadline-first, a tenant that marks every call urgent jumps the line, while under trading it offers nothing and gains nothing. The manipulation experiment below settles whether this difference is large enough to matter. If it is not, we would present the cycle checker mainly as an audit tool for existing schedulers.

Why not just give each tenant a fixed quota? Fixed shares waste capacity whenever a tenant is idle or its calls all have slack. They also cannot move an early slot from a tenant that does not need it to one that does. The fair-share baseline measures this directly through deadline-miss rate and tail latency at matched total throughput.

Why not let an LLM orchestrator negotiate slot priorities? Each negotiation round is another model call on the critical path. The Orchestrator Bottleneck shows planning overhead above roughly 15% erases coordination gains, and its strategy selection falls to 51% accuracy on ambiguous requests. Our gateway logic is graph search over a few hundred nodes per epoch. We will report its wall-clock cost per epoch as a fraction of epoch length.

Why not just raise the rate limit or speculate less? Limits are usually set by external providers. Speculation and prefetching are what make these agents fast in the first place: Speculative Actions reports a 19.5% average execution-time reduction. The goal is to keep those calls and let them yield gracefully, not to forbid them.

Proposed Experiments

We would run LLMCompiler-style agents on ParallelQA and HotpotQA, Flash-Searcher-style agents on the 166-question GAIA dev split and BrowseComp, and speculative agents on WebShop. Each agent's calls to a shared search API would be logged with issue time, consumption time, dependency edges, and side-effect type. These logs are then replayed with $N$ concurrent tenants, mixing workloads, across a sweep of rate limits from contention-free to heavily oversubscribed. A smaller live deployment then checks that replay conclusions hold when latency feeds back into agent behavior.

Answer accuracy is reported alongside latency to confirm that scheduling changes do not alter answers through timeouts. We report it against published numbers where they exist: GAIA accuracy from TIPEX and Flash-Searcher, and BrowseComp accuracy of 67.7% for Flash-Searcher. The other metrics are per-episode wall-clock time (mean and 95th percentile), deadline-miss rate, the fraction of tenants made worse off than first-come-first-served, the number of strict improvement cycles our checker finds in each baseline's schedules, and gateway compute time per epoch.

The first decisive check comes before any scheduler comparison: measure the slack distribution in the logs. If most calls are consumed within a few hundred milliseconds of issue, preferences are effectively strict, there is little to trade, and the idea fails cheaply. The second check is the latency gap to earliest-deadline-first and to the critical-path oracle under truthful reports, as contention rises. The third is the manipulation test: a growing fraction of tenants report need-by equal to issue time, and we track how the honest tenants' latency changes under trading and under earliest-deadline-first. The proposal succeeds if slack is common, trading stays close to earliest-deadline-first under honesty with no tenant made worse off, and honest tenants are protected under trading but not under earliest-deadline-first once overclaiming starts.