Batching independent calls
IF an agent makes runs of three or more rapid, short, independent calls → THEN batch them into one call with a single shared system prompt → RESULT the repeated system-prompt tokens and per-call overhead disappear, and the saving is projected from the batch size.
The signal in the agentic log
- Signal: runs of ≥ 3 turns that are
- rapid — under 5 seconds between calls,
- short — fewer than 1,000 output tokens, and
- independent — tool-call overlap < 0.80.
- Field source:
Timestamp,Tokens.OutputTokens,ToolCalls,Cost.
The setup
- Accept the batching opportunity recommendation.
- Restructure the agent to issue the independent calls as one batched call, sending the system prompt once.
The result
- The detector models roughly 1,000 tokens saved per extra call plus about 100 ms of overhead per call, priced at the input rate.
- Batching also reduces incidental latency, which shows up as a lower
LatencyMsaverage.
Behind it
- Detector: batching opportunity.
- Related: Oversized model on routine turns if the batched work also runs on a model larger than it needs.