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
| Name | Type | Description |
|---|---|---|
sandbox | bool | Enable sandboxed execution |
timeout | u32 | Execution timeout in seconds |
allowed_languages | Vec<String> | Allowed programming languages |
max_output_length | usize | Maximum output length |
working_directory | Option<String> | Working directory |
environment | HashMap<String | Environment variables |
Methods
new
fn new() -> SelfCreate a new CodeConfig
sandbox
fn sandbox(mut self, sandbox: bool) -> SelfSet sandbox mode
Parameters:
| Name | Type |
|---|---|
sandbox | bool |
timeout
fn timeout(mut self, timeout: u32) -> SelfSet timeout
Parameters:
| Name | Type |
|---|---|
timeout | u32 |
allowed_languages
fn allowed_languages(mut self, languages: Vec<String>) -> SelfSet allowed languages
Parameters:
| Name | Type |
|---|---|
languages | Vec<String> |
Source
View on GitHubpraisonai/src/agents/mod.rs at line 721