Overview
The Runtime API manages Docker-based sandboxed environments for secure tool execution. Each agent runs in an isolated container with its own filesystem and network.Getting the Runtime
get_runtime
AbstractRuntime
Runtime instance (currently DockerRuntime)
AbstractRuntime
Base interface for runtime implementations.create_sandbox
str
required
Unique identifier for the agent
str | None
Authentication token to reuse
list[dict[str, str]] | None
Local directories to mount in the sandbox
SandboxInfo
Sandbox information dictionary
get_sandbox_url
str
required
Docker container ID
int
required
Container port number
str
Accessible URL (e.g., “http://127.0.0.1:49152”)
destroy_sandbox
str
required
Container ID to destroy
cleanup
DockerRuntime
Docker-based runtime implementation.Configuration
Configure via environment variables:Container Features
The Docker sandbox provides:- Isolated filesystem - Each container has
/workspacefor file operations - Network access - Containers can make external HTTP requests
- Tool server - Built-in HTTP server for executing tools
- Caido proxy - Integrated proxy for HTTP traffic analysis
- Security - Runs as non-root user with limited capabilities
Container Lifecycle
Containers are shared across agents in the same scan:- First agent creates the container
- Subsequent agents reuse the same container
- Local sources are copied only once
- Container persists until explicitly destroyed or cleanup
Exceptions
SandboxInitializationError
str
required
Error message
str | None
Additional error details
Cleanup
cleanup_runtime
Advanced Usage
Custom Local Sources
Accessing Container Services
Environment Variables
str
default:"'docker'"
Runtime backend to use (currently only “docker” supported)
str
default:"'ghcr.io/usestrix/strix-sandbox:0.1.12'"
Docker image for sandboxes
str
default:"'120'"
Tool execution timeout in seconds
str
default:"'10'"
Connection timeout in seconds
str
default:"None"
Custom Docker host URL (e.g., “tcp://192.168.1.100:2376”)