6. Given the hyperbola
$$
\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1(a>0, b>0),
$$

the left and right foci are $F_{1}$ and $F_{2}$, respectively. A perpendicular line to the $x$-axis is drawn through $F_{2}$, intersecting the hyperbola at points $A$ and $B$. The radius of the incircle of $\triangle A B F_{1}$ is $a$. Then the eccentricity of this hyperbola is $\qquad$
6. $\frac{1+\sqrt{5}}{2}$.

From the conditions, we know $F_{1}(-c, 0), F_{2}(c, 0)$.
Without loss of generality, let $A\left(c, \frac{b^{2}}{a}\right)$. Then
$$
l_{A F_{1}}: y=\frac{b^{2}}{2 a c}(x+c) \text {. }
$$

Obviously, the incenter $O_{1}(c-a, 0)$ of $\triangle A B F_{1}$. Therefore, the distance from point $O_{1}$ to the line $A F_{1}$ is $a$, i.e.,
$$
\frac{\left|(c-a) \frac{b^{2}}{2 a c}+\frac{b^{2}}{2 a}\right|}{\sqrt{\left(\frac{b^{2}}{2 a c}\right)^{2}+1}}=a \text {. }
$$

Notice that,
$$
\begin{array}{l}
b^{4}+4 a^{2} c^{2}=\left(c^{2}-a^{2}\right)^{2}+4 a^{2} c^{2}=\left(c^{2}+a^{2}\right)^{2} \\
\Rightarrow \frac{\left(c^{2}-a^{2}\right)(2 c-a)}{c^{2}+a^{2}}=a \\
\Rightarrow c^{2}-a c-a^{2}=0 \\
\Rightarrow e^{2}-e-1=0 \\
\Rightarrow e=\frac{1+\sqrt{5}}{2} .
\end{array}
$$