async def logging_agent_middleware( context: AgentRunContext, next: Callable[[AgentRunContext], Awaitable[None]] ) -> None: print("[Agent] Starting execution") await next(context) print("[Agent] Execution completed")