Skip to main content
Harness is a VeADK execution enhancement extension that provides two mutually exclusive integration modes: an in-process plugin mode and a managed Sidecar mode. The in-process mode loads Harness plugins into the application process to prepare context, compact tool results, and verify answers for each turn. The managed Sidecar mode runs all enhancement behavior in a separate managed runtime, and the application process does not load the related plugins.
The two modes cannot be combined. When managed Sidecar mode is enabled, HarnessExtension.plugins() always returns an empty list, and the application process does not load any veadk.extensions.harness.plugins implementation.

When to use

Installation

The base Harness extension is bundled with VeADK and requires no additional installation. To use the Headroom compression provider, install the harness extra:

In-process plugin mode

The in-process mode builds a plugin list via build_harness_plugins() and attaches it to the Runner:

Plugin capabilities

Configuration via environment variables

Use build_harness_plugins_from_env() to build plugins from environment variables:
Related 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 via HarnessExtension. 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

Set HARNESS_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 the sidecar parameter:
The 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.
When Sidecar mode is enabled, the components parameter cannot be passed. Component selection is controlled through component_overrides in the Sidecar configuration.

Enable via configuration object

Use HarnessSidecarConfig 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.
The managed Sidecar mode requires an AgentKit-managed cloud runtime environment. Enabling it in an environment without the Sidecar Runtime causes a startup error or degraded operation, depending on the value of HARNESS_SIDECAR_FAIL_OPEN.

Direct module usage

Individual modules from the in-process mode can also be used directly:
Last modified on September 19, 2026