A practical guide to using middleware in Microsoft Agent Framework with .NET. Covers three middleware types: Agent Run Middleware (intercepts agent runs to inspect input/output), Function Calling Middleware (intercepts function calls executed by the agent), and Chat Client Middleware (intercepts raw IChatClient calls to inspect LLM messages). Includes concrete C# code examples showing how to log message counts, function names/results, and raw chat messages including TextContent, FunctionCallContent, and FunctionResultContent types.

4m read timeFrom jaliyaudagedara.blogspot.com
Post cover image

Sort: