Skip to content

FoundryHarnessFeatureSelections

NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle

FoundryHarnessFeatureSelections Class

Explicit, required choices for every exposed dimension of the upstream Microsoft.Agents.AI.Harness complete-bundle pipeline.

public sealed record FoundryHarnessFeatureSelections : System.IEquatable<NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessFeatureSelections>

Inheritance System.Object 🡒 FoundryHarnessFeatureSelections

Implements System.IEquatable<FoundryHarnessFeatureSelections>

Remarks

Upstream ships every dimension here enabled by default and individually disableable via a Disable* flag on Microsoft.Agents.AI.HarnessAgentOptions. Foundry deliberately requires every property here so a caller can never silently inherit an upstream default without consciously choosing it.

Dimensions that upstream cannot disable at all (function invocation, message injection, per-service-call history persistence) are intentionally absent from this type; see AlwaysOnUnavoidable. The file-access dimension is opt-in via FileAccessStore and is therefore also absent from this type.

Properties

FoundryHarnessFeatureSelections.EnableAgentModeProvider Property

Gets whether the plan/execute agent-mode context provider is included. Upstream default: enabled.

public bool EnableAgentModeProvider { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableAgentSkills Property

Gets whether the file-based agent skills provider is included in the agent's context providers. Upstream default: enabled.

public bool EnableAgentSkills { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableApprovalNotRequiredFunctionBypassing Property

Gets whether automatically-approved calls for tools that do not require approval are bypassed rather than surfaced to the caller. Upstream default: enabled.

public bool EnableApprovalNotRequiredFunctionBypassing { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableApprovalResponseBinding Property

Gets whether inbound tool-approval responses are bound to the model-originated approval requests the framework surfaced. Upstream default: enabled.

public bool EnableApprovalResponseBinding { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableBackgroundAgents Property

Gets whether upstream's background-agent context provider is included so the parent agent can start, monitor, continue, and clear tasks on caller-supplied child agents. Upstream default: disabled.

public bool EnableBackgroundAgents { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableCompaction Property

Gets whether upstream's context-window compaction is enabled, bounding the conversation the agent carries \<em>between\</em> turns. The upstream disable flag defaults to false, but compaction is effectively inert until either an explicit CompactionStrategy or both token budgets are supplied. Foundry therefore treats this dimension as explicit opt-in and fails closed when an enabled configuration supplies neither valid backing form.

public bool EnableCompaction { get; init; }

Property Value

System.Boolean

Remarks

Mechanism. Upstream's CompactionProvider is an AIContextProvider, so it is invoked once per agent turn — once per RunAsync — above the tool-invocation loop, and it reduces the persisted chat-history index. It changes what the agent subsequently remembers, and its budgets are provider tokens.

It does not bound a tool loop. A single turn making several model calls is compacted only against the state preceding the first round. Measured over a two-round tool loop with an always-firing strategy: consulted once, against a two-message index, never seeing the round that carried the tool call and its result. A two-iteration outer LoopAgent run also consults upstream compaction once for the complete caller turn, while Foundry hybrid compaction observes both provider requests. Identical tool-loop behavior on 1.15.0, 1.16.0, and 1.17.0. Tracked in ncosentino/foundry#73.

This and EnableHybridCompaction are independent rather than layered: either may be enabled alone, neither suppresses the other, and enabling hybrid does not extend this dimension's reach. Enable this one when context grows across many turns.

FoundryHarnessFeatureSelections.EnableFileMemory Property

Gets whether the file-based session memory provider is included in the agent's context providers. Upstream default: enabled.

public bool EnableFileMemory { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableHybridCompaction Property

Gets whether Foundry's per-provider-call hybrid compaction is enabled, bounding what is \<em>sent\</em> on each individual provider request. Requires HybridCompactionOptions; supplying one while this is disabled, or enabling this without one, fails closed before any agent is constructed.

public bool EnableHybridCompaction { get; init; }

Property Value

System.Boolean

Remarks

Mechanism. Foundry wraps the supplied chat client at the innermost position. The function-invocation loop and message injection each call their inner client afresh, so every intermediate tool round cascades down to this node and is bounded — including the round carrying a tool call and its result, which EnableCompaction never observes. Budgets are UTF-8 bytes of rendered content rather than provider tokens, so choose one with headroom.

Stored history is not shrunk. This node is inner to the per-service-call history decorator, so history is persisted before a reduction is applied and every call re-assembles from the full record. Reductions are non-destructive but also non-cumulative: the cost is paid per call and the stored record keeps growing. Enable EnableCompaction alongside this when the record itself needs bounding.

A context that cannot be reduced below the configured hard limit fails the request rather than being forwarded over budget. Enable this one when context grows from tool results inside a single turn.

FoundryHarnessFeatureSelections.EnableLoopEvaluation Property

Gets whether the complete Harness agent is wrapped in upstream's outer LoopAgent so caller-supplied evaluators can request another complete agent run. Upstream default: disabled.

public bool EnableLoopEvaluation { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableOpenTelemetry Property

Gets whether the agent is wrapped with OpenTelemetry instrumentation following the Semantic Conventions for Generative AI systems. Upstream default: enabled.

public bool EnableOpenTelemetry { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableTodoProvider Property

Gets whether the persistent todo-list context provider is included. Upstream default: enabled.

public bool EnableTodoProvider { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableToolAutoApproval Property

Gets whether the "don't ask again" tool auto-approval middleware wraps the agent. Upstream default: enabled.

public bool EnableToolAutoApproval { get; init; }

Property Value

System.Boolean

FoundryHarnessFeatureSelections.EnableWebSearch Property

Gets whether the hosted web search tool is added to the agent's chat options. Upstream default: enabled.

public bool EnableWebSearch { get; init; }

Property Value

System.Boolean