Skip to content

IHarnessScenario

NexusLabs.Foundry.MicrosoftAgentFramework.Testing

IHarnessScenario Interface

Extends IAgentScenario with the construction and verification hooks required to exercise a Microsoft Agent Framework Harness lifecycle.

public interface IHarnessScenario : NexusLabs.Foundry.MicrosoftAgentFramework.Testing.IAgentScenario

Implements IAgentScenario

Remarks

The scenario owns agent construction so the Testing package remains independent of the optional complete-Harness bundle. HarnessScenarioRunner owns generated-function resolution, workspace and execution-context scoping, session creation, execution, and evidence capture.

Properties

IHarnessScenario.GeneratedFunctionTypes Property

Gets the source-generated function-group types required by the scenario.

System.Collections.Generic.IReadOnlyList<System.Type> GeneratedFunctionTypes { get; }

Property Value

System.Collections.Generic.IReadOnlyList<System.Type>

Methods

IHarnessScenario.CreateAgent(HarnessScenarioAgentContext) Method

Creates the Harness-enabled agent that the runner will execute.

Microsoft.Agents.AI.AIAgent CreateAgent(NexusLabs.Foundry.MicrosoftAgentFramework.Testing.HarnessScenarioAgentContext context);

Parameters

context HarnessScenarioAgentContext

The seeded workspace, trusted execution identity, caller services, and generated functions.

Returns

Microsoft.Agents.AI.AIAgent
The constructed Harness-enabled agent.

Remarks

The supplied generated functions carry the runner's execution tracker. Scenarios must pass them through directly, or through wrappers that delegate to them, for generated-body execution evidence to be recorded.

IHarnessScenario.VerifyHarness(HarnessScenarioVerificationContext) Method

Verifies Harness-specific lifecycle evidence after execution.

void VerifyHarness(NexusLabs.Foundry.MicrosoftAgentFramework.Testing.HarnessScenarioVerificationContext context);

Parameters

context HarnessScenarioVerificationContext

The session, response, generated-tool resolution, execution trace, workspace, and error evidence captured by the runner.