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.
Quick Start
1
Run an agent with the default backend
The
subprocess backend ships in the base install — nothing else to configure:2
Install the slim package and optional backends
3
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).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.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, SSH) behave identically everywhere.
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], or [daytona] 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); e2b and modal need their own provider credentials. Selecting a backend without its credentials fails fast.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 seven backends, the registry, and backend selection guide
Sandbox CLI
praisonai sandbox run, shell, and backends commands
