Choosing Infrastructure for SaaS Products Where Every User Gets a Stateful Agent
Per-user agents need isolation, persistence, cheap idle time, and fast wake.

Per-user persistent AI agent deployment at scale requires four infrastructure guarantees together, namely isolation, persistence, near-zero idle compute cost, and sub-second wake latency. The practical architecture combines per-user micro-VMs, durable execution checkpoints, namespaced memory, and snapshot-restore scheduling. Managed platforms can absorb provisioning and fleet operations, but the architecture must satisfy all four requirements.
Why per-user stateful agents are an infrastructure problem, not a product problem
An agent that rebuilds context in every session re-reads the same files, makes the same mistakes, and cannot reliably pick up unfinished work. A better prompt does not repair that gap. Stateless LLM calls were adequate for a chatbot interaction in which a question arrived, an answer left, and nothing persisted. A per-user agent needs to plan, act, observe, and re-plan from one session to the next. Its runtime must own state as well as provide an execution slot.
Zhang et al. (arXiv 2026) describe this transition as a move from “episodic tool use” to the “Workspace + Skill” paradigm, defined by persistent state, reusable procedures, and task closure. Storage preserves state, scheduling controls compute consumption during waits, and network boundaries limit an agent's reach. These are not decisions the conversation layer can resolve.
The four requirements that define whether an architecture can survive production
The architecture has four requirements that must hold simultaneously. Isolation means one user's agent has no network, memory, or filesystem path to another user's agent or data, with boundaries enforced through kernel or hardware virtualization. Persistence means files, credentials, task state, and accumulated memory survive sleep cycles, process restarts, and redeployment.
Idle-cost economics means an agent stops using paid compute while it waits for work but keeps its durable state. Storage costs can remain during that interval. Wake latency means the sleeping agent resumes in sub-second time, rather than adding seconds of startup delay to an interactive session. These definitions form an architectural acceptance test, because strong security cannot compensate for lost state, and durable state cannot compensate for an unaffordable idle fleet.

What isolation actually requires at the execution layer
Agents that install packages, run arbitrary code, and reach external networks need a stronger boundary than shared containers offer. Containers share the host kernel with other workloads. A kernel exploit inside a container can reach that host and its other containers, while an exploit against a micro-VM's guest kernel remains within that kernel boundary. For this workload, a micro-VM with its own kernel is the minimum safe execution boundary. Maritime, a cloud platform that gives each end user's agent a permanent Firecracker micro-VM with its own filesystem, credentials and workspace, is one managed option here.
Firecracker uses one virtual machine monitor process per micro-VM rather than a shared daemon, with each guest running its own kernel on hardware virtualization. AWS Lambda uses this substrate for untrusted code execution. The design gives each agent workload its own Firecracker process and fits about as many workloads on a host as containers do. Public internet access, internal metadata services, and private APIs still require separate egress controls.
Axonius's deployment on AWS Bedrock AgentCore illustrates the network layer through per-customer runtimes connected by an ENI inside the customer's VPC and subnet. ENIs are shared across agents with identical subnet and security group configurations, so network isolation is not equivalent to requiring a unique physical allocation for every agent. Infrastructure enforces the separation.
The operational objection to self-hosted Firecracker is substantial. Docker has a well-established set of tools for container networking, but teams that self-host Firecracker must manage TAP interfaces, IP tables, and host routing. Managed micro-VM platforms do that work, so teams can keep the execution boundary without building the networking machinery themselves.
What persistence requires at the memory and state layer
Persistence divides into execution state and semantic memory. Execution state lets a workflow resume after a crash, while semantic memory lets the agent remember a returning user. A remembered preference cannot restore a failed workflow, and a restored workflow does not necessarily contain the customer's history.
Cognee's 2026 platform guide identifies LangGraph checkpointers as a representative execution-state mechanism, serializing full graph state to Postgres or Redis after every node execution. A workflow paused at step 7 can therefore resume at step 7. LangGraph keys checkpoints by thread_id, whose ownership can be enforced per tenant.
Semantic memory stores facts, entities, decisions, and accumulated knowledge for retrieval across sessions. The same guide describes four memory tiers, including working memory in the context window, episodic session history, semantic facts and preferences, and procedural rules and skills. Moving memory between those tiers sets what the agent can draw on for a given task. Flat vector search works for FAQ-style lookups, but to reason across relationships and decisions over time, an agent needs a knowledge graph paired with vector search.
Vishnyakova (2026) treats isolation as a production-grade context quality criterion, which applies directly to user-specific episodic and semantic stores. Namespaces must enforce ownership regardless of how the underlying database is shared for efficiency. A VM boundary protects execution, but it cannot replace authorization in the memory layer.
Why idle-cost economics determine whether per-user agents are viable at SaaS scale
Tool waits, approval gates, human pauses, and rate-limit backoffs leave agents idle. An always-running process still consumes paid compute during those intervals. Across a per-user fleet, that makes scheduling an economic decision before it becomes a billing discussion. Persistent availability must not require continuous execution.
Suspend-and-restore separates those two properties at the runtime layer. When idle, a micro-VM serializes its memory, CPU register state, and device state to disk, then resumes when work returns. AWS Lambda MicroVMs, announced June 22, 2026, applies this model through automatic suspend/resume, extended state persistence, and per-second billing without compute charges while suspended. Snapshot storage and read/write operation charges still apply during suspension.
Copy-on-write memory pages allow sandboxes restored from the same base snapshot to share most of their physical RAM. This reduces the resource burden of repeated environments without sharing writable user state. The orchestration harness therefore influences cost through how it schedules, suspends, resumes, and routes agents and through which model it invokes.
A power user can consume multiples of a light user's compute under the same infrastructure allocation, creating margin pressure for per-seat pricing. Outcome-based or consumption-based pricing places that variance at the product layer. Sierra AI's outcome-based model and Intercom Fin's per-outcome pricing are examples of how pricing can handle that difference. Infrastructure's role is to expose the measurement and billing surface.
Wake latency as the fourth hard constraint, and what snapshot-restore actually delivers
An interactive agent cannot make its user absorb a long startup sequence each time it wakes. Two or three seconds before the first response feels broken even if later execution is capable. Cold-booting a micro-VM takes approximately 125–200ms, before the agent runtime's own initialization adds delay. The VM boot figure alone is not the product's wake time.
At the infrastructure layer, restoring a snapshot takes single-digit to low-double-digit milliseconds of the complete time to an agent answer. By restoring existing execution state rather than rebuilding the environment, it leaves room within the sub-second product contract for the rest of the runtime. Without this mechanism, keeping wake latency low pushes the architecture toward live warm VMs and their compute costs.
How do thousands of per-user agents scale through provisioning, scheduling, and horizontal growth?
Each user's agent becomes an independent provisioning and scheduling unit. That independence lets the fleet grow without coordinating one user's execution with another's. A silo model dedicates resources to each tenant, including a VM and storage volume, but has the highest per-user resource overhead. A pool model shares an agent instance and separates sessions in application logic, reducing overhead while weakening isolation.
In the bridge model, VMs, persistent storage, and memory namespaces stay separate, but agents share the scheduling infrastructure and warm-pool management. Each session maps to an independent micro-VM, so horizontal growth adds VMs as traffic increases and releases execution resources as it subsides. Suspended snapshots replace live VMs as the reserve of ready capacity.
The Model Context Protocol standardizes connections to external tools, but each MCP server adds its full tool list to the agent's context window. With dozens of servers, an agent's tool lists can take up context and make it harder to choose the right tool. Purpose-specific tool sets limit that burden, such as GitHub, Linear, and Slack for a coding agent, or HRIS and payroll servers for an HR agent.
Managed provisioning determines how much of this machinery a product team must build. Axonius reduced multi-tenant AI agent development from an estimated eight weeks to ten days by using a managed runtime that absorbed provisioning, networking, and scheduling complexity. That example establishes a concrete reason to buy operational leverage. It does not remove the need to evaluate the boundaries the platform enforces.
Evaluating infrastructure options against the four requirements
The evaluation should test the complete deployed system. For isolation, the question is whether each user's execution receives a kernel-level VM boundary or merely container namespaces and session IDs. For persistence, the question is whether both workflow checkpoints and user-specific memory remain durable and access-controlled. A runtime with durable disks alone has not demonstrated both forms of continuity.
A platform should show whether idle agents suspend, which storage and operation charges still apply, and whether it resumes from snapshots or starts with a fresh environment. A fast response from a continuously running VM does not demonstrate economical wake behavior. Equally, low idle charges do not establish that a returning user receives a responsive agent.
Self-hosted Firecracker provides the isolation substrate and supports the snapshot mechanism, but transfers networking, snapshot management, and scheduling to the team. Managed platforms absorb those responsibilities at the cost of some control and customization. The appropriate choice depends on team size and infrastructure maturity. For a team without the capacity to operate that fleet machinery, a managed platform is the appropriate route if it meets all four requirements.
The guide treats framework compatibility and self-host support as evaluation criteria, with MCP server support, LangGraph integration, and a REST API providing integration breadth beyond one orchestrator. Deployment workflow is another practical test. The target is a single push from code to a live API endpoint, with provisioning, snapshot scheduling, and network configuration handled underneath, because manual deployment overhead compounds across thousands of agents.
What the architecture looks like when all four requirements are met
The resulting architecture gives each user a durable workspace without reserving active compute indefinitely. A Firecracker micro-VM has its own kernel, persistent disk, and network interface, and separate network policies control what it can reach beyond that boundary. Execution checkpoints preserve workflow progress, and namespaced semantic stores preserve the user's history and preferences.
The scheduler connects them across the agent's lifecycle. Code reaches an API endpoint through the deployment layer, and a user receives an isolated runtime on demand. Between sessions, snapshots retain runtime state while active compute is released. When the user returns, restoration makes that workspace available again without treating the session as a new agent.
This is the infrastructure expression of the “Workspace + Skill” paradigm. Reusable procedures and accumulated context become durable parts of the user's agent across requests. The dedicated agent is a persistent identity and workspace whose continuity is independent of continuous execution. That distinction is what lets the product offer continuity to every user while the fleet allocates compute only when execution requires it.


