Skip to main content
Sandbox provides isolated execution for code and tools.

Quick Start

1

Enable Sandbox

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