FoundryHarnessAgentFactory
NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle¶
FoundryHarnessAgentFactory Class¶
Constructs an Microsoft.Agents.AI.AIAgent through the official upstream
Microsoft.Agents.AI.Harness complete-bundle pipeline from an explicit
FoundryHarnessAgentConfiguration, and reports the requested-versus-effective
disposition of every bundle default.
Inheritance System.Object 🡒 FoundryHarnessAgentFactory
Remarks¶
This factory always builds through Microsoft.Extensions.AI.ChatClientHarnessExtensions.AsHarnessAgent.
It never falls back to, or otherwise composes with, the selected-provider composition
surface in NexusLabs.Foundry.MicrosoftAgentFramework; the two lanes are
intentionally separate.
Methods¶
FoundryHarnessAgentFactory.Create(FoundryHarnessAgentConfiguration) Method¶
Builds an Microsoft.Agents.AI.AIAgent for the given configuration using the upstream bundle's default logging and service resolution.
public Microsoft.Agents.AI.AIAgent Create(NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessAgentConfiguration configuration);
Parameters¶
configuration FoundryHarnessAgentConfiguration
The explicit bundle configuration.
Returns¶
Microsoft.Agents.AI.AIAgent
An Microsoft.Agents.AI.AIAgent backed by the official upstream HarnessAgent.
FoundryHarnessAgentFactory.Create(FoundryHarnessAgentConfiguration, ILoggerFactory) Method¶
Builds an Microsoft.Agents.AI.AIAgent for the given configuration, using loggerFactory for the bundle's internal logging.
public Microsoft.Agents.AI.AIAgent Create(NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessAgentConfiguration configuration, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
Parameters¶
configuration FoundryHarnessAgentConfiguration
The explicit bundle configuration.
loggerFactory Microsoft.Extensions.Logging.ILoggerFactory
The logger factory used by the agent and its components.
Returns¶
Microsoft.Agents.AI.AIAgent
An Microsoft.Agents.AI.AIAgent backed by the official upstream HarnessAgent.
FoundryHarnessAgentFactory.Create(FoundryHarnessAgentConfiguration, ILoggerFactory, IServiceProvider) Method¶
Builds an Microsoft.Agents.AI.AIAgent for the given configuration, using loggerFactory for internal logging and resolving dependencies from services.
public Microsoft.Agents.AI.AIAgent Create(NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessAgentConfiguration configuration, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, System.IServiceProvider services);
Parameters¶
configuration FoundryHarnessAgentConfiguration
The explicit bundle configuration.
loggerFactory Microsoft.Extensions.Logging.ILoggerFactory
The logger factory used by the agent and its components.
services System.IServiceProvider
The service provider used to resolve tool and component dependencies.
Returns¶
Microsoft.Agents.AI.AIAgent
An Microsoft.Agents.AI.AIAgent backed by the official upstream HarnessAgent.
FoundryHarnessAgentFactory.Create(FoundryHarnessAgentConfiguration, IServiceProvider) Method¶
Builds an Microsoft.Agents.AI.AIAgent for the given configuration, resolving dependencies required by tools and other agent components from services.
public Microsoft.Agents.AI.AIAgent Create(NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessAgentConfiguration configuration, System.IServiceProvider services);
Parameters¶
configuration FoundryHarnessAgentConfiguration
The explicit bundle configuration.
services System.IServiceProvider
The service provider used to resolve tool and component dependencies.
Returns¶
Microsoft.Agents.AI.AIAgent
An Microsoft.Agents.AI.AIAgent backed by the official upstream HarnessAgent.
FoundryHarnessAgentFactory.DescribeEffectiveDefaults(FoundryHarnessAgentConfiguration) Method¶
Computes the requested-versus-effective disposition of every upstream bundle dimension for configuration, without constructing an agent.
public NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessEffectiveDefaults DescribeEffectiveDefaults(NexusLabs.Foundry.MicrosoftAgentFramework.Harness.Bundle.FoundryHarnessAgentConfiguration configuration);
Parameters¶
configuration FoundryHarnessAgentConfiguration
The explicit bundle configuration to inspect.
Returns¶
FoundryHarnessEffectiveDefaults
A complete FoundryHarnessEffectiveDefaults report.
Remarks¶
This method runs the same configuration validation as every Create overload.
An invalid configuration that would cause Create to throw will also cause
DescribeEffectiveDefaults to throw with the same error. This guarantees that any
report returned here describes a configuration that can actually be constructed.
This is a pure function of configuration. Call it before construction to preview what a configuration will do, or after construction (with the same configuration instance) to explain what was actually built.