autogen/dotnet/website/articles/Middleware-overview.md
Short-circuit the next agent The example below shows how to short-circuit the inner agent  [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/MiddlewareAgentCodeSnippet.cs?name=short_circuit_middleware_agent)]  > [!Note] > When multiple middleware functions are registered, the order of middleware functions is first registered, last invoked. 