E2B/Docker execution now runs through the standalone praisonai-sandbox package under the hood — no user-visible change. The
SandboxedAgent/SandboxedAgentConfig API is untouched. As of PR #4092, the vendor compute providers also live in that package (same names, same behaviour; old praisonai.integrations.compute.* imports still work through a shim).Quick Start
1
Basic Usage
Local loop, local tools - simplest configuration.
2
With Tool Sandboxing
Local loop, tools run in E2B sandbox for security.
How It Works
Configuration Options
SandboxedAgentConfig Reference
Full configuration options for sandboxed agents
Essential Configuration
Common Patterns
Secure Development Environment
Local Development (No Sandbox)
Multi-Provider Flexibility
Best Practices
Security Considerations
Security Considerations
Always use sandboxing when running untrusted code or installing packages:
Performance Optimization
Performance Optimization
- Use local execution for trusted environments and faster iteration
- Use sandbox for production or when handling user-generated code
- Consider model choice:
gpt-4o-minifor speed,claude-sonnet-4-6for complex tasks
Backward Compatibility
Backward Compatibility
LocalManagedAgent and SandboxedAgent are the same class:Tool Sandboxing vs Managed Runtime
Tool Sandboxing vs Managed Runtime
- SandboxedAgent: Agent loop stays local, only tools may be sandboxed
- Managed Runtime: Entire agent loop runs remotely (see Managed Runtime Protocol)
Package Specifier Validation
Package Specifier Validation
packages={"pip": [...]} accepts PEP 508 requirement specifiers only. Pip options with a leading dash are rejected: --upgrade, --pre, -r requirements.txt, -e ./pkg. An invalid entry raises:Binary write_file and EOF-safe Content
Binary write_file and EOF-safe Content
write_file accepts bytes and no longer truncates content that contains an EOF line.EOF inside the content no longer cuts the file short — every byte reaches the target.Requires
base64 on the sandbox image’s $PATH — present on every stock PraisonAI compute image (Docker, E2B, Modal, Daytona, Novita, Fly.io). Bring-your-own minimal images must include it.Multi-tenant Credential Isolation
Multi-tenant Credential Isolation
Two PraisonAI passes
SandboxedAgent instances with different API keys stay isolated in the same process.api_key and base_url directly to the inner agent, so credentials never leak into os.environ or a spawned subprocess.Related
Managed Runtime Protocol
Remote agent runtime for full managed execution
Sandbox
Core SDK sandbox execution on agents

