Skip to main content

Module sandbox

Module sandbox 

Source
Available on crate feature sandbox only.
Expand description

Isolated code execution runtime (experimental — full preset).

Provides the SandboxBackend trait and built-in backends:

  • ProcessBackend - Subprocess execution with timeout and env isolation
  • WasmBackend - In-process WASM execution via wasmtime (requires wasm feature)
  • SandboxTool - Tool trait implementation for agent integration

Available with feature: sandbox

Modules§

backend
The SandboxBackend trait and BackendCapabilities descriptor.
error
Error types for sandbox execution.
processprocess
ProcessBackend — subprocess-based code execution via tokio::process::Command.
sandbox
OS-level sandbox enforcement types and traits.
tool
SandboxTool — an adk_core::Tool implementation that delegates execution to a configured SandboxBackend.
types
Core types for sandbox execution: Language, ExecRequest, and ExecResult.

Structs§

AllowedPath
A filesystem path entry with an access mode.
BackendCapabilities
Describes what a backend supports and enforces.
EnforcedLimits
Describes which resource limits a backend enforces.
ExecRequest
A request to execute code in a sandbox.
ExecResult
The result of a sandbox execution.
NetworkRule
A network access rule specifying an allowed domain and ports.
ProcessBackend
Subprocess-based sandbox backend.
ProcessConfig
Configuration for ProcessBackend.
SandboxPolicy
A declarative sandbox policy describing allowed operations.
SandboxPolicyBuilder
Builder for constructing SandboxPolicy values incrementally.
SandboxTool
A tool that executes code in an isolated sandbox.
WrappedCommand
The result of wrapping a command with sandbox enforcement.

Enums§

AccessMode
Filesystem access mode for an allowed path.
IsolationClass
How much isolation a backend actually provides.
Language
Supported execution languages.
SandboxError
Errors that can occur during sandbox execution.

Traits§

SandboxBackend
Async trait for isolated code execution backends.
SandboxEnforcer
Platform-specific sandbox enforcement.

Functions§

get_enforcer
Returns the platform-appropriate sandbox enforcer.