What Persistent Per-Customer Context Actually Requires From Your Provisioning Layer
Durable memory, checkpoints, and tenant isolation belong in provisioning.

A per-user AI agent sandbox provisioned via a single API call needs more than a separate runtime. It needs isolated customer state, durable checkpoints, session continuity, and enforced boundaries around memory and credentials. Persistent per-customer context has to be part of the provisioning contract from the start, before a memory feature could be added after deployment.
Why persistent per-customer context is an infrastructure contract, not a memory feature
The second customer arrives, and the demo agent breaks. Two customers now share a process, a worker pool, or a storage layer that was built without a firm boundary between them. The prototype’s assumptions become production failures. Adding a memory store does not resolve those assumptions if the same runtime can still mix customers’ histories, retrieve the wrong documents, or lose progress when it restarts.
The provisioning contract has four clauses. State stays isolated for each customer, checkpoints last through idle time, sessions continue across restarts, and customer boundaries hold while the agent runs. The provisioning layer owns the resources and boundaries that make each guarantee possible.
Google’s ADK tutorial identifies three failures in stateless agents handling real workflows, namely prompt context pollution, token cost explosion, and reasoning hallucinations over idle time. Those failures share a structural cause. The agent is trying to use conversation history as both its working input and its record of what happened. Fixing that requires explicit, durable state decoupled from raw chat history.
Why context windows are not memory and why that distinction changes what provisioning must do
A context window holds what the model can consider during a call, with every token competing for attention and processing bandwidth. Information can stay inside the window yet get too little attention to guide the answer. A larger window extends a session’s working space, but it does not establish continuity between sessions or separate one customer’s information from another’s.
Replaying the full history also makes each inference call pay for old information again. That cost grows with the conversation. With many customers, loading everything costs more than deciding what the agent needs. More capacity delays that decision.
The provisioning layer must therefore support selecting, promoting, demoting, and retrieving information instead of passing an ever-growing transcript to the model. The ADK tutorial describes this as a shift from prompt engineering to context engineering. The distinction changes the infrastructure requirement. A production agent needs durable stores and retrieval orchestration that reconstruct useful working context.
The four-tier memory architecture that provisioning must support, and why each tier requires different infrastructure
Working memory is the agent’s active scratchpad. It is fast, ephemeral, and expensive because its contents enter the context window. Provisioning must control what gets promoted into this tier on each turn. Loading hundreds of old memories leaves the model to sort through material that retrieval should have narrowed first.
Episodic memory keeps a record of what happened in recent sessions. These timestamped, session-specific records belong outside the context window, in a queryable store such as a relational database or a managed equivalent. A 50-turn conversation can become a compact set of indexed observations. The storage boundary is per customer.
Semantic memory holds durable facts and preferences. Knowledge such as a customer’s preference for email over Slack, or a change in an account’s billing contact, can live in key-value pairs or a knowledge graph. This is where personalization survives a new session. Archival memory, by contrast, holds the broader corpus of conversations, documents, and tool outputs in a vector database for retrieval in relevant chunks.
These tiers require different storage and retrieval paths. The orchestration that moves information between them is also a provisioning responsibility. Its durable state cannot depend on an agent process remaining alive.
What state externalization actually means and why putting memory inside the agent process breaks everything
The ADK tutorial makes state externalization concrete through a New Hire Onboarding Coordinator Agent. Its workflow steps are named string constants in a plain Python class, including START, WELCOME_SENT, DOCUMENTS_SIGNED, IT_PROVISIONED, HARDWARE_DELIVERED, and COMPLETED. A DatabaseSessionService backed by SQLite persists the session state. If the server is killed mid-task, the workflow still has its resume point.
Reading its current step from session state prevents the agent from inventing progress while reconstructing it from chat. The state machine enforces the sequence instead of asking the model to infer whether documents were signed or hardware was delivered. An explicit checkpoint supplies the answer.
Externalizing state lets the agent process be discarded while durable information stays in infrastructure that can recover on its own. If memory lives only inside the process, a restart becomes data loss. If state lives outside it, a replacement runtime can continue from the stored checkpoint. The same pattern applies to invoice disputes, sales prospecting sequences, and procurement negotiations. In each case, provisioning owns the persistent store and recovery boundary, while the runtime performs the next permitted step.
Checkpoint-and-resume as a provisioning responsibility across multi-day idle time
Real workflows spend long periods doing nothing. An agent may wait days for a signature, a shipping confirmation, or an approval. Keeping a connection open or a thread blocked for the whole pause wastes resources. If the runtime is dropped without a durable checkpoint, the information it needs to continue correctly is lost.
Replaying a large conversation after the pause introduces another failure. The agent may infer that an approval happened or an intermediate task finished when neither did. A durable state machine avoids that ambiguity by writing each workflow step to persistent storage before execution becomes dormant.
Event-driven dormancy gates then let execution scale to zero and resume when a document signing, webhook, or schedule provides the trigger. The checkpoint survives without an active worker. For longer workflows, specialized sub-agents also need their own checkpointed state, rather than adding every subtask to one growing context.
The onboarding example combines these patterns. It waits for signed documents, delegates IT provisioning, waits for hardware delivery, and later sends a day-one schedule. Provisioning must support the pauses and handoffs as deliberately as it supports active execution.
Per-customer namespace enforcement as the provisioning boundary that prevents context bleed and compliance failure
Durable memory is useful only if the right customer can reach it. A shared store without enforced tenant boundaries can put one customer’s documents into another customer’s answer. That is a data exposure and a breach of the customer’s trust.
The storage design needs separate databases per tenant or rigorously enforced tenant partitions within a shared database, with no cross-tenant query paths. Model contexts must also remain separate. Even with database isolation, context bleed can happen if document processing or retrieval later mixes the results. Separate document processing pipelines and policy evaluation environments extend the boundary through the agent’s work.
This is also where architecture meets GDPR. Identifiable information may enter episodic, semantic, or archival memory, so data handling cannot stop at the chat transcript. GDPR’s right to erasure is conditional, but when it applies, the memory architecture must support it.
Retrofitting these boundaries gets harder as shared workers, vector stores, and session identifiers become embedded in production. Provisioning owns both the technical separation and the ability to enforce the resulting data obligations. They are two views of the same design.
Isolation models for agent execution and why the choice of isolation unit determines whether per-customer context can survive at scale
Execution isolation must follow the session. Reusing a session’s environment for a different customer or task can reintroduce shared-worker leaks through credentials, files, or cached state. Those leaks can happen even when memory namespacing is correct. Logical and execution boundaries have to agree.
Ramp’s engineering team illustrates the distinction with separate, ephemeral execution environments for agent sessions. Its sandboxes spin up and shut down independently of the durable session. Execution can disappear without taking session state with it.
The isolation mechanism determines the strength and cost of that boundary. Containers start quickly and work well for low-sensitivity, high-volume workloads, but they share the host kernel and have a larger attack surface. MicroVMs, including Firecracker and Cloud Hypervisor, provide a dedicated guest kernel per session, reducing the blast radius of a compromise at the cost of higher startup latency. WebAssembly with WASI offers very fast startup and strict capability descriptors for deterministic workloads whose permitted actions are known in advance.
Provisioning must own this choice because it creates the execution environment. Application-level tenant checks cannot strengthen a boundary that the underlying runtime does not provide.
How integration tooling fits into the provisioning layer and what managed credential handling prevents
Customer context includes both what the agent can recall and what it is allowed to do. An agent that connects to Gmail, Slack, a code hosting platform, or a messaging service needs the right customer’s account and permissions. A correct answer followed by an action in the wrong account is still a boundary failure. Credentials need the same isolation discipline as memory.
Hand-built integrations leave the builder responsible for OAuth refresh cycles, rate limits, and broken webhooks per customer. That maintenance burden grows with customer count. With managed integration tooling, the infrastructure handles credentials, so pre-authenticated tools and managed OAuth can give access without the builder having to pass tokens around directly.
Composio provides managed integrations across a broad application catalogue, with a free tier for a fixed number of monthly tool calls and paid tiers above it. Its Shared Connections feature allows a company account to be available across agents without circulating credentials. With either capability, there still need to be rules for which customer may use which connection.
Managed tooling also introduces an external dependency. Provisioning has to plan for whether integrations are available if the agent is to be reliable, while keeping tokens isolated, permissions scoped, and tool access tied to each customer. Delegating credential handling does not delegate responsibility for the customer boundary.
How do you provision a persistent AI agent sandbox for every customer with a single API call?
For a founder, the practical answer is to make the provisioning contract the platform’s responsibility. Onboarding creates one isolated, persistent agent per customer through a single API call. Infrastructure handles uptime, billing controls, security, and integrations.
Without that abstraction, each new customer brings server provisioning, security hardening, vector database setup, namespace configuration, credential isolation, checkpoint storage, monitoring, recovery, and updates. The work competes directly with improving the agent and acquiring customers. Automation that creates only the runtime leaves most of this burden untouched.
The white-label operator case makes the unit of scale clear. Each client receives a workspace connected to Gmail and Slack, with isolation established during onboarding. When the platform fulfills the contract, the operator’s marginal provisioning work approaches zero. When the operator fulfills it manually, each customer adds hours of infrastructure work.
The comparison criterion is therefore concrete. A dedicated sandbox offer needs persistent customer state, recoverable workflow checkpoints, isolated execution, and customer-bound credentials behind the provisioning call. A runtime alone is not a persistent agent platform.
The security and compliance obligations the provisioning layer must own that SOC 2 alone does not cover
SOC 2 Type II is needed to deploy an agent in production, but it leaves security needs specific to agents unresolved. Tenant isolation failures, field-level data protection, decision auditability, and prompt injection across agent chains each need to be dealt with. Provisioning must enforce the controls where state, execution, and tool access meet.
Multi-agent delegation creates one such exposure. An injection introduced to one agent can spread through implicit peer trust to downstream agents and escalate privileges across domain boundaries. Persistent memory creates another. A compromised store can expose a customer’s accumulated relationship history.
Durable state helps the agent do its work, but these risks also make it an attack surface that lasts longer. Separate model contexts, document processing pipelines, and policy evaluation environments address AI-specific boundaries that SOC 2 does not name directly. Decision auditability and field-level protection must also be treated as infrastructure obligations.
GDPR adds enforceable data duties wherever identifiable information enters the memory architecture, including conditional erasure obligations. Those duties require control over the stores and boundaries involved. Isolation and recovery guarantees must be designed into provisioning from the start.


