Example 4 If $a, b$ are any positive real numbers, find $\max \left\{\min \left\{a, \frac{1}{b}, b+\frac{1}{a}\right\}\right\}$.
(2003, Beijing Middle School Mathematics Competition)
Solution: Let $x=\min \left\{a, \frac{1}{b}, b+\frac{1}{a}\right\}>0$. Then
$$
\begin{array}{l}
x \leqslant a \Leftrightarrow \frac{1}{a} \leqslant \frac{1}{x}, \\
x \leqslant \frac{1}{b} \Leftrightarrow b \leqslant \frac{1}{x}, \\
x \leqslant b+\frac{1}{a} \\
\leqslant \frac{1}{x}+\frac{1}{x}=\frac{2}{x} .
\end{array}
$$

Thus, $x^{2} \leqslant 2$, i.e., $x \leqslant \sqrt{2}$.
When equations (1), (2), and (3) hold as equalities, we get
$$
a=\frac{1}{b}=\sqrt{2} \text {, }
$$

and $x$ reaches its maximum value $\sqrt{2}$.
Therefore, $\max \left\{\min \left\{a, \frac{1}{b}, b+\frac{1}{a}\right\}\right\}=\sqrt{2}$.