---
title: "Sandbox backend for agent builders and workflow platforms"
description: "Promigence gives agent-builder and workflow platforms an isolated sandbox backend, billed by the second, that fits as a second provider behind the sandbox API they already integrate."
url: "https://www.promigence.ai/for/agent-builders"
site: "Promigence"
---

# A sandbox backend for agent-builder and workflow platforms

Promigence gives agent-builder and workflow platforms a sandbox backend for the code their users' agents run: isolated, ready in milliseconds, billed by the second, and compatible with the sandbox API many platforms already integrate. It fits as a second provider next to the one you have.

**Who this is for:** Agent-builder, workflow-automation and low-code AI platforms that run user-defined code or agents.

## What breaks today
### One provider is a single point of failure
When your only sandbox provider has a bad day, every one of your customers' workflows fails with it.

### Your users' code is untrusted
Workflows run code your platform did not write. Each run needs its own isolated sandbox and a network boundary.

### Idle workflows still cost money
Workflows wait on models, tools and people. Paying for sandboxes through that wait turns every idle workflow into a bill.

## What changes with Promigence
### A second provider behind the same API
Promigence works as a drop-in replacement for the sandbox API many platforms already integrate, so it can take traffic next to your current provider.

### Isolated runs with network you decide
Every run gets its own isolated sandbox, which can sit behind an outbound allow-list.

### Billed by the second, not for the wait
Usage is billed per second, and a sandbox can pause itself when idle. Paused time is not billed.

## A batch of user workflows, quoted and capped
```bash
# The quote for a batch, before it runs
promigence run quote --snapshot workflows --count 20

# Run it with a hard cap
promigence run --snapshot workflows --count 20 --cap 2 -- ./run_workflow.sh
```

## Should I self-host sandboxes or use a managed sandbox service for my agent platform?

Use a managed service unless your customers' data has to stay inside your own cloud account, or you already operate isolation for untrusted code at scale. Self-hosting means building and patching the isolation boundary, fast starts, pausing, per-tenant spend limits and egress rules, then staying on call for all of it. On Promigence those pieces sit behind one API key: isolated sandboxes ready in milliseconds, billed by the second, paused while a workflow waits, and compatible with the sandbox API many platforms already integrate, so it can take traffic next to your current provider.

## How it works

### Build the environment your users' agents start from

Put what your customers' workflows need into one snapshot, with a verify command that proves it imports. Nothing is stored if verify fails, so every sandbox you hand a customer is a fresh copy of something that passed. Rebuild it when your platform's runtime changes; the build is billed per second for the time it runs, up to $0.17 at small.

```bash
promigence snapshot create --image python:3.12 \
  --setup "pip install pandas matplotlib" \
  --verify "python -c 'import pandas, matplotlib'" \
  --alias user-env --wait --wait-timeout 10m
```

### Plug it into the agent framework you host

Six agent frameworks have a Promigence adapter and a guide. With the OpenAI Agents SDK, for instance, a session you drive yourself is one sandbox: created with a spend cap, used, then deleted. Its options take a `snapshot`, such as the `user-env` alias above, in place of `image`. The guide also shows the agent-driven form, where the SDK opens and closes the session around a run.

```python
client = PromigenceSandboxClient()
session = await client.create(options=PromigenceSandboxClientOptions(image="python:3.12-slim", spend_cap=1))
async with session:
    result = await session.exec("python", "-c", "print(1 + 1)", shell=False)
    print(result.stdout.decode())
await client.delete(session)
```

### One sandbox per end user, found again by label

Label each sandbox with your customer's user id when you create it, then look it up by that label on their next message. A returning user lands back in the sandbox that holds their files, and an idle rule (five minutes in the guide) pauses it once the user goes quiet. Their files stay put. The per-user guide has the full lookup in TypeScript and Python, including a lock so two quick messages never open two sandboxes.

### Give each tenant a ceiling

Three limits stack. A spend cap on every sandbox bounds one user, a timeout on every command bounds one script, and a monthly cap on the project your backend's key belongs to bounds the lot. Give that backend a key with run access only: it can start sandboxes, yet it cannot touch keys, secrets or billing.

## What you get, in numbers

| What | Result | Conditions |
|---|---|---|
| 100 sandboxes requested at once, slowest 5% | 0.94 s | p95, every run completed, n = 400 [Source](https://www.promigence.ai/#numbers) |
| Paused sandbox to its first database query | 104 ms | n = 100, p50; 127 ms under load [Source](https://www.promigence.ai/#numbers) |
| Sandboxes at once on the Max plan | 500 | 1,000 on its $500 level; Pro runs 100, a new account 20 [Source](https://www.promigence.ai/#pricing) |
| How long a paused sandbox is kept | 30 days | not billed by the second and not counted against concurrency; resuming starts the 30 days again [Source](https://www.promigence.ai/docs/limits) |
| List rate | $0.0504 per vCPU-hour + $0.0162 per GiB-hour | billed per second; a small sandbox (2 vCPU, 4 GiB) comes to $0.17 an hour [Source](https://www.promigence.ai/#pricing) |

## What it costs

Your platform starts a batch of 20 customer workflows with the two commands above, on small sandboxes, with the default 15-minute timeout and the $2 cap. Every workflow finishes its work in 3 minutes.

Quote: 20 × 900 s × $0.000046 = $0.83. Billed: 20 × 180 s × $0.000046 = $0.17.

Total: $0.17 for the batch, and never more than the $2 cap.

The quote sits under the cap, so the batch starts; one quoted above its cap would be refused up front. A workflow that has to wait on a person can pause instead of holding a running sandbox, and paused time costs nothing. Model tokens are billed by your model provider.

## Security and limits

- No customer's workflow can see, reach or address another customer's sandbox, or yours.
- Code your customers run, and whatever their agents produce, is never used to train models.
- A run's spend cap is a hard limit: a run quoted over it never starts, and a sandbox that reaches it mid-run is paused with its files kept.

## Related

- [A sandbox for every user of your product](https://www.promigence.ai/docs/guides/sandbox-per-user)
- [OpenAI Agents SDK guide](https://www.promigence.ai/docs/guides/openai-agents-sdk)
- [LangChain Deep Agents guide](https://www.promigence.ai/docs/guides/langchain)
- [Google ADK guide](https://www.promigence.ai/docs/guides/google-adk)
- [Strands guide](https://www.promigence.ai/docs/guides/strands)
- [Quickstart](https://www.promigence.ai/docs/quickstart)

## Questions

### Can Promigence run next to the sandbox provider we already have?

Yes, as a second provider. It works as a drop-in replacement for the sandbox API many platforms already integrate, so you can route a share of workflows to it and leave the rest where they are. Move more traffic once your own tests agree.

### How is one customer's workflow kept apart from another's?

Give each run its own sandbox and never reuse one across customers. Sandboxes are walled off from one another: none can see, reach or address another, and each can start with no network or with an allow-list naming only the hosts that workflow calls.

### What does an idle workflow cost?

Nothing while it is paused. A sandbox with an idle rule pauses itself when nothing is happening and wakes on the next request; paused time is not billed and does not count against your concurrency limit. It is kept for 30 days, and resuming it starts the 30 days again.

### How do I stop one of my customers from running up my bill?

Stack the limits. Cap each sandbox in dollars, give each command a timeout, and put a monthly cap on the project your backend's key belongs to; a run quoted over its cap never starts. With a run-only key, even a leaked backend key cannot change keys, secrets or billing.

### Which agent frameworks have a Promigence adapter?

Guides cover the OpenAI Agents SDK, LangChain Deep Agents, Google ADK, Strands, the Vercel AI SDK and the Claude Agent SDK, each with a spend cap and one sandbox per session or run. In the Python adapters, a failure on the Promigence side is raised with `failure_class` set to `env`, so it never reads as the agent's command failing.

### Can our customers' data stay in our own cloud account?

Talk to us about running Promigence in your own cloud account; that is arranged directly with your team. Code and outputs on the managed service are never used to train models.

### What does a workflow run cost on Promigence?

Billing is per second at $0.0504 per vCPU-hour plus $0.0162 per GiB-hour, so a small sandbox is $0.17 an hour while it runs. A run is quoted before it starts, as if every sandbox used its whole timeout, and held to the cap you set. A new account gets $100 of free credit to use within 30 days.

