2. The maximum value of the function $f(x)=\frac{\sqrt{x}}{x^{2}+x+4}(x>0)$ is $\qquad$ .
2. $\frac{1}{6}$.

By the AM-GM inequality, we have
$$
\begin{array}{l}
x^{2}+x+1+1+1+1 \\
\geqslant 6 \sqrt[6]{x^{2} x \times 1 \times 1 \times 1 \times 1} \\
\Rightarrow x^{2}+x+4 \geqslant 6 \sqrt{x} \Rightarrow f(x) \leqslant \frac{1}{6} .
\end{array}
$$

When $x=1$, the equality holds.
Thus, the maximum value of $f(x)$ is $\frac{1}{6}$.