Skip to main content

SandboxProtocol

Defined in the sandbox module.
Rust AI Agent SDK Protocol for sandbox implementations. Sandboxes provide isolated environments for safe code execution. Implementations can use Docker, subprocess isolation, or other containerization technologies.

Methods

is_available

Whether the sandbox backend is available.

sandbox_type

Type of sandbox (docker, subprocess, etc.).

start

Start/initialize the sandbox environment.

stop

Stop/cleanup the sandbox environment.

execute

Execute code in the sandbox. Parameters:

execute_file

Execute a file in the sandbox. Parameters:

run_command

Run a shell command in the sandbox. Parameters:

write_file

Write a file to the sandbox. Parameters:

read_file

Read a file from the sandbox. Parameters:

list_files

List files in a sandbox directory. Parameters:

get_status

Get sandbox status information.

cleanup

Clean up sandbox resources.

reset

Reset sandbox to initial state.

Source

View on GitHub

praisonai/src/sandbox/mod.rs at line 0

Rust Database

Rust Sandbox

Rust Code Execution