Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
SandboxConfig
Defined in the sandbox module.
Rust AI Agent SDK
Configuration for a sandbox.
Fields
| Name | Type | Description |
|---|
sandbox_type | String | Sandbox type (docker, subprocess, etc.) |
image | Option<String> | Docker image to use (if docker type) |
working_dir | Option<String> | Working directory |
env | HashMap<String | Environment variables |
limits | ResourceLimits | Resource limits |
auto_cleanup | bool | Whether to auto-cleanup after execution |
Methods
new
Create a new config with defaults.
docker
fn docker(image: impl Into<String>) -> Self
Create a Docker sandbox config.
Parameters:
| Name | Type |
|---|
image | impl Into<String> |
subprocess
Create a subprocess sandbox config.
working_dir
fn working_dir(mut self, dir: impl Into<String>) -> Self
Set working directory.
Parameters:
| Name | Type |
|---|
dir | impl Into<String> |
env
fn env(mut self, key: impl Into<String>, value: impl Into<String>) -> Self
Add environment variable.
Parameters:
| Name | Type |
|---|
key | impl Into<String> |
value | impl Into<String> |
limits
fn limits(mut self, limits: ResourceLimits) -> Self
Set resource limits.
Parameters:
| Name | Type |
|---|
limits | ResourceLimits |
auto_cleanup
fn auto_cleanup(mut self, cleanup: bool) -> Self
Set auto-cleanup.
Parameters:
Source
View on GitHub
praisonai/src/sandbox/mod.rs at line 311