What It Does
The Sandbox Engine provides isolated code execution environments for AI agents. When an agent callshexr.sandbox.exec(), the code runs inside a Firecracker microVM — completely isolated from the host and other agents.
Security Model
Execution Flow
1
Agent requests code execution
Your agent calls
hexr.sandbox.exec(code, language="python"). The request routes through Envoy to the Gateway.2
Gateway forwards to Sandbox Engine
The Gateway forwards the execute request along with the caller’s SPIFFE ID.
3
Firecracker microVM boots
The Sandbox Engine boots a Firecracker microVM in under 125ms with the requested runtime.
4
Code executes in isolation
The code runs inside the microVM with no network access and no host filesystem visibility.
5
Results captured and VM destroyed
stdout, stderr, and exit_code are captured. Execution telemetry is recorded. The microVM is immediately destroyed.