Work / A benchmark of vLLM, SGLang and TensorRT-LLM on agent-shaped traffic: concurrent agents served within a latency SLO, and the cost per agent task.How many AI agents fit on one GPU?

Context
I build LLM agents, such as Alibi, and wanted to know what serving them costs. An agent works in a loop: call a tool, read the result, decide the next step. Every step resends the same long instructions and tool schemas plus everything so far. Most serving benchmarks measure chat traffic, so they don't answer the question an operator asks: how many agents can one GPU run before they feel slow? This is a personal project, separate from my employer's work.
The problem
Peak tokens per second says little about agents. What matters is how many concurrent sessions stay within a latency budget, and what a finished task costs at that load. Answering that fairly means the same workload and client for every engine, repeated runs, and a check that a faster quantized model still calls its tools correctly.
What I did
- Wrote a seeded workload generator for agent sessions (a shared 2,000-token tool prefix, a growing context, short tool-call outputs), with chat traffic as the control.
- Wrote an async streaming load client and cross-checked it against NVIDIA AIPerf.
- Ran vLLM, SGLang and TensorRT-LLM one at a time on a rented NVIDIA A40 (48 GB), raising concurrency until the p95 latency SLO broke, three to six runs per level.
- Measured tool-calling accuracy on a fixed 200-case subset for every model variant, and quantized my own INT4-AWQ checkpoint with TensorRT Model Optimizer when TensorRT-LLM could not load the published one.
- Added a planner that sizes a deployment (GPUs and cost) from the measured capacity.
Outcome
Prefix caching decided capacity. With it, all three engines served 6 concurrent Qwen3-4B agents within the interactive SLO (p95 time to first token at most 1 s, inter-token latency at most 50 ms), against 2 to 3 without it, and the cost per agent task fell to between a third and two fifths.
A quantized bigger model also beat a smaller full-precision one: Qwen3-8B in INT4-AWQ served 4 to 6 agents within an 8 s step budget, against 2 to 4 for Qwen3-4B in BF16, at about the same tool-calling accuracy (91 to 92 %).
This is one GPU, a synthetic workload, SLOs I chose and default engine settings, measured on 21 and 22 October 2026, so it is a snapshot rather than a ranking of the engines. The report lists the caveats and what I could not explain.
Stack & notes
Python · vLLM · SGLang · TensorRT-LLM · TensorRT Model Optimizer · NVIDIA AIPerf · Qwen3 models.
Every number and graphic regenerates from the raw results in the repository.