9. Given a regular quadrilateral pyramid $S-A B C D$ with lateral edge length $4, \angle A S B=30^{\circ}$, points $E, F, G$ are taken on the lateral edges $S B, S C, S D$ respectively. Then the minimum perimeter of the spatial quadrilateral $A E F G$ is $\qquad$
9. $4 \sqrt{3}$.

Unfold the side of the quadrilateral pyramid along $S A$, as shown in Figure 1. When points $A, E, F, G$ are collinear, the perimeter of the original spatial quadrilateral $A E F G$ takes the minimum value $2 S A \sin 60^{\circ}=4 \sqrt{3}$.