Skip to content

NexusLabs.Needlr.AgentFramework.Workflows.Middleware

NexusLabs.Needlr.AgentFramework.Workflows

NexusLabs.Needlr.AgentFramework.Workflows.Middleware Namespace

Classes
AgentResiliencePlugin MAF agent-level middleware that wraps each agent run call in a Polly.ResiliencePipeline<> from Microsoft.Extensions.Resilience / Polly.
ChatClientBuilderTranscriptExtensions Extension methods for adding transcript logging to a Microsoft.Extensions.AI.ChatClientBuilder pipeline.
InMemoryTranscriptWriter In-memory ITranscriptWriter that stores entries in a list. Useful for testing and scenarios where transcript data is consumed programmatically after execution.
NeedlrAgentMiddlewareExtensions Extension methods that add Needlr middleware to the NexusLabs.Needlr.AgentFramework.AgentFrameworkSyringe and to MAF's Microsoft.Agents.AI.AIAgentBuilder directly.
ToolResultFunctionMiddleware MAF function-invocation middleware that intercepts [AgentFunction] return values and exceptions, ensuring the LLM always receives a structured JSON response instead of a raw stack trace.
TranscriptEntry A single transcript entry capturing either a request sent to the LLM or a response received from it.
TranscriptLoggingChatClient Microsoft.Extensions.AI.DelegatingChatClient middleware that intercepts GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken) calls and writes request/response pairs to an ITranscriptWriter.
Interfaces
ITranscriptWriter Writes transcript entries for LLM interactions during agent execution. Implementations may write to files, streams, or in-memory buffers.
Enums
TranscriptEntryKind Indicates whether a TranscriptEntry represents a request sent to the LLM or a response received from it.