Skip to main content
The --sandbox flag enables secure command execution with validation and restrictions. The praisonai sandbox command manages sandbox containers.
A dedicated praisonai-sandbox binary ships with the standalone praisonai-sandbox package for when you want sandboxing without the rest of the framework. Both CLIs share the same commands.

Quick Start


Sandbox Commands


Status

Check the status of sandbox containers:
Output:
With specific agent:

Explain

Explain the sandbox configuration for an agent:
Output:
For specific agent:

List

List all sandbox containers:
Output:
Output as JSON:

Recreate

Recreate sandbox containers (useful for updates or fixing issues):
Recreate specific container:
Force recreate all:

Run

Execute code in a registered sandbox backend using --type to select the backend.
If the requested backend isn’t installed, the CLI exits with code 2 and prints an install hint. Install optional backends with pip install "praisonai[docker]" (or modal, ssh, e2b, daytona). See Installing Optional Backends for the full matrix.

Shell

Open an interactive shell inside a registered sandbox backend.
Type exit or press Ctrl+D to quit the shell. If the backend isn’t installed, the CLI exits with code 2 and prints a fix-it hint.

Backends

List every registered backend and whether it is installed and ready to use:
Output:
Unavailable backends show the exact install command. See Sandbox Backends for the full matrix and praisonai-sandbox Package for the slim standalone install.

Sandbox Modes

Usage with Prompts

Basic Mode

Output:

Strict Mode

Strict mode adds additional restrictions:
  • Filesystem access limited to current directory
  • Network access may be restricted
  • Resource limits applied

Combine with Other Features

Security Features

  • Command Validation: All commands are validated before execution
  • Risk Assessment: Commands are assigned risk levels (low, medium, high, critical)
  • User Approval: Critical commands require explicit user approval
  • Audit Trail: All executed commands are logged
Sandbox mode provides an additional layer of security but should not be considered a complete security solution. Always review commands before approving execution.

Bot CLI

Deploy messaging bots with sandbox

Browser CLI

Browser automation

Sandbox Backends

All seven built-in backends, install commands, and backend selection guide

praisonai-sandbox Package

Slim standalone sandbox package and its praisonai-sandbox CLI