Skip to main content
34% of generate_report calls take over 2 seconds (303 of 892).

When it fires

The severity jump is deliberately wide. A tool that is occasionally slow is a footnote; a tool that is slow a third of the time is the thing someone will complain about.

Why two seconds

Two seconds is roughly where the person waiting on the agent notices they are waiting. Under it, the model’s own generation time dominates and your tool is not the bottleneck. Over it, your tool is. The latency buckets are stored at exactly this boundary, so the rule reads a counter rather than approximating from a percentile.

Reading the distribution, not just the rate

The four-bucket distribution on the tool page tells you which kind of slow you have:

The fixes

1

Bound the work

A default limit does as much for latency as it does for response size. Both problems usually have the same cause.
2

Stop fetching what you do not return

Loading a whole record to return three fields costs the fetch as well as the bytes.
3

Parallelise the fan-out

A tool that makes four upstream calls in sequence takes as long as all four. Most of the time they do not depend on each other.
4

Return partial results rather than waiting

A fast answer with a count of what was omitted usually beats a complete answer the model has stopped waiting for.

Slow and heavy together

A tool with both this insight and heavy payload almost always has one cause: it is returning too much, and fetching too much to return it. Fix the size and the latency usually follows.