Jesse Liberty 8/8/2026

ChatClient Middleware vs. Agent Middleware

Read Original

This article provides a detailed comparison of ChatClient Middleware and Agent Middleware within the Microsoft Agent Framework. It explains the purpose of each middleware type, their use cases, and provides code examples in C#. ChatClient Middleware intercepts raw messages between agents and LLMs for logging and modification, while Agent Middleware operates at a higher level to manage agent runs, session, identity, and token budgets. The article is intended for developers working with the Agent Framework to optimize agent performance and observability.

ChatClient Middleware vs. Agent Middleware

Comments

No comments yet

Be the first to share your thoughts!