Master AI Agent Framework Middleware in just 30 minutes!
Learn Microsoft AI breaks down the three core middleware types used in modern AI agent frameworks and what each layer is responsible for when building agentic applications.
Overview
The video covers three middleware layers commonly used in AI agent frameworks and how they fit into an agent execution pipeline.
Agent middleware
Agent middleware focuses on the agent-level execution lifecycle, including:
- Agent execution control
- Memory and context handling
- Tool orchestration
Function middleware
Function middleware sits around function/tool invocation and is used to:
- Intercept function calls
- Validate inputs
- Handle retries
- Add logging
- Manage errors
Chat middleware
Chat middleware focuses on the chat/message pipeline, including:
- Controlling chat flow
- Message processing
- History management
- Moderation
- Response formatting
Topics called out
- Agent middleware architecture
- Function execution pipeline
- Chat processing flow