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:
app.py
app.py, and run python app.py. It should print plugin names followed by an agent response. Response verification uses rules and does not guarantee factual correctness. Compression can remove detail, so evaluate it for your task
Plugin capabilities
Configuration via environment variables
Usebuild_harness_plugins_from_env() to build plugins from environment variables:
Components and profile prefer
HARNESS_ENHANCE_COMPONENTS and HARNESS_ENHANCE_PROFILE, then their counterparts without ENHANCE. Character limits, storage path, compression provider, and verifier mode prefer the variables without ENHANCE. There is no single prefix-precedence rule for all settings
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.Direct module usage
Individual modules from the in-process mode can also be used directly:Checking Sidecar status
After setting the environment, createHarnessExtension before constructing the agent. Call close() when finished or use a context manager. Inspect sidecar_status_payload(): ok indicates successful startup; degraded indicates fallback and does not prove enhancements are active. HARNESS_SIDECAR_FAIL_OPEN=true allows execution to continue after startup failure by default. Set it to false if Sidecar is mandatory
See Harness deployment for the standalone service’s HTTP API, sessions, and deployment. Sidecar bindings affect model and MCP request destinations; confirm upstream endpoints and credential sources before use