async with) and explicit lifecycle management.
SimpleBox
Context manager for basic command execution with automatic cleanup.Constructor
Either
image or rootfs_path must be provided. If both are given, rootfs_path takes precedence.Properties
Methods
Example
CodeBox
Specialized box for Python code execution with package management.Constructor
Methods
Example
BrowserBox
Box configured for browser automation with Chrome DevTools Protocol.BrowserBoxOptions
Default image
All browser types use a single Playwright image:mcr.microsoft.com/playwright:v1.58.0-jammy
The Playwright Server listens on port 3000. The CDP endpoint (for Puppeteer) is on port 9222.
Properties
Methods
Example
ComputerBox
Box with full desktop environment and GUI automation capabilities. Uses thelscr.io/linuxserver/webtop:ubuntu-xfce image by default.
Constructor
Mouse Methods
Keyboard Methods
Key Syntax Reference
Thekey() method uses xdotool key syntax:
Examples:
Display Methods
Screenshot Return Format
Scroll Directions
Example
InteractiveBox
Box for interactive terminal sessions with PTY support.Constructor
TTY Mode
Methods
Example
BoxOptions
Configuration options shared across all box types. See BoxOptions reference for the full specification.BoxInfo
Metadata about a box, returned bybox.info() and runtime.list().
BoxStateInfo
Detailed state information for a box.See Also
- Python SDK Overview - Runtime management, installation, sync API
- Execution - Command execution, streaming I/O
- Errors & Metrics - Exception hierarchy, metrics classes

