Sandbox

Isolated execution environment

Sandbox provides isolated execution for code and tools.

Diagram

Sandbox

💻 Code

📦 Sandbox

📤 Result

Quick Start

  1. Enable Sandbox
    rust
    use praisonai::{Agent, SandboxConfig};
    
    let config = SandboxConfig::new()
        .timeout_secs(30)
        .memory_limit_mb(256);
    
    let agent = Agent::new()
        .name("Coder")
        .code_execution(true)
        .sandbox(config)
        .build()?;

Sandbox Options

OptionDescription
timeout_secsExecution timeout
memory_limit_mbMemory limit
allow_networkNetwork access
allow_fsFile system access

Related