Skip to content

Index

NexusLabs.Needlr.AgentFramework.Testing Namespace

Classes
AgentExecutionContextBuilder Mutable builder used by WithExecutionContext(Action<AgentExecutionContextBuilder>) to configure the NexusLabs.Needlr.AgentFramework.Context.IAgentExecutionContext a tool sees during invocation.
AgentScenarioRunner Executes IAgentScenario instances with proper workspace isolation, execution context scoping, and diagnostics capture.
PipelineScenarioResult Result of running a single IPipelineScenario.
PipelineScenarioRunner Runs IPipelineScenario instances using the NexusLabs.Needlr.AgentFramework.Workflows.Sequential.SequentialPipelineRunner and reports results.
PromptAssert Assertion helpers for verifying prompt integrity without LLM invocation. Use in unit tests to catch prompt regressions (missing safety rules, deleted sections, forbidden patterns) at zero token cost.
PromptAssertionException Thrown by PromptAssert methods when a prompt integrity assertion fails.
ScenarioRunResult Result of running a single IAgentScenario.
ScenarioVerificationException Thrown when a scenario's Verify(IWorkspace, IAgentRunDiagnostics) method detects a failure.
ToolInvocationResult Result of a single InvokeAsync<TTool>(string, Action<AIFunctionArguments>, CancellationToken) call.
ToolInvocationRunner Test harness for invoking [AgentFunction]-decorated tool methods through their source-generated Microsoft.Extensions.AI.AIFunction wrapper, with the same plumbing Microsoft.Extensions.AI.FunctionInvokingChatClient uses in production.
Interfaces
IAgentScenario Defines a self-contained agent test scenario with seed → execute → verify lifecycle. Scenarios are discovered automatically when registered via DI.
IPipelineScenario Defines a pipeline scenario for multi-stage agent workflow testing. Extends the single-agent scenario pattern with pipeline stage construction and pipeline-specific verification.
Enums
ToolFunctionSource Identifies which discovery path produced an Microsoft.Extensions.AI.AIFunction resolved by ToolInvocationRunner.