Skip to content

NexusLabs.Foundry.MicrosoftAgentFramework.Workflows.Middleware

NexusLabs.Foundry.MicrosoftAgentFramework.Workflows

NexusLabs.Foundry.MicrosoftAgentFramework.Workflows.Middleware Namespace

Classes
AgentMiddlewareExtensions Extension methods that add Foundry middleware to the NexusLabs.Foundry.MicrosoftAgentFramework.AgentFrameworkBuilder and to MAF's Microsoft.Agents.AI.AIAgentBuilder directly.
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.
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.