Held While Waiting: What LLM Agent Sessions Reserve on Serverless and Agent Runtimes
Abstract
LLM agents spend nearly all their time waiting for the model. On Amazon Bedrock AgentCore, our agents waited a median of 2.7 seconds for each model reply, then computed for an estimated 5 to 40 milliseconds. AgentCore does not charge for CPU during the wait. But it reserves a separate environment, a virtual machine with its own memory, for every conversation, and keeps it reserved until the conversation is closed. So 1,000 conversations reserve 1,000 environments to do the work of 2 to 15 processor cores. A service runs out of environments long before it runs out of processing power. The shortage has two causes, and each has a fix. An environment stays reserved after its conversation ends: in the customer-service benchmark we ran, a conversation lasts 33 seconds on average, but its environment is held for 15 minutes more unless the client closes it. And an environment serves only one conversation, which is mostly waiting: in our simulation, 64 conversations sharing one environment need 59 times fewer environments, and 99 of every 100 replies are delayed by at most 40 milliseconds. The milliseconds are an estimate because they are hard to measure: a stubbed model, a timer around the model call, and steps run back to back each gave a plausible number that was too low. We show how to avoid all three. Of the two fixes, closing needs only the client. Sharing needs the platform, and of the agent runtimes we surveyed only one allows it, in part. They keep conversations apart because an agent runs tools, and sometimes code, chosen by a model. The open problem is to keep them apart without reserving an environment for each while it waits.
Create a lesson
Related papers
RASER: Resilient Agent Scheduling and Execution Runtime for HPC Clusters
Shared title terminology · Sima Attar-Khorasani, Matthias Lieber, Siavash Ghiasvand
Towards Runtime-Aware Observability for Java Virtual Threads
Shared title terminology · Wenjie Ding
Repeating Work Can Lower Energy per Successful Goal in LLM Agents
Shared title terminology · Deepak Panigrahy, Stephen Abkin, Aakash Tyagi et al.
Warpline: Binary-Level Tracing and Unified Evidence for Agentic GPU Kernel Optimization
Shared title terminology · Junyu Yin, Vinod Grover, Keren Zhou
Understanding the Energy Cost of Quantized Agents on Shared GPUs
Shared title terminology · Stephen Abkin, Alex Flesher, Aldric Yang et al.
Measuring the Energy Cost of Completing Tasks with Quantized Language-Model Agents
Shared title terminology · Stephen Abkin, Aldric Yang, Alex Flesher et al.