What a Runtime Guardrail Costs an Agent Pipeline: A Latency Case Study on Open-Source Agent Repositories
Archit Sharma, Garima Mann
Accepted at IEEE BigData 2026, Trustworthy AI Pipelines workshop. December 2026, Phoenix.
Abstract
Runtime guardrails check the text an AI agent reads, the tools it calls and the replies it writes. Each check runs on the request path under a deadline, and a guardrail that fails open skips a detector that misses the deadline without raising an error. We measured the latency of an open-source runtime guardrail that we develop, on sessions that its own attack suite generated from 49 agent repositories (17,621 checks), then repeated the study after changes on 109 repositories (40,631 checks). Deterministic checks cost 3.5 ms at the median and 7.7 ms at p95 (engine time). The default layer, a prompt-injection classifier (plus a backstop model before the changes), raised this to 47/234 ms, and to 41/190 ms after the changes on regenerated sessions of the same 49 repositories. Run alone on the same texts, this classifier and three other open ones took 26 to 32 ms at the median. An inline hosted LLM judge cost about a second per check. With one gateway worker on SQLite, p95 at 16 parallel clients was 31.6 s before the changes and 500 ms after, but then a median of 69% of checks (12 to 94% over three rounds) skipped the classifier. We did not test the production configuration. Replaying the 458 skipped checks without a budget made 24 verdicts stricter on the primary classifier's own detections (53 with advisory backstop hits), flagging 14% of the skipped user messages and tool results. The harness, data and scripts will be released.
Cite
@inproceedings{sharma2026latency,
author = {Sharma, Archit and Mann, Garima},
title = {What a Runtime Guardrail Costs an Agent Pipeline: A Latency Case Study on Open-Source Agent Repositories},
booktitle = {IEEE BigData 2026, Trustworthy AI Pipelines workshop},
year = {2026},
url = {https://useagentfox.com/research/runtime-guardrail-latency},
}