When to use
Installation
The base Harness extension is bundled with VeADK and requires no additional installation. To use the Headroom compression provider, install theharness extra:
In-process plugin mode
The in-process mode builds a plugin list viabuild_harness_plugins() and attaches it to the Runner:
Plugin capabilities
Configuration via environment variables
Usebuild_harness_plugins_from_env() to build plugins from environment variables:
Both
HARNESS_ENHANCE_* and HARNESS_* prefixed variables are read; the ENHANCE prefix takes precedence.
Managed Sidecar mode
The managed Sidecar mode starts a managed runtime viaHarnessExtension. The runtime is responsible for executing all Harness enhancement behavior. HarnessExtension only starts the runtime, applies model and MCP bindings, and manages its lifecycle.
Enable via environment variables
SetHARNESS_SIDECAR_ENABLED=true and HarnessExtension.from_env() reads the relevant environment variables and starts the Sidecar:
HarnessExtension supports the context manager protocol and automatically closes the Sidecar on exit:Enable via constructor parameter
You can also enable the Sidecar directly via thesidecar parameter:
sidecar parameter accepts a boolean or a configuration dict. When a dict is provided, its fields are used to resolve the Sidecar plan; when True is provided, default configuration is used.
Enable via configuration object
UseHarnessSidecarConfig to build a complete configuration, then pass it to HarnessExtension:
HarnessSidecarConfig.from_env() can also build a configuration object from environment variables.
Sidecar status
Sidecar environment variables
The managed Sidecar mode is configured through the following environment variables. Defaults are used when not explicitly set.General configuration
Model proxy configuration
MCP gateway configuration
HarnessExtension parameters
When
profile is ops, the in-process mode default components include long_run_control.