The Operational Signals That Tell a Multi-Tenant Agent Platform It Has Outgrown Serverless
Five measurable signs show when long-running agents have outgrown functions.

Persistent AI agent infrastructure fits better than serverless functions when sessions run for a long time and need durable state, predictable response times, and strong tenant boundaries. The operational signals are repeated restarts, slow cold starts, rising costs at sustained utilization, isolation gaps, and memory failures under concurrency.
Why serverless is the right starting point for a multi-tenant agent platform
AWS Lambda and Google Cloud Functions offer a sound starting point for intermittent, unpredictable sessions. Fine-grained pay-as-you-go billing keeps spending tied to use, while automatic scaling removes much of the work of managing capacity. Sparse demand makes those advantages especially valuable. A platform does not need to keep a fleet running for agents that appear only occasionally, and automatic per-session teardown reduces the infrastructure it must manage.
Agents also spend much of their time waiting for LLM responses, third-party APIs, or human input. During those gaps, provisioned machines can sit idle and still cost money. Serverless can avoid that waste when the workload can release compute between actions. There is no cluster to manage or scaling policy to tune. At low to moderate utilization, those savings and operational benefits can outweigh the work needed to fit agents into functions.
Why do long-running AI agents struggle with serverless functions?
A stateless request can finish and leave its execution environment behind. An agent often cannot do that cleanly. Its working environment has installed packages, files, conversational history, and tool state that it needs for later actions. Those dependencies map more naturally to a persistent disk and retained runtime than to a series of disposable invocations.
TenonAgent describes agents as workflows that run for a long time, have multiple stages, and need different resources in each phase. Waiting for a model uses little local CPU, but tool calls and code execution cause bursts of activity. The workflow is not one uniform unit of work. A scheduler that sees only an opaque function invocation lacks the action-level view needed to respond to those changes.
Systems that serve agents therefore often keep orchestration separate from tool execution and keep an isolated sandbox across actions. That sandbox lets later steps reuse files, processes, runtime state, and cached data. A stateless function cannot provide that continuity by itself, so the surrounding platform must supply it. Determining whether that extra machinery has become a constraint requires operational measurements.
Execution time limits and state-reconstruction overhead as the first measurable signals
The first hard signal appears when agents routinely approach or exceed the execution window available to them. The task is still running, but its invocation must end. Continuing then requires a restart or state reload. If that resume means cloning repositories, reinstalling packages, and rebuilding working memory, the platform is spending time recovering an environment, delaying progress on the task.
The useful measurement is the fraction of sessions that need a mid-task restart or state reload. Reconstruction time belongs beside that fraction. A rare restart has a different operational weight from a recovery path used throughout normal work, especially when users wait through it. As that fraction grows, reconstruction stops being an exceptional expense and becomes part of the cost of serving agents.
Task retries need careful interpretation because time limits are not their only cause. A sandbox can also fail when its memory allocation cannot support a demanding action. Snapshot-based resumption keeps execution state, so it can resume without rebuilding the environment.
Cold-start latency as a user-facing SLO signal, not just an infrastructure metric
Cold-start latency becomes a migration signal when it breaks the response time users have been promised. That promise may be a formal service-level objective, or SLO, or simply the responsiveness the product leads users to expect. Either way, users experience the full delay. A fast tool call does not compensate for a long wait before the agent can begin it.
The relevant comparison is p50, p95, and p99 agent response latency split by warm and cold session starts. Those measures show how the slow tail differs from what usually happens. When cold sessions keep missing the response-time target, an overall average can hide the problem.
Bursty tenant activity can trigger cold-start spikes across concurrent sessions, so users do not all receive the same responsiveness. This becomes a fairness issue as well. Snapshot restore can reduce the startup work, but its value must be judged against the complete request-to-response budget. A fast restore alone is not an end-to-end latency guarantee.
Cost inversion at high utilization: when serverless billing becomes the most expensive option
Serverless costs change as more agents are active and sessions last longer. When utilization is sparse, paying only for use costs less than keeping spare machines running. Sustained demand narrows that advantage. Past the workload’s break-even point, the total serverless bill can be higher than the cost of dedicated compute that gets enough steady use to be worth keeping.
The bill includes more than useful task execution. LLM applications may need substantial minimum memory allocations, and per-request initialization may repeat LLM calls that a retained environment could avoid. Long-running containers can also cache embeddings to avoid recomputation. Repeated setup is not free at volume. Because of these costs, utilization and how long sessions last tell more about which model to choose than one unusually expensive day does.
Always-on compute has the opposite weakness when demand is low. The OpenHands architecture incurred a fixed monthly EC2 cost regardless of utilization while supporting a moderate number of concurrent conversations. Its openhands-infra v1.0.0 release moved to ECS Fargate, using dedicated tasks per conversation and stopping inactive tasks to eliminate idle costs.
Tenant-isolation gaps and their compliance and security consequences
An isolation gap is different from a slow response. It can expose one tenant’s data to another. In a single-process or shared-container deployment, users may share a process, memory space, and local directory structure while agents execute tools, modify files, and manage credentials. With that setup come risks of directory traversal, unauthorized credential access, and cross-tenant data leaks. These consequences are specific to the deployment boundary described here.
Application-level boundaries can fail independently of the compute boundary. A sub-agent that retrieves data without the correct metadata filter can receive pieces of another tenant’s index. A private machine does not repair that missing filter. Compute isolation and data-access isolation therefore each need their own checks, especially when a leak might stay hidden until a support ticket or audit.
The execution boundary still sets the limits of containment. Containers share a host kernel, while gVisor interposes a userspace kernel over a reduced syscall surface. Firecracker microVMs give each sandbox its own guest kernel, limiting the attack surface to KVM and the VMM device model. For untrusted or LLM-generated code, that is the stronger boundary. In healthcare, screenshots from agents reading EHR screens can contain PHI, making the model endpoint, screenshot store, and logs part of the BAA scope. Kernel separation alone does not meet those compliance obligations.
Memory oversubscription and resource contention as a scale-specific signal
Memory pressure can stay hidden until enough sessions run at the same time. TenonAgent describes the tension between allocating every sandbox for its lifetime peak and oversubscribing constrained host memory. Peak allocation strands capacity during quieter phases. Aggressive oversubscription instead risks contention, out-of-memory failures, and expensive workflow retries when agents grow at the same time.
The agent’s internal lifecycle explains why static allocation struggles. While an agent waits, it tends to use little local CPU and add little memory, but tool invocation and code execution can cause bursts of CPU work, I/O, and allocation. Quiet does not necessarily mean small, however. A waiting sandbox may retain substantial memory from earlier actions even when its CPU use is near zero, so idle execution does not imply readily reclaimable memory.
The scale-specific signal is concurrent growth followed by memory failures and task retries. An aggregate dashboard can make that pattern look harmless because quiet sessions dilute the peaks of busy ones. Average utilization is the wrong lens here. Understanding whether a failure coincides with tool execution, code execution, or retained memory requires per-action or per-phase telemetry.
How the signals cluster: the utilization-latency-isolation triangle that defines the migration moment

High utilization alone does not establish that serverless is wrong. Short, stateless sessions can still work well in right-sized functions, even on a busy platform. Cold-start latency is not conclusive on its own either. At low session counts, provisioned concurrency or warm pools can mitigate it without demanding a different architecture. That changes when keeping enough capacity warm costs nearly as much as dedicated machines.
Isolation requirements add the third side of the triangle. Shared-container isolation may be acceptable for some workloads, but agents executing untrusted code or handling regulated data face a different standard. A data leak requires action immediately. On its own, it does not show which hosting architecture the platform needs, because application-level access errors and execution-boundary failures need different fixes.
The migration pattern emerges when these constraints limit one another’s fixes. Warm capacity lowers latency but costs more, and stronger per-session boundaries change how compute must be assigned. Timeout-driven reconstruction and concurrent memory failures reinforce that diagnosis by showing the cost of repeatedly discarding or statically sizing stateful environments. At that point, tuning standard stateless functions cannot meet all the requirements together.
Persistent, per-agent machines as the architecture that resolves all five signals
For a platform showing that cluster, the architectural response is a persistent, resumable machine for each agent session. Maritime offers this model through Firecracker micro-VMs with persistent filesystems, including persistent agent boxes, disposable sandboxes, and snapshot-based sandbox swarms. Its machines are billed per second with no minimums or idle charges while sleeping, preserve installed packages and working state across sessions, and wake in about a second.
The core mechanism is snapshot and restore. Firecracker memory-maps the snapshot file, loads CPU state, and resumes execution where it stopped. Resumption skips reconstruction, including the need to run package installation again. With a persistent execution model, a task can also run without being split to fit a stateless function’s invocation limit, though individual services can still set session limits. Restore time remains part of the response budget.
Sleeping machines preserve the economic reason for starting serverless without requiring the agent to discard its environment. They also separate the lifetime of the agent from its active residency in memory. That addresses the source of the memory-allocation tension, rather than treating every waiting agent as continuously active compute. Active concurrent peaks still require sufficient capacity. Likewise, a guest kernel gives tenants a stronger boundary, but retrieval permissions and regulated data handling still need to be dealt with separately.
AWS Lambda MicroVMs, announced 22 June 2026, offer a serverless-adjacent option with a Firecracker microVM for each user or agent session. They start from a snapshot, suspend when idle, and resume with memory and disk intact for up to 8 hours. Initialization cost is paid at build time. This is a meaningful departure from standard Lambda functions, though the session limit and serverless billing model remain part of the comparison.
DigitalOcean Managed Agents, in public preview, use Harness Runtime with Firecracker microVMs per session. Their warm-path target is to keep end-to-end latency within a sub-second budget. That target addresses more than VM startup alone. The managed product gives teams fewer ways to configure it when they need custom OS images, Windows environments, or phone-use agents.
The practical choice is therefore workload-specific. Persistent machines address continuity, startup work, idle spending, execution isolation, and memory residency through one execution model, but product limits and compliance scope still differ. When the five operational signals fire together, the question is no longer whether to migrate from stateless functions. It is which persistent-machine architecture fits the platform’s current workload mix and compliance requirements.


