One-Call Agent Sandbox Provisioning as the Coordination Primitive for Multi-Tenant Agentic Products
Isolate each customer's agent in a dedicated sandbox provisioned by one atomic API call.

A per-user AI agent sandbox provisioned via a single API call gives each customer an isolated, persistent environment without manual infrastructure setup. The call becomes a coordination primitive when it creates the whole tenant boundary. That boundary lets an agent product grow without having to rebuild isolation in container settings, credentials, memory, and state management for each customer.
Why the sandbox — not the model or the integration layer — is the right unit of analysis for multi-tenant agent products
Traditional SaaS multi-tenancy starts with a data problem. Tenant A must not see tenant B’s rows, so the application enforces a tenant_id predicate and role-based access control. Agents change the premise because they generate and execute code at runtime from customer prompts. The platform has not reviewed that code before it runs. A database filter cannot contain its execution.
Zylos AI’s 2026 architecture research identifies four added risks, including stateful long-running execution, ambient authority through tools, model inference side channels, and prompt/context contamination. A run can hold open tool connections and memory for hours, while a recycled pod can retain workspace files or cached secrets. The boundary therefore needs to cover compute, network, storage, and credential scope together. The model and integration layer are shared resources. Multi-tenant agent platforms must think like operating systems, enforcing process, memory, filesystem, network, and capability isolation.
Why standard containers fail as an isolation boundary for agents executing LLM-generated code
Containers separate filesystems, process trees, and network namespaces, but they share the host kernel. That is the critical gap for untrusted code. A kernel exploit inside one container can reach the host and neighboring tenants because the boundary stops above the shared attack surface. The CNCF described the November 2025 runc breakout flaws as posing “a critical risk” in multi-tenant environments where users define containers or run unvetted images. Agent-generated code puts platforms in that risk category.
A breakout is not the only failure mode. A runaway process can use up shared CPU and slow every tenant on the same host, while flaws in filesystem or memory access can let another customer’s data leak. Network access adds a separate route out. Prediction Guard’s production containment guide describes unrestricted egress as a launchpad for data exfiltration, even when execution is sandboxed. Containers can run trusted work, but arbitrary model-generated code needs a boundary built to handle a broader threat than an ordinary web service faces.
The isolation technologies actually in use for production agent workloads, and when to use each
Firecracker microVMs provide the strongest separation of these three options. Each workload gets a dedicated guest kernel behind hardware virtualization, so compromising that guest kernel does not itself breach the host boundary. Firecracker adds less than five MiB of memory overhead per VM, removing much of the old memory objection to a VM per tenant. AWS Bedrock AgentCore uses a dedicated microVM for each user session, with isolated CPU, memory, and filesystem. This is the default tier for untrusted agents executing arbitrary code.
gVisor sits between standard containers and hardware-separated microVMs. It interposes a user-space kernel so agent code does not call the host kernel’s syscall interface directly. It fits compute-heavy multi-tenant work where Kubernetes compatibility is important and the threat model does not require hardware separation. V8 Isolates occupy the narrower, lighter tier for latency-critical scripting tasks. They fit when the tool surface is limited to a single scripting language and the platform controls the runtime entirely.
These choices can coexist within one platform. Trusted, platform-written background jobs can run in containers while untrusted customer agents run in microVMs, with orchestration routing by workload type. Compute isolation still needs tenant-scoped memory, credential vaulting, and token-bucket rate limits. Claude Code, for example, requires sandboxing to be explicitly enabled, so a customer-hosting platform cannot leave isolation to the agent tool.
What a five-layer defense architecture actually contains, and why each layer is non-negotiable
A production sandbox needs five defenses, each enforced on its own. Compute isolation is the first, supplied by the microVM or gVisor runtime. Network egress control is the second, with default-deny access and an allowlist of permitted endpoints. The first contains execution while the second limits where that execution can send data. Neither replaces the other.
Filesystem and workspace boundaries form the third layer. Each run gets an ephemeral workspace, destroyed in a finally block when the task finishes. Background cleanup must also stay tenant-scoped, or the cleanup process itself can cross the boundary it is meant to keep in place. Credential vaulting is the fourth layer, using per-tenant scopes, proxy-based injection, and a log of every credential use per request. A ClusterRoleBinding that gives cluster-admin to a namespace’s default service account undoes that limit, because every pod in the namespace then has full cluster control.
Configuration immutability is the fifth defense, addressing Configuration-Based Sandbox Escape. In this attack, the LLM edits its own sandbox configuration to weaken restrictions or disable approval policies. NVIDIA’s guidance treats workspace write restrictions, including dotfiles, as mandatory. Sandbox protections therefore need to block changes to hooks, MCP server configurations, and IDE extensions regardless of user approval level. The agent cannot control the rules containing it.
Resource governance is needed alongside those five security layers. Per-tenant token-bucket limits stop one customer’s burst from using up the shared pool. Observability and audit logging support the response when something still goes wrong. Under the GDPR obligation described here, operators who process personal data must be able to report a breach to the supervisory authority within 72 hours of finding it. Isolation without an audit trail leaves operators unable to account for the incident.
The cold-start problem and why the warm pool pattern is the practical prerequisite for one-call provisioning
A sandbox pod takes an extra 5–15 seconds to start from cold before work can begin. That wait adds up across a multi-step reasoning chain if each new step has to wait for a fresh environment. One call would not make that wait disappear. Assigning capacity that has already booted avoids building an environment while the customer waits.
The Kubernetes Agent Sandbox project implements this through a SandboxWarmPool controller that maintains pre-booted idle pods. A claim controller assigns a warm pod, marks it claimed, and immediately queues a replacement. A hard TTL terminates tasks that exceed their time bounds, while task-level ephemerality limits how long a compromise can persist in that execution environment. These disposable task environments are distinct from the customer’s persistent sandbox identity and state.
How do you provision an isolated sandbox per customer with one API call, and why is that a coordination primitive?
On success, compute isolation, workspace rules, credential scope, egress restrictions, immutable configuration, and resource limits must all be in place. If that cannot happen, the call must fail without leaving a partially protected environment. Atomicity is the defining property. A short API that starts compute but leaves credential and network setup to the caller has not supplied this primitive.
A coordination primitive makes it possible to predict how a distributed system will behave. Semaphores and mutexes do that for concurrent access to shared resources, while sandbox provisioning does it for the existence of a tenant boundary. Without it, that boundary emerges from application rules, namespace policies, and credential settings configured by different people at different times. An unaudited setting can become the weakest link. With it, the platform owns a single contract for what a provisioned customer environment contains.
That contract changes concrete product operations from the start. Onboarding requires sandbox provisioning in addition to inserting a user record. Offboarding requires environment teardown in addition to row deletion, and debugging follows one tenant’s audit trail. Stripe provides the useful analogy. It let a team take payments without becoming a payments company, just as this primitive lets a team deliver agents without building an infrastructure team to run them for each customer.
The contract requires persistence: a customer’s environment must preserve tool state and conversation history across sessions and be recoverable after failure. Task-level execution can disappear without erasing that continuity. Conflating those lifecycles produces either long-lived task environments that accumulate state or disposable customer environments that forget everything. The primitive coordinates both lifecycles under one tenant boundary.
How the sandbox primitive changes the shape of an agent-powered product at the service decomposition layer
Pandrapagada’s production blueprint separates Gateway, Orchestrator, Scheduler, Memory, and Sandbox into five services. Each can scale, deploy, and be debugged independently because execution has a defined tenant boundary. Without that boundary, each service must build its own part of the isolation. The Gateway checks tenant scope, the Orchestrator scopes LLM calls, Memory filters reads, and the Scheduler prevents one customer’s jobs from delaying another’s. Every added service creates another opportunity for those rules to diverge.
Services inside it share its execution boundary, while shared services outside it still have to keep tenant scope in place for their own resources. Zylos’s research distinguishes working memory, conversation history, semantic long-term memory, and structured database state. Vector stores still need tenant namespaces or separate indices, and relational storage still needs tenant predicates. The sandbox is the outer envelope.
Shared model inference also remains outside simple compute containment. The same research identifies KV-cache timing attacks as a documented attack class in 2025, where faster time-to-first-token on a cache hit can reveal another tenant’s cached prompt. A dedicated execution environment does not by itself isolate a shared inference cache. Service decomposition becomes clearer because the execution boundary defines what the Sandbox service owns and what shared services must still enforce.
How MCP and managed integration middleware fit inside the sandbox boundary without reintroducing shared-surface risk
Integrations can reopen the boundary if credentials live at platform scope. The correct model is proxy-based credential injection, with each tenant’s credentials scoped to its sandbox rather than stored in agent memory or shared environment variables. Composio connects agents to more than a thousand applications, including GitHub, Slack, Gmail, and Notion, through pre-authenticated tools. Its proxy holds the credential. That removes the password from the agent context a prompt-injection attack could expose.
MCP tool references also need tenant-scoped injection at provisioning time. Under that model, an agent in sandbox A cannot use a tool registered only in sandbox B’s MCP context. Every credential use should be logged per request and per tenant sandbox, extending the audit trail beyond compute. Shared middleware need not mean shared credential authority.
What the sandbox-as-primitive means for operators building agent-powered products at customer scale
Repeatable provisioning removes a recurring block of founder work. VPS setup, Docker configuration, SSH management, per-instance monitoring, crash recovery, and version updates become platform responsibilities for each customer. That makes white-label delivery practical at onboarding. A signup can trigger activation of a branded, isolated, persistent sandbox without a manual infrastructure handoff. Each customer’s conversation history, state, and tool permissions then have an environment of their own, rather than a division simulated inside one shared agent.
The economic change is in marginal operating labor. When operators self-host a separate environment for each customer, provisioning, monitoring, and recovery take more work as the customer base grows. Managed provisioning shifts that work to a provider that has already amortized the isolation engineering, though it does not make underlying compute free. The customer-facing expression can be one-click deployment of OpenClaw, Hermes, Claude Code, Codex, OpenCode, or Grok CLI, with a free tier and paid plans starting at a low monthly rate.


