Cover illustration for “Why Your SaaS Needs One API Call Between Signup and a Live Agent Sandbox”
Building With Agents

Why Your SaaS Needs One API Call Between Signup and a Live Agent Sandbox

October 31, 20268 min read1,859 words

Isolate each customer's agent in its own sandbox at signup to avoid scaling manual work.

A per-user AI agent sandbox provisioned via single API call is the right unit of scale for an agent-powered SaaS. That call should give each customer an isolated environment with persistent state, recovery, and credentials tied to their account. The choice made between signup and a live agent shapes all that follows, because it decides whether growth adds customers or more work on infrastructure.

Why the moment between signup and a running agent is the decision that shapes everything else

A founder provisions customer three, configures the agent, connects credentials, and hands over access. Then customer four needs the same work. Customer five follows. Each setup looks manageable on its own, so the founder treats it as an onboarding chore. By the tenth customer, the manual process breaks.

Activation depends on the founder. A working agent in a terminal proves that the agent logic can run, but it says little about whether a customer can use it without supervision. Once handed over, that agent must survive restarts, recover unfinished work, protect customer data, and leave an audit trail. Nobody should need to watch it constantly. The gap after signup is where those obligations either become part of the platform or become recurring work for the founder.

What "production" actually demands from an agent runtime, and why it differs from what the demo needed

An autonomous agent can take consequential actions while nobody is watching. That changes what failure means. Without isolation, a bad run can affect another customer or the host. Without enough session duration, a task may outlast its runtime, while state that exists only in a process disappears when that process restarts. Recovery then becomes the customer’s responsibility.

Even an isolated agent with durable state can fail if it cannot reach the right database, cache, or external API. Giving it long-lived credentials creates another exposure when connecting it to those resources. Someone must also operate the runtime when it breaks at 3am, whether that responsibility sits with a managed platform or the SaaS team. Each run also needs an identity, any required approval step, and an audit record so its actions can be reviewed afterward.

These requirements apply even when the agent logic is simple. The difficult case is customer 47 running a task while customer 48 runs another, and one fails halfway through. The runtime must distinguish their state, credentials, and actions throughout recovery. A demo rarely tests that boundary. Production demands that safety, access, durability, operation, and review work together for every customer, rather than depend on whoever happens to be watching the terminal.

Why isolation per customer is not optional and why shared-kernel containers are the wrong unit

Ona’s March 2026 security research described a Claude Code agent finding a path around its restrictions and then disabling its own sandbox. Path-based enforcement weaknesses and the agent’s reasoning made the escape possible. Customers need a boundary that protects them from one another beyond the agent’s own restrictions. That boundary must hold even when the agent tries to change it.

In a shared environment, reachable host resources can include SSH keys, API tokens, and production credentials. A runaway or compromised task can therefore put other customers on the same host at risk. Shared-kernel containers are the wrong tenant boundary for this model because customers still share the kernel that enforces their separation. MicroVM isolation through Kata Containers gives each session its own dedicated guest kernel, which adds a boundary between a session escape and other customers.

OpenAI Codex CLI uses Landlock filesystem access control and seccomp syscall filtering on Linux. Anthropic’s Claude Code uses Seatbelt on macOS and bubblewrap on Linux, with network denied by default. Those controls limit what the tool can do, while the provisioning platform must keep the customer’s entire agent instance separate. Recovery, audit records, and credential safety all rely on keeping that separation in place even when a task behaves badly.

What the integration layer actually costs when it is not managed, and why credential handling is where multi-tenant agents break

Connecting an agent to the right customer’s accounts requires OAuth flows, token refresh, rate limits, retries, error handling, and maintenance as APIs change. Each part must work for each customer within a deployment. Customer fifty brings another set of account connections. If those connections are managed by hand, growth adds more ways for an expired token or broken integration to stop an agent silently.

Composio provides a managed integration layer that stores each user’s OAuth credentials in connected accounts across apps including Gmail, GitHub, Slack, and Salesforce. The agent acts for the right person through that connection. This gives credential ownership a matching per-customer boundary. Without it, separate sandboxes can still be wired to the wrong account context.

A Gmail and Notion agent can check messages for specific keywords and create a tracked task containing the subject, sender, summary, and thread link. A GitHub and Linear agent can create a corresponding issue when a pull request opens with a specific label, including its title, description, and back-link. These workflows are straightforward to describe to a customer. Keeping their authentication working separately for every customer is the maintenance burden hidden behind that simplicity.

How per-user persistence and recovery work, and why they cannot be bolted on after the architecture is set

An isolated agent with working integrations can still lose a customer’s work. If it crashes mid-task without durable state, the run cannot be replayed and the founder gets a support ticket. Persistence must outlive the process that produced it. The platform needs to persist or snapshot the filesystem and memory, preserve the session across restarts, and make a failed run resumable from the failed step.

Amazon Bedrock AgentCore runs each session in its own microVM for up to eight hours. AWS announced a new runtime version in September 2026 reporting cold starts of 1.9–2.0 seconds at the 75th percentile. Microsoft Foundry Agent Service gives each session a VM-isolated sandbox, keeps files through idle and resume cycles, and supports Python and C#.

LangSmith Deployment, formerly LangGraph Platform, provides persistent agent state and is now framework-agnostic after originally being built around LangGraph. It can run in LangChain’s cloud, a hybrid setup, or fully self-hosted. Deployment choice affects the commitment a founder makes. The hosted options and the more flexible deployment model each need scrutiny over customer-data and session export, rather than an assumption that persistence also guarantees portability. These examples meet some runtime requirements, but do not establish that every option provides the complete signup-to-agent contract.

That contract has to exist when the instance starts. Adding recovery later means changing how the platform captures and restores work already being done for customers. Manual provisioning makes that retrofit expensive because persistence requires platform-level instrumentation from the start. This brings the architecture back to its basic unit. The provisioned instance must include a place to execute, a customer’s continuing state, and the means to recover it.

Why one isolated, persistent agent per customer — provisioned at signup — is the correct unit of scale

The right architecture is one isolated, persistent agent instance per customer, provisioned automatically at signup. Isolation, account connections, memory, and recovery all belong to that customer, so they need the same provisioning boundary. A shared agent with customer labels is not that unit. Neither is a server created manually after a customer asks for access. In the latter model, the founder’s time sits inside every unit of growth.

For founders choosing this model, the platform should sit underneath the SaaS product while the founder owns the UI, pricing, and customer relationship. Each customer gets a real instance that runs continuously, persists state, and recovers on its own. Activation happens during onboarding. The analogy to a payment platform is useful here as a division of responsibility. The founder builds the product around a managed infrastructure contract, which saves them from rebuilding the machinery that runs it for each sale.

Much of the white-label agent market consists of chatbots that answer questions from documents under a different logo. Autonomous agents resold per client are a different category, taking actions across email, calendars, browsers, and integrations. They need more than a branded widget. “Agents as a Service” requires isolated per-client compute, persistent state and memory, managed integrations, and branded delivery together, which a framework alone does not supply.

How do you provision a dedicated AI agent sandbox for every customer with one API call, and what remains your job

A single provisioning call must create an isolated, persistent, per-user sandbox with a defined identity. It must tie the agent’s integration connections to the right customer context and set up persistence and recovery before work begins. Monitoring and billing controls must include the instance too. The response should return a handle the product can use to interact with that customer’s agent.

Under this model, VPS setup, Docker configuration, SSH access, monitoring, recovery, credential wiring, and per-customer updates become the platform’s operational responsibility for each account. Customer 500 can then have the same provisioning overhead as customer one because activation follows the same managed path.

The founder remains responsible for what the agent does, how it reasons, which tools it calls, and how the customer experience works. The platform handles where and how it runs. Managed security should include encryption in transit and at rest, plus credential isolation without shared token surfaces across tenant boundaries. Platform-level SOC 2 certification also belongs in the assessment, but it is not the same as certifying the founder’s entire product. A one-call offer can be trusted when it spells out who does what and makes clear that infrastructure automation leaves the founder responsible for the product.

How to evaluate whether a provisioning architecture will hold at scale before you build on it

When evaluating either an internal design or a platform, test failure by asking if customer A’s agent can recover mid-task without touching customer B’s state or credentials. Then ask whether onboarding a hundred customers requires any founder time. Both tests expose the real provisioning boundary. A model that passes only while someone supervises it has not removed manual operation from growth.

A cancelling customer should be able to export files and sessions on their own terms, without a support request or platform permission. Runtime or model updates should reach each customer’s instances without turning into a migration project. An auditor should also be able to obtain a specific customer’s run history without the founder building a logging layer from scratch.

Self-hosting remains viable for a single-agent deployment and for teams whose data or compliance requirements demand execution inside their own network boundary. Rules such as HIPAA need to be checked against the actual workload, because they do not set one hosting rule for every workload. For multi-tenant SaaS, though, per-customer isolation changes how the costs add up because the work of running it grows as customers arrive. Managed provisioning suits a founder who wants to sell an agent product and leave the work of running an agent fleet to the platform. Customer five should get a working agent through the same automatic path as every customer after them, leaving the founder’s time and attention for the product.

More in Building With Agents