#Middleware
Middleware sits between the framework and application logic to handle cross-cutting concerns. Posts cover OpenTelemetry middleware for agentic AI, observability injection, and the middleware patterns that add tracing, logging, and governance without polluting business logic.
6 posts tagged with middleware. ← All posts
How to wrap an agent run to log, guard, retry, redact, and secure it — using middleware seams that sit entirely outside the agent's own logic.
How to wrap an agent run to log, guard, retry, redact, and secure it — using middleware seams that sit entirely outside the agent's own logic.
A guardrail that blocks a run before the model, chained ahead of a logger — and the upstream nil-update panic I fixed along the way.
A guardrail middleware that blocks an Microsoft Agent Framework Go run before the model, chained ahead of a logger — plus the tool-approval nil-update panic I fixed upstream in PR #472.
Wrapping an agent run with async seams that log, time, guard, and short-circuit — without touching the agent's logic.
Wrapping an Microsoft Agent Framework agent run in Python with async middleware seams — timing, logging, and a guardrail that short-circuits a tool call before it runs.
This lesson teaches a middleware chain where a guardrail can block a run before the model is ever called, chained ahead of a logger.
Chain a guardrail middleware that yields its own refusal and skips the model ahead of a logger — short-circuiting a harmful request offline before Foundry is called.
How to instrument agents for observability, error handling, and audit logging.
Migrate ADK callbacks to Microsoft Agent Framework composable middleware: decorators for audit logging, retry with backoff, token budget enforcement, and OpenTelemetry tracing.
How to wrap every agent run with a middleware — the standard hook for logging, tracing, and guardrails.
Wrap every agent run with an agent.Middleware in the Foundry Go SDK: one pass-through function that observes messages and updates without altering the result.
All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse all posts or explore related topics using the tag cloud above.