On .NET Live - Demystifying Microsoft Agent Framework Middleware

Daniel Costea walks through how he uses ChatClient and Microsoft Agent Framework middleware to turn plain .NET AI agents into production-ready systems with observability, safety, and cost control.

Overview

The session starts from a simple agent that talks directly to an LLM, then steps through common real-world failure modes (for example: cost spikes, privacy leaks, and unsafe tool calls). Costea then layers middleware components to address those issues, mapping the concepts back to the familiar ASP.NET Core middleware pattern so .NET developers can reuse an existing mental model.

Key concepts covered

ChatClient and agent middleware architecture

Middleware types and composition

FunctionCalling middleware and the interceptor-executor pattern

Visibility and safety boundaries