Persistent Context Storage Architecture for Per-User Computer-Use Agents

Durable storage lets per-user agents retain context across sessions without shared retrieval risks.

· 9 min read
Cover illustration for “Persistent Context Storage Architecture for Per-User Computer-Use Agents”
Agent Patterns · November 2, 2026 · 9 min read · 2,032 words

Per-user persistent AI agent deployment at scale requires isolated, durable storage for core working memory, searchable recall, and long-term archival knowledge. For computer-use agents, that storage must sit on an execution substrate with persistent disk, a dedicated kernel, and snapshot-restore. This architecture lets each user’s agent keep context between sessions, while idle agents retain state in storage with active compute freed.

Why stateless agents fail at the per-user level

A user who keeps supplying the same language preference, output format, and context for an unfinished task is doing work the agent should remember. Statelessness prevents that work from accumulating into capability. The agent cannot reliably learn that a customer prefers German or that a controller prefers Excel over PDF. It also cannot preserve a workflow across sessions or recognize a mistake it has already made. After repeated cold starts, users stop engaging.

Computer use makes this failure more consequential. An agent acting on a desktop, browser, or operating system changes things outside the conversation. Always-On Agents: A Survey of Persistent Memory, State, and Governance in LLM Agents treats task ledgers, credentials, audit records, and externally committed side effects as part of the persistent system. Without those records, the agent in a later session lacks the context it needs to make sense of earlier actions. A larger context window cannot supply durability because it remains finite, costs tokens to populate, and is discarded at session end.

The three-tier memory hierarchy that production agents use

The production memory hierarchy separates what must be immediately visible from what can wait for retrieval. MemGPT / Letta applied this operating-system model to agents, distinguishing core, recall, and archival memory. Core memory is the small working set injected into the system prompt at session start. It holds the agent’s identity, the user preferences that apply now, the state of open tasks, and the workspace instructions it needs. Its size is deliberately constrained to the immediate reasoning step.

Recall memory holds searchable history outside the context window. The agent can find conversation records, task outcomes, corrections, and past events through semantic or keyword search without putting them in every prompt. Archival memory keeps observations, learned facts, entity relationships, and domain knowledge for longer in a vector database or a combined vector and graph store. Recall preserves the experience of an interaction, while archival storage preserves knowledge that remains useful beyond it.

Three memory types cut across these storage tiers. Episodic memory records what happened, semantic memory records what is true, and procedural memory records how to do something. These types are not interchangeable with the tiers. A procedural rule may be stored in archival memory and brought into core memory when a task requires it. Storing only episodes leaves the agent with a history of activity but no explicit representation of the facts and skills that activity should teach.

What each tier must actually store for a computer-use agent

Core memory must describe the user and the work underway. It includes language, output format, tool preferences, the current task, and a step-level progress indicator. Workspace instruction files supply operating rules and user-specific constraints. Access information belongs here only as references to credentials and tool grants, never as raw secrets. This working set tells the agent both what to do and which authority applies to the current session.

Recall memory must preserve the sequence of execution. Session transcripts and action logs record what the agent did, in what order, and with what outcome. A correction such as “don't use that shortcut, it breaks on this machine” must remain searchable after the session ends. Task-ledger entries distinguish completed work from tasks that were started but remain partial. Policy, permission, provenance, and audit records also belong here because subsequent actions depend on more than conversational recollection.

Archival memory holds knowledge specific to the user’s environment. That includes applications with non-standard behavior, workflow exceptions, approval chains, and learned action sequences that reliably complete a task. Records of external commitments and executed side effects also need long-term retention where later work may depend on them. Promotion into this tier requires explicit rules for turning an episodic trace into a durable fact, and a correction may need to replace a stored procedure.

Why per-user isolation is an architectural requirement, not a configuration option

A shared memory index with a user filter makes separation depend on every query being invoked correctly. That is an inadequate sole boundary for operational state. A misconfigured query or compromised retrieval path can expose another user’s memories. For a computer-use agent, the result is behavioral contamination as well as disclosure because another user’s correction or workflow rule may influence an action. Per-user indexes created on first interaction remove shared-index retrieval as that failure path.

Metadata still serves a useful scoping role. Agent ID, memory type, and task ID can narrow a search before similarity matching, complementing index separation. Namespaces should tell agent, user, and project apart, with a clear handoff protocol for passing the context agents need between them. A handoff must not expose the full store. Credentials and tool-access grants require their own authority boundaries rather than treatment as ordinary retrievable memories.

Those boundaries must extend into the execution environment. A separate index is insufficient if another agent can reach its credentials or filesystem. For agents connected to tool servers, the specified account-binding pattern gives each server URL exactly one connected account through a cryptographically hashed token. Storage separation, credential scope, and execution isolation must agree on which user the agent is authorized to serve.

How the execution substrate — persistent disk, real kernel, snapshot-restore — makes the storage design work

Persistent disk gives the memory tiers a durable local foundation. Core records and workspace instructions survive idle periods, while task ledgers and action logs remain writable during execution and durable during sleep. Frequently used archival facts can be cached locally instead of fetched from a remote vector store at every inference step. This avoids rebuilding context the agent already holds. Durability therefore supports both continuity and the cost of accessing state.

A dedicated kernel supplies the corresponding execution boundary. Computer-use agents install packages, open browser sessions, and run generated code, so keeping them isolated takes more than database permissions. Firecracker micro-VMs give each VM a dedicated Linux kernel, unlike Docker’s shared-kernel model. Each agent can install, break, and rebuild its environment without sharing that kernel with other users’ agents.

Snapshot-restore makes that system work for agents that spend most of their time idle. It preserves execution state, including memory, call stack, pending continuations, and open file handles, while freeing host compute. The core working set survives inside the snapshot. On wake, the agent resumes rather than reconstructing core memory from recall and archival history, so wake latency need not grow with memory depth. The memory hierarchy and substrate are consequently co-designed, with durable disk supporting stored state and snapshots preserving live execution.

Serverless functions and shared containers do not supply these properties together. Stateless functions need external reads to get context back, while shared containers lack a dedicated kernel. Neither limitation is solved by rearranging the memory tiers. The storage model depends on the environment beneath it.

Retrieval design: how the agent decides what to bring into context

At session start, core memory should come from a bounded, deterministic read. Identity, active preferences, current task-ledger state, and workspace instructions are known records. A resumed snapshot already contains its working context. A new session loads the relevant structured state from persistent storage. This separates initialization from retrieval.

During execution, the task determines which deeper tier is needed. Recall answers whether an action was attempted before or which correction the user gave about an application. Archival retrieval supplies an approval workflow or a learned procedure for the current environment. Mem0’s State of AI Agent Memory 2026 describes production architectures combining semantic, keyword, entity, and graph-based retrieval. The design must accommodate different query types rather than force them through one similarity mechanism.

Time and identity complicate those queries. A changed output preference must supersede an older one, while “the report from last week” must resolve to a specific artifact. Accumulation can also dilute the signal when obsolete memories remain eligible for retrieval. Expiry is therefore part of retrieval quality. A store that keeps growing without sorting out which state has been superseded can leave the agent confidently using the wrong context.

Mem0’s 2026 benchmark report maps LoCoMo to conversational recall, LongMemEval to updates and temporal reasoning, and BEAM to extreme-scale recall. DolphinBench and STATE-Bench are more directly diagnostic for computer use because they address memory-guided actions and improvement across repeated enterprise workflows. Recall accuracy alone is insufficient. The decisive test is whether memory improves task completion and action outcomes.

State governance: how the agent updates, expires, and makes state auditable

State needs a lifecycle after it is written. The Always-On Agents survey finds that its coded corpus of 435 works concentrates on accumulation and retrieval, while governance, recovery, and relinquishment receive less attention. Its Always-On Evaluation Protocol (AOEP-v0) scores state mutation and recovery obligations alongside answer quality. Production designs need the same shift in emphasis. The return arc includes update, expiry, audit, and rollback.

Updates must distinguish corrections from additional information. “Don't use that shortcut” changes an operating rule, whereas a new observation may simply extend the agent’s knowledge. The distinction determines which tier changes and whether prior state remains valid. Dependencies must change too. When an archival fact is revised, procedural skills that depend on it must also be reconsidered to prevent application of the superseded rule.

Erasure must reach every representation of the user’s state. GDPR Article 17 applies when a data subject requests erasure and one of six specified grounds is met, including data no longer being necessary, withdrawn consent, or unlawful processing. The architecture therefore needs retention limits and erasure from the start, with data processing agreement documentation handled later during hardening. If only recall is deleted, knowledge in core or archival memory can still shape what the agent does. The survey distinguishes true erasure from the retrieval edits that many implementations use as forgetting.

Audit records connect stored knowledge to executed actions. They must identify which memory was retrieved, which action it informed, and what outcome followed. That provenance supports debugging and the decision to roll back. Snapshot history provides a rollback primitive for returning the agent to a known-good execution state. For restoration across all three tiers, the recovery boundary must include their stored state along with the VM’s live memory.

Restoring the agent’s state is not itself a reversal of actions already taken outside it. Keeping commitment records and action provenance gives the agent the context it needs to deal with those effects. This distinction keeps rollback tied to what the snapshot actually restores.

How do you deploy thousands of individual persistent agents, one per customer?

The deployable unit is one micro-VM and persistent disk per user. Core memory lives as structured files, while recall uses a per-user index on disk or an isolated remote partition. Archival knowledge sits in a per-user semantic namespace, with frequently accessed facts cached locally. Remote access must preserve the same user separation enforced by the VM and its disk.

The scheduler changes the economics of that unit. When an agent becomes idle, snapshot-restore frees its active compute while keeping the state it needs to resume. Storage cost replaces compute cost during idle periods. At fleet scale, the retained storage reflects each agent’s state divergence from a shared base image. Sub-second wake latency then makes that pause compatible with interactive use.

Governance spans the same deployment boundaries. Erasure reaches the disk, recall index, and archival namespace, while provenance remains with the action history and rollback uses scheduler-maintained snapshots. These operations must address the durable state that will shape the agent’s next action.

For platform selection, persistence, isolation, and fast wake are joint criteria. A platform that retains files but shares kernels leaves the execution boundary incomplete, while one that isolates execution but rebuilds context on every invocation loses continuity. The layered storage architecture provides the blueprint. It holds in production only when the execution substrate preserves the agent’s state, separates each user’s environment, and resumes work without a cold reconstruction.

Sources

  1. Always-OnAgents:A Survey of Persistent Memory, State, and Governance in LLMAgents
Filed underAgent Patterns

More in Agent Patterns