2. If a circle with radius $r$ can be drawn above the parabola $y=a x^{2}(a>0)$, tangent to the parabola at the origin $O$, and the circle has no other common points with the parabola, then the maximum value of $r$ is ( ).
(A) $\frac{1}{2 a}$
(B) $\frac{1}{a}$
(C) $a$
(D) $2 a$
2. (A).

From the problem, we know the system of equations
$$
\left\{\begin{array}{l}
x^{2}+(y-r)^{2}=r^{2}(r>0) . \\
y=a x^{2}(a>0) .
\end{array}\right.
$$

has only one solution $x=y=0$.
Substituting (2) into (1) yields $y \cdot\left(y,-\frac{2 a r-1}{a}\right)=0$. Therefore, it must be that $2 a r-1 \leqslant 0$, i.e., $r \leqslant \frac{1}{2 a}$. Hence, the maximum value of the radius $r$ is $\frac{1}{2 a}$.