praisonai-sandbox when you only need sandboxed execution — no gateway, no CLI wrapper — or when you want the sandbox backends on a slim install. It’s a standalone Tier‑2 package extracted from the praisonai wrapper, so agents keep the same sandbox=True behaviour with a much smaller dependency tree.
Standalone
praisonai-sandbox still guards built-in provider names against pip-plugin shadowing — the vendored PluginRegistry fallback carries the same check since PR #4184. See Plugin Precedence.Quick Start
1
Run an agent with the default backend
The
subprocess backend ships in the base install — nothing else to configure:2
Pick a specific backend
Choose a backend with
SandboxConfig:3
Install the slim package and optional backends
4
List available backends
available or unavailable based on whether its optional dependency is installed.The standalone
praisonai-sandbox console script currently exposes --help and backends. To run code or open an interactive shell, use the wrapper CLI — praisonai sandbox run / praisonai sandbox shell (see Sandbox CLI).The slim install is not less safe: its vendored
PluginRegistry fallback enforces the same built-in guard, so a pip package publishing docker cannot replace the built-in (PR #4184). See Plugin Precedence.Do I Need to Install It Directly?
Most users never installpraisonai-sandbox on its own — the full wrapper already bundles it.
Backends Included
Every backend is selectable by name throughpraisonaiagents.sandbox.SandboxManager — the same registry the wrapper uses.
Only
subprocess ships in the base praisonai-sandbox install. Every other backend — including sandlock — requires its matching extra. This differs from the full praisonai wrapper, where subprocess and sandlock are both built in.Install Matrix
Base install pulls the core dependencies; each backend is an optional extra.Compute providers live here too
As of PR #4092, the seven vendor compute providers thattools_run_on= / run_in= / run_on= reach also live in this package — next to the sandbox backends they share a vendor with.
You never import them by hand. Name the vendor on the agent and the provider resolves from praisonai_sandbox.compute:
praisonai wrapper.
The two protocol stacks stay separate — a sandbox backend and a compute provider for the same vendor (docker, e2b, modal, daytona) are still two different classes. PR #4092 only co-locates them; it does not merge them.
Which install do I actually need?
Reaching a vendor used to pull vastly different dependency trees.run_in="e2b" resolved 58 packages via praisonai-sandbox[e2b]; tools_run_on="e2b" resolved 143 through the praisonai wrapper. After PR #4092 both spellings reach the same provider through the same slim package.
Import paths
Oldpraisonai.integrations.compute.* imports still work through sys.modules module aliases — the same module object is reachable from both paths.
The shims are
sys.modules module aliases, not from … import X re-exports. Both paths point at the same module object, so monkeypatching a module-level name through either path lands on the real module — tests that patch via the old import keep working unchanged.Use the Backends Directly
Import a backend class straight from the package when you want the isolated runtime without anAgent:
Platform support
praisonai-sandbox runs on Linux, macOS, and Windows — the subprocess backend enforces different isolation on each, and the cloud backends (Docker, E2B, Modal, Daytona, Novita, SSH) behave identically everywhere.
Every backend is lazy-loaded — importing one never imports the others.
Backward Compatibility
The oldpraisonai.sandbox import path still works through shims.
praisonai_sandbox in new code; the shim keeps existing scripts running unchanged.
How It Fits with SandboxManager
SandboxManager stays the entry point — agents reach backends through the registry, never by importing them directly.
The agents layer uses praisonaiagents._sandbox_bridge for registry-only dispatch, so it never imports sandbox backends at module load.
Console Script
The package ships apraisonai-sandbox console script for listing available backends.
praisonai sandbox … — this console script lists backends and points you at the Python API and the wrapper command.
Validating your install
Run the single-command smoke suite from a repo checkout to confirm every backend you have installed is wired up correctly.0 when every required check passes. No API keys are needed for the subprocess path; Docker is optional and is skipped gracefully when the daemon or base image is unavailable.
The
e2e-validation/ bundle ships with the source repository, not the published wheel. Run these commands from a checkout of MervinPraison/PraisonAI under src/praisonai-sandbox/, not from a pip installed environment.
Set
PRAISONAI_SANDBOX_E2E_DOCKER_TIMEOUT (seconds, default 180) to raise the bound on the optional Docker check for slow networks:
MANUAL-E2E-GUIDE.md for step-by-step manual validation of each backend path.
Best Practices
Install only the backends you use
Install only the backends you use
The base package is intentionally slim. Add
[docker], [e2b], [modal], [ssh], [sandlock], [daytona], or [novita] extras individually instead of [all] to keep the dependency tree small.Set cloud credentials before selecting cloud backends
Set cloud credentials before selecting cloud backends
daytona needs DAYTONA_API_KEY (and optional DAYTONA_API_URL); novita needs NOVITA_API_KEY; e2b and modal need their own provider credentials. Selecting a backend without its credentials fails fast.Prefer the canonical import
Prefer the canonical import
Import from
praisonai_sandbox in new code. The praisonai.sandbox shim stays for existing scripts.Let the wrapper install it for you
Let the wrapper install it for you
pip install praisonai bundles praisonai-sandbox — install the standalone package only for minimal, sandbox-only environments.Interact through SandboxManager
Interact through SandboxManager
Keep using
SandboxManager and sandbox=True on agents. Backends resolve through the registry, so where they live is an internal detail.Check availability in CI
Check availability in CI
Run
praisonai-sandbox backends in CI to confirm the expected backend is installed before a pipeline depends on it.Smoke every backend before shipping
Smoke every backend before shipping
Run
python e2e-validation/run_e2e.py from src/praisonai-sandbox/ to smoke every backend you’ve installed. It’s the fastest way to catch a broken Docker daemon or a missing extra before an agent hits it in production. See the Validating your install section above.Prefer the wrapper CLI for run / shell
Prefer the wrapper CLI for run / shell
The standalone script lists backends; the
praisonai sandbox run / shell commands execute code and open REPLs with full flag support.Related
Sandbox Backends
All eight backends, the registry, and backend selection guide
Sandbox CLI
praisonai sandbox run, shell, and backends commandsSandboxed Agent
Local agent loop with tool sandboxing
praisonai-sandbox SDK
Package overview and public API surface

