What Your Agent Runtime Actually Needs to Own When Memory and Long-Running Processes Are First-Class Requirements
Agent runtimes, not models or functions, must own isolation, state, and sleep.

Persistent AI agent infrastructure differs from serverless functions because an agent’s work must live on after a single request ends. When memory and long-running processes are required, the runtime must own per-session isolation, durable execution state, and lifecycle authority. A stateless function can run one step, but it cannot supply those guarantees for the whole task without another layer owning them.
Why do long-running AI agents fail on serverless infrastructure?
Conventional LLM serving optimizes individual model calls through scheduling, batching, and resource management. An agent uses those calls in a loop as it keeps observing, acting, executing, and updating. The response is not the end of the work. Between calls, the agent may retain files, credentials, intermediate computation, and a session identity across many turns and potentially days.
The Aries paper frames this as a shift from serving model calls to sustaining end-to-end execution trajectories. Faster GPU decoding remains useful, but progress also depends on retained context, tool execution, and sandbox management. Its production traces show that tool sandboxes sit idle for long stretches, then use resources in short bursts. Keeping the process alive wastes idle resources, while discarding it loses execution state.
That mismatch creates three runtime responsibilities, namely isolation, persistence, and lifecycle. Isolation defines the session’s boundaries, persistence preserves its state, and lifecycle controls when it sleeps, resumes, or ends. These are not abilities a better model can acquire. The model cannot enforce a kernel boundary or suspend its own VM. Delegating those duties to stateless infrastructure leaves the application to rebuild the missing machinery.
What token-centric metrics miss about where agent time actually goes
Aries finds that token-centric metrics miss non-inference bottlenecks that govern end-to-end task progress. An inference latency chart cannot explain how long a sandbox took to start, how much time it spent idle, or what checkpointing added to the task. Faster decoding may therefore leave the main delay untouched. The right unit of observation is the trajectory, including the work and waiting between model calls.
Agent benchmarks ask whether a task reached the correct result, while system benchmarks measure isolated model calls or stateless functions. Neither shows how task progress ties to what happens across the runtime. That gap hides where resources actually go. For a burst-then-idle sandbox, suspension and state serialization can be as consequential as the next model response.
Aries also finds that retaining more context yields diminishing accuracy benefits while reducing serving capacity. More memory is not automatically better memory. Context retention consumes resources, so deciding what to keep is partly a runtime allocation decision as well as a prompt-engineering choice. The runtime must own adaptive context management instead of leaving it entirely to the model or application. Otherwise, a team can make one metric look better while making the serving system as a whole work less well.
Why isolation must be per session, not per host, and what "per session" actually requires
A host-level view cannot cleanly attribute activity to a session, and a shared host boundary does not define what each agent may touch. Agents can write scripts, install packages, and work with file descriptors. Their generated code must be treated as untrusted. A standard container separates processes but still shares the host kernel, which leaves the wrong boundary exposed for this workload.
The isolation spectrum runs from shared-kernel containers through user-space kernels such as gVisor to micro-VMs such as Firecracker and Kata Containers. User-space kernels intercept and re-implement system calls, with syscall-compatibility tradeoffs. Micro-VMs give workloads their own kernels behind hardware virtualization. The choice depends on how untrusted the code is. For LLM-generated or user-supplied code, the relevant comparison is between user-space kernels and micro-VMs.
Google’s Agent Compute Engine design and AWS Lambda MicroVMs converge on one microVM per agent session. That unit bounds the blast radius, maps audit records to a session identity, and gives teardown a clear target. Kernel isolation alone is not enough, though. An agent that is allowed network access and has a leaked credential can still cause a security incident, so the execution boundary must have network-layer egress controls alongside it.
The Agent libOS paper explains why authorization must also sit below the agent’s own logic. A retrieved page can prompt an agent to generate a tool, send context elsewhere, and preserve the result in a reusable image. A confirmation wrapper is not a sufficient boundary. Permission must be enforced at the primitive that touches the resource, rather than inferred from the agent’s ability to see or request an action.
The Lingering Authority paper identifies a further gap. A tool needed for one subgoal may remain available for the entire task, extending its authority beyond the work that justified it. By the time session teardown happens, that access has already lasted too long. The runtime needs typed, scoped capabilities that it revokes at subgoal boundaries, rather than trusting the agent to stop using access it still has.
What durable state actually means for an agent and why the filesystem is not enough
Firecracker’s snapshot-restore mechanism can pause a micro-VM, preserve memory and device/vCPU state, and resume it with that context intact, potentially on another host. AWS Lambda MicroVMs, announced June 22, 2026, apply this design to user or agent sessions that start from snapshots, suspend when idle, and resume with memory and disk intact. This is more than keeping a volume attached. It preserves the execution context that files alone cannot represent.
Suspension also changes what must remain running during a wait. Serializing guest state and stopping the VM can bring CPU and memory bills down to zero while charges for snapshot and storage continue. DigitalOcean’s production design separately uses Managed PostgreSQL Advanced Edition for execution state. That separation addresses a crucial engineering distinction. The microVM session is not the system of record, and durable records must survive independently of a particular running machine.
The trap is treating a restored snapshot as proof that the outside world is unchanged. It is not a time machine. Dead sockets must be recycled, tokens refreshed, and external state validated before work continues. The runtime must make those resume semantics explicit rather than silently leaving recovery to application code. Aries also identifies snapshot-based state management as costly for aggressive suspension, so teams should evaluate actual restore latency and validate any assumption of sub-second resume.
Agent libOS keeps state for more than one suspended process. Its design tracks memory, activated skills, child processes, and reusable checkpoint images as objects that each have authority limits and audit records. Recovery must also account for external effects. Its prepare–dispatch–settle protocol makes ambiguous dispatched outcomes explicit so that recovery does not blindly replay them. A separate evidence plane records intent, outcomes, and causal links to explain why decisions were made, without giving permission.
Lifecycle authority: who decides when a process sleeps, resumes, or is torn down
Knowing how to serialize state does not decide when doing so is safe. The model has no authority over the VM and no host-level view of whether execution is idle or blocked on I/O. An application can request suspension, but the runtime must execute it. Only that layer can coordinate a consistent checkpoint with pending tool effects and socket state.
Stateless functions use a different contract. Their platform can end an invocation between requests because the next invocation is expected to restart from supplied inputs and external state. That is appropriate for stateless work. It breaks a long-running agent when execution depends on state that those inputs cannot reconstruct. A session runtime with checkpointing, such as the MicroVM design, supplies a different contract from ordinary function execution.
Human approval makes this distinction concrete. Pausing mid-task, handing a desktop to a person, and later returning control requires the runtime to preserve the agent’s resumable context. Agent libOS controls access to protected operations at the resource-touching primitive, with exact one-shot human release for sensitive egress. The runtime holds the effect pending that decision and does not blindly retry an ambiguous outcome.
At swarm scale, the same authority becomes part of throughput. Computer-use RL training collects multiple rollouts per task across batches of tasks, with hundreds of VM environments running in parallel. Provisioning and teardown must therefore be programmatic. A disposable sandbox must also be deleted with its disk when the task ends, preventing credentials and intermediate artifacts from outliving their authorized scope.
Lifecycle control also enforces the limits described by Lingering Authority. Revoking access at a subgoal boundary requires the runtime to track task structure and reject expired capabilities before they cause effects. Ending the VM is only the final boundary. Isolation defines what the session can reach, persistence preserves what it needs, and lifecycle determines when both state and permission must change.
How the ownership argument changes when agents run GUI applications on Windows, legacy desktops, or mobile
Computer-use agents add a display environment to the state the runtime must own. Windows desktops, Citrix sessions, and Android phones require a persistent display, a stable accessibility surface, and a machine an agent and human can share. A saved filesystem cannot supply those conditions. A 100-step session also accumulates action latency apart from inference, which makes long-horizon computer use better suited to batch execution than interactive waiting.
Microsoft’s UFO2, a Windows Desktop AgentOS, uses UI Automation, native app APIs, and a picture-in-picture virtual desktop. Its desktop separation prevents agent work from taking over the operator’s physical workspace. Microsoft’s UFO³ extends coordination across Windows, Linux, and Android. These designs make the display an explicit session concern. Isolation must cover both where actions land and where code runs.
Vercel Labs’ agent-desktop, introduced October 30, 2026, illustrates the same requirement across macOS, Windows, and Linux. It runs in the background while the operator keeps working and supports several agents using the computer in parallel. Headless operation avoids moving the user’s cursor. That is a concrete form of display isolation, while human takeover adds the lifecycle requirement to transfer control without destroying the session.
For healthcare EHR systems, lending LOS platforms, and Citrix-delivered applications, these boundaries also support compliance. Windows RDP, RemoteApp, Citrix Desktop, and Citrix Virtual Apps need session isolation, audit trails, and human takeover. The identity of the operator must remain clear. HIPAA and similar frameworks require protection against cross-tenant data leakage and records of who, agent or human, performed each action and when. Those guarantees cannot rest solely on application logic.
What to look for in a runtime that takes isolation, persistence, and lifecycle seriously
Practitioners can evaluate this ownership model through five properties, including the isolation unit, checkpoint granularity, suspend-to-zero billing, lifecycle primitives, and human takeover. The isolation unit should be a per-session kernel or equivalent hardware boundary, enforced below the agent. Checkpoints should keep RAM, vCPU registers, and device state, with clear rules for how to resume so the application does not have to rebuild that state.
The remaining properties test whether that state is controllable in practice. Suspend-to-zero billing should stop compute charges during suspension. Programmatic suspend, resume, clone, and destroy operations should provide a consistent interface for orchestration and operators. Human takeover should preserve the session through the handoff. A desktop that must be rebuilt after every intervention does not meet that requirement.
General compute platforms solve a broader problem. Serverless functions can run single steps, and container orchestration can place workloads, but neither label promises the session contract laid out here. When shared or stateless infrastructure lacks that contract, the application inherits checkpointing, recovery, authorization, and lifecycle coordination, adding fragile seams between them.
A purpose-built runtime can use one substrate for distinct lifecycle profiles: long-lived agent boxes, throwaway sandboxes, and swarms of thousands of sandboxes for eval and RL pipelines. Bring-your-own-model and bring-your-own-keys designs also keep infrastructure ownership separate from model choice. For regulated healthcare, lending, and insurance deployments, dedicated environments with operator-configured application images and networks make those boundaries concrete before the agent begins work.


