9. Given $f(x)=x^{2}+x-1$. If $a b^{2} \neq 1$, and $f\left(a^{-1}\right)=f\left(b^{2}\right)=0$, then $\frac{a}{1+a b^{2}}=$ $\qquad$ .
9. -1 .

Given $f(x)=x^{2}+x-1, f\left(a^{-1}\right)=f\left(b^{2}\right)=0, a b^{2} \neq 1$, we know that $a^{-1}$ and $b^{2}$ are the two real roots of $f(x)=x^{2}+x-1$.
By Vieta's formulas, we get $\frac{1}{a}+b^{2}=-1, \frac{b^{2}}{a}=-1$. Thus, $\frac{1}{a}+b^{2}=\frac{b^{2}}{a}=-1$.
Therefore, we have $1+a b^{2}=-a$.