8. Given a cyclic quadrilateral $A_{1} A_{2} A_{3} A_{4}$ with an inscribed circle $\odot I$ that is tangent to the sides $A_{1} A_{2}$, $A_{2} A_{3}$, $A_{3} A_{4}$, and $A_{4} A_{1}$ at points $B_{1}$, $B_{2}$, $B_{3}$, and $B_{4}$ respectively, then
$$
\left(\frac{A_{1} A_{2}}{B_{1} B_{2}}\right)^{2}+\left(\frac{A_{2} A_{3}}{B_{2} B_{3}}\right)^{2}+\left(\frac{A_{3} A_{4}}{B_{3} B_{4}}\right)^{2}+\left(\frac{A_{4} A_{1}}{B_{4} B_{1}}\right)^{2}
$$

the minimum value is $\qquad$
8. 8 .

As shown in Figure 5, let the radius of $\odot I$ be $r$,
$$
\begin{array}{l}
A_{i} B_{i}=A_{i} B_{i-1} \\
=a_{i},
\end{array}
$$

where $i=1,2,3,4, B_{0}=B_{4}$.
Then $A_{i} A_{i+1}=a_{i}+a_{i+1}$,
$$
B_{i} B_{i+1}=\frac{2 A_{i+1} B_{i} \cdot B_{i} I}{\sqrt{A_{i+1} B_{i}^{2}+B_{i} I^{2}}}=2\left(a_{i+1}^{-2}+r^{-2}\right)^{-\frac{1}{2}} \text {. }
$$

From the right triangle $\triangle A_{i} B_{i} I \subset$ right triangle $\triangle I B_{i+2} A_{i+2}$
$$
\Rightarrow a_{i} a_{i+2}=r^{2}(i=1,2) \text {. }
$$
$$
\begin{array}{l}
\text { Then }\left(\frac{A_{1} A_{2}}{B_{1} B_{2}}\right)^{2}+\left(\frac{A_{2} A_{3}}{B_{2} B_{3}}\right)^{2}+\left(\frac{A_{3} A_{4}}{B_{3} B_{4}}\right)^{2}+\left(\frac{A_{4} A_{1}}{B_{4} B_{1}}\right)^{2} \\
=\frac{1}{4} \sum_{i=1}^{4}\left(a_{i}+a_{i+1}\right)^{2}\left(a_{i+1}^{-2}+r^{-2}\right) . \\
\text { Also } \sum_{i=1}^{4} \frac{\left(a_{i}+a_{i+1}\right)^{2}}{4 a_{i+1}^{2}} \\
=\frac{1}{4} \sum_{i=1}^{4}\left(1+\frac{2 a_{i}}{a_{i+1}}+\frac{a_{i}^{2}}{a_{i+1}^{2}}\right) \geqslant 4, \\
\sum_{i=1}^{4} \frac{\left(a_{i}+a_{i+1}\right)^{2}}{4 r^{2}} \geqslant \sum_{i=1}^{4} \frac{a_{i} a_{i+1}}{r^{2}} \\
\geqslant \frac{4}{r^{2}} \sqrt{\prod_{i=1}^{4} a_{i} a_{i+1}}=4, \\
\text { Therefore }\left(\frac{A_{1} A_{2}}{B_{1} B_{2}}\right)^{2}+\left(\frac{A_{2} A_{3}}{B_{2} B_{3}}\right)^{2}+\left(\frac{A_{3} A_{4}}{B_{3} B_{4}}\right)^{2}+\left(\frac{A_{4} A_{1}}{B_{4} B_{1}}\right)^{2} \geqslant 8 .
\end{array}
$$

Equality holds if and only if $a_{1}=a_{2}=a_{3}=a_{4}$.