ResourceLimits
Defined in the sandbox module.Rust AI Agent SDK Resource limits for sandbox execution.
Fields
| Name | Type | Description |
|---|---|---|
memory_mb | u32 | Maximum memory in megabytes (0 = unlimited) |
cpu_percent | u32 | Maximum CPU percentage (0 = unlimited) |
timeout_seconds | u32 | Maximum execution time in seconds |
max_processes | u32 | Maximum number of processes |
max_open_files | u32 | Maximum number of open files |
network_enabled | bool | Whether network access is allowed |
disk_write_mb | u32 | Maximum disk write in megabytes (0 = unlimited) |
Methods
new
minimal
standard
generous
memory_mb
| Name | Type |
|---|---|
mb | u32 |
cpu_percent
| Name | Type |
|---|---|
percent | u32 |
timeout_seconds
| Name | Type |
|---|---|
seconds | u32 |
max_processes
| Name | Type |
|---|---|
max | u32 |
max_open_files
| Name | Type |
|---|---|
max | u32 |
network_enabled
| Name | Type |
|---|---|
enabled | bool |
disk_write_mb
| Name | Type |
|---|---|
mb | u32 |
Source
View on GitHub
praisonai/src/sandbox/mod.rs at line 57
