8. As shown in Figure 1, in $\triangle A B C$, it is known that $A B=5, B C$ $=8, A C=7$. Points $P$ and $Q$ are moving points on sides $A B$ and $A C$, respectively, such that the circumcircle of $\triangle A P Q$ is tangent to $B C$. Then the minimum length of line segment $P Q$ is $\qquad$
8. $\frac{30}{7}$.

Since the three side lengths of $\triangle ABC$ are known, the three interior angles of $\triangle ABC$ are fixed.
By $\frac{PQ}{\sin A} = 2R$ (where $R$ is the circumradius of $\triangle APQ$),

we get $PQ = 2R \sin A$.
To minimize $PQ$, $R$ must be minimized.
Since the circumcircle of $\triangle APQ$ is tangent to $BC$, $R$ is minimized when the altitude $AH$ from $A$ to $BC$ is the diameter of the circumcircle of $\triangle APQ$.
Notice that
$\cos A = \frac{5^2 + 7^2 - 8^2}{2 \times 5 \times 7} = \frac{1}{7}$,
$\sin A = \sqrt{1 - \left(\frac{1}{7}\right)^2} = \frac{4\sqrt{3}}{7}$.
And $AH \times 8 = 5 \times 7 \sin A \Rightarrow AH = \frac{35}{8} \sin A$.
Thus, $PQ_{\min} = AH \sin A = \frac{35}{8} \sin^2 A = \frac{30}{7}$.