AgentResiliencePlugin
NexusLabs.Needlr.AgentFramework.Workflows¶
NexusLabs.Needlr.AgentFramework.Workflows.Middleware¶
AgentResiliencePlugin Class¶
MAF agent-level middleware that wraps each agent run call in a Polly.ResiliencePipeline<> from Microsoft.Extensions.Resilience / Polly.
Inheritance System.Object 🡒 AgentResiliencePlugin
Implements NexusLabs.Needlr.AgentFramework.IAIAgentBuilderPlugin
Remarks¶
This is the right middleware level for agent resilience because it wraps the entire
RunAsync() call and catches LLM failures, tool failures, and orchestration errors
together. Streaming RunStreamingAsync() passes through without retry.
Constructors¶
AgentResiliencePlugin(ResiliencePipeline<AgentResponse>) Constructor¶
Parameters¶
pipeline Polly.ResiliencePipeline<Microsoft.Agents.AI.AgentResponse>
The resilience pipeline to wrap around each RunAsync call.
Methods¶
AgentResiliencePlugin.Configure(AIAgentBuilderPluginOptions) Method¶
Called during agent factory initialisation to configure the agent builder.
Parameters¶
options NexusLabs.Needlr.AgentFramework.AIAgentBuilderPluginOptions
Implements Configure(AIAgentBuilderPluginOptions)