Code Config • Rust AI Agent SDK

CodeConfig: Configuration for code execution settings.

CodeConfig

Defined in the agents module.

Rust AI Agent SDK

Configuration for code execution settings.

Fields

NameTypeDescription
sandboxboolEnable sandboxed execution
timeoutu32Execution timeout in seconds
allowed_languagesVec<String>Allowed programming languages
max_output_lengthusizeMaximum output length
working_directoryOption<String>Working directory
environmentHashMap<StringEnvironment variables

Methods

new

rust
fn new() -> Self

Create a new CodeConfig

sandbox

rust
fn sandbox(mut self, sandbox: bool) -> Self

Set sandbox mode

Parameters:

NameType
sandboxbool

timeout

rust
fn timeout(mut self, timeout: u32) -> Self

Set timeout

Parameters:

NameType
timeoutu32

allowed_languages

rust
fn allowed_languages(mut self, languages: Vec<String>) -> Self

Set allowed languages

Parameters:

NameType
languagesVec&lt;String&gt;

Source

View on GitHub

praisonai/src/agents/mod.rs at line 721


Related Documentation