Skip to content

What a guard check
adds to your agent

Measured on 41,520 guard calls replayed from 109 real agent repositories, and against other guards on the same machine.

57.4 msmedian per check, with the ML classifierWith the ML prompt-injection classifier included; 302 ms at p95.
3.1 msmedian per tool callTool calls are checked on structure, so they skip the classifier.
2.3 msmedian without the modelPatterns, PII, secrets, schema, unicode and code checks only.

Engine time on a laptop CPU with no GPU. The network and the agent's own model are excluded.

01

Head to head on one machine

Every guard ran on the same 880 messages, on the same laptop CPU, one request at a time. AgentFox runs five kinds of check in about the time the others take for one.

Median time per short message

milliseconds · lower is faster
AgentFox, no model7 kinds of check7.4 ms
Prompt Guard 2 22MInjection, jailbreaks25.5 ms
Prompt Guard 2 86MInjection, jailbreaks54.4 ms
LLM Guard, injection scannerInjection56.1 ms
AgentFox defaultInjection, PII, secrets, unsafe content, code63.1 ms
Guardrails AI, DetectJailbreakJailbreaks99.4 ms
LLM Guard, nine scannersInjection, PII, secrets, toxicity, more249 ms
OpenAI moderation (hosted)Harm categories387 ms
NeMo Guardrails, self-checkOne LLM policy check758 ms

Base-size models (AgentFox's classifier, the one in LLM Guard's scanner, Prompt Guard 2 86M) all take about 50 ms. AgentFox adds an HTTP round trip and its deterministic checks, 7.4 ms on their own. Its default checks take 63.1 ms, against 56.1 ms for LLM Guard's prompt-injection scanner, which looks for injection only.

SystemChecks forShort messages, p50 / p95 (ms)Long messages, p50 / p95 (ms)
AgentFox deterministicPII, secrets, injection patterns, unsafe content, schema, unicode, insecure code7.4 / 9.111.7 / 38.9
AgentFox defaultThe above, plus injection and jailbreaks by classifier63.1 / 77.6117 / 412
AgentFox default, cache onSame60.1 / 67.2104 / 401
AgentFox extendedThe above, plus similarity to known attacks71.0 / 89.0126 / 464
AgentFox with LLM judges, default modeThe above, plus injection and PII judged by gpt-4.1-mini when a rule relies on it74.1 / 98.5122 / 356
AgentFox with LLM judges always inlineSame, judged on every check865 / 1,093879 / 1,448
LLM Guard, prompt-injection scannerPrompt injection56.1 / 66.290.7 / 218
Meta Prompt Guard 2 86MPrompt injection and jailbreaks54.4 / 62.686.8 / 209
Meta Prompt Guard 2 22MPrompt injection and jailbreaks25.5 / 29.948.4 / 106
Guardrails AI, DetectJailbreakJailbreaks99.4 / 107149 / 325
LLM Guard, nine default scannersInjection, PII, secrets, toxicity and five more249 / 316348 / 650
OpenAI omni-moderation (hosted)Harm categories, not injection387 / 484395 / 509
NeMo Guardrails, self-check (gpt-4.1-mini)One LLM policy check758 / 1,049787 / 1,201
Source: benchmarks/latency/head_to_head

On long messages AgentFox reads the first 4,000 characters, where the others stop at 512 tokens. It does more work there, at a p95 of 412 ms, and reads every message to the end. With every LLM judge inline, AgentFox is about 100 ms slower than NeMo's single self-check, because its judge answers three questions where NeMo asks one. By default a judge only waits inline when an enforcing rule relies on it.

Limits
02

Per check and per agent turn

Each repository was mapped with agentfox init, and its own agents, tools and handoffs drove the traffic: single turns, five-turn sessions and multi-agent handoffs, through the same endpoints the SDK calls.

LayerWhat runsPer check, p50 / p95 (ms)Per single-agent turn, p50 (ms)
DeterministicPatterns, PII, secrets, schema, unicode and code checks2.3 / 6.48.8
DefaultDeterministic + ML prompt-injection classifier57.4 / 302179
ExtendedDefault + similarity search against known attacks, score cache on9.9 / 27677.1
With an LLM judgeExtended + injection and PII judged by gpt-4.1-mini76.5 / 1,0091,086
Source: benchmarks/latency/results/headline.json

Tool calls are the cheapest step in every layer, 3.1 ms at the median with the default detectors. Text the classifier has to read (inputs, tool results, replies) is where the time goes. A single turn makes four guard calls, summed in the last column.

Extended's median is lower than Default's because it was measured with the score cache on, so text the classifier has already scored is not read again. The similarity search itself adds only a few milliseconds over Default with the cache on (benchmarks/latency/README.md).

Messages under 200 characters take 54.5 ms at the median and 83.5 ms at p95. Between 200 and 600 characters they take 188 ms and 374 ms, because longer text gets a 1,000 ms budget so the classifier can finish reading it. Replies with judges on pay the commitment check, about 0.88 s.

03

What makes a check slower

Message length: yes

The classifier reads text in 256-token windows, so a 500-character tool result costs several times a short question.

Where it runs: yes

A hosted guard pays the network on every call. From Bengaluru to a US region that is about 310 ms before any check runs. Run the gateway next to the agent.

Session length: no

Per-check latency is flat from the first turn of a session to the fifth.

Framework: barely

LangGraph, CrewAI, AutoGen, the OpenAI Agents SDK, ADK and the rest land within a few milliseconds of each other per check.

04

What other vendors publish

Few vendors publish latency, and fewer say under what conditions. Azure Prompt Shields, AWS Bedrock Guardrails, Google Model Armor, OpenAI Moderation, Llama Guard and Guardrails AI publish none. These are the figures we found, as their authors state them.

ProductPublished latencyConditions
Protect AI LLM Guard, injection scanner104 ms mean / 107 ms p95 (ONNX)AWS m5.xlarge CPU, 384-token input
Meta Prompt Guard 286M: 92.4 ms; 22M: 19.3 msA100 GPU, 512 tokens
Lakera Guardp95 50 ms to 300 ms1 to 16 detectors, about 1k to 5k characters
NVIDIA NeMo Guardrailsabout 0.5 s added per chat turnThree rails, GPU microservices
Palo Alto Prisma AIRSabout 700 ms addedNetwork firewall intercept mode
05

How it was measured

Method
  • 119 agent repositories were examined; 109 produced an agent map and were tested: 76 public, 26 held out from the mapper work and 7 local, four of them private and anonymised.
  • Apple M1 Pro, CPU only, one gateway worker on SQLite, Python 3.12 as in the production image. A server with more workers and a server database will do better, so read these as a floor.
  • Engine time is the gateway's own time per check. The agent's model and the network are excluded unless a row says otherwise.
  • The default layer is reported with the score cache off, because the attack suite repeats text and the cache would flatter it.
06

Rerun it yourself

Every recorded call, the scripts and the head-to-head harness are in benchmarks/latency.

uv run python -m benchmarks.latency.fetch_repos var/latency/reposuv run python -m benchmarks.latency.map_repos var/latency/repos var/latencyuv run python -m benchmarks.latency.run_latency var/latency/maps var/latency/runuv run python -m benchmarks.latency.report var/latency var/latency/results run
Source: benchmarks/latency
Cite this page
@misc{agentfox_latency_benchmark_2026,
  title = {What a guard check adds to an agent: latency on 109 agent repositories},
  author = {{Nometria}},
  year = {2026},
  howpublished = {\url{https://useagentfox.com/benchmark/latency}},
  note = {Scripts and results files: https://github.com/architsharm/agentfox}
}

Security benchmarks: what each guard catches

Try AgentFox on your own agent

One command finds your agents. It starts in watch mode, so nothing is blocked until you say so.

uvx agentfox scan