Example 3 Given $a=\frac{1}{2} \sqrt{\sqrt{2}+\frac{1}{8}}-\frac{\sqrt{2}}{8}$. Try to find the value of $a^{2}+\sqrt{a^{4}+a+1}$.
Solving, we have
$$
\begin{aligned}
a & =\frac{1}{2} \sqrt{\sqrt{2}+\frac{1}{8}}-\frac{\sqrt{2}}{8} \\
& =\frac{-\sqrt{2}+\sqrt{(\sqrt{2})^{2}-4 \times 4 \times(-\sqrt{2})}}{2 \times 4},
\end{aligned}
$$

Therefore, $u$ is a real root of the quadratic equation
$$
4 x^{2}+\sqrt{2} x-\sqrt{2}=0
$$

Thus, $a$ satisfies $a^{2}=\frac{\sqrt{2}}{4}(1-a)$.
Hence, $a^{4}=\frac{1}{8}(1-a)^{2}$.

Then, $a^{4}+a+1=\frac{1}{8}(a+3)^{2}$.
Given that $a>0$.
Therefore, $a^{2}+\sqrt{a^{4}+a+1}$
$$
\begin{array}{l}
=\frac{\sqrt{2}}{4}(1-a)+\frac{a+3}{2 \sqrt{2}} \\
=\frac{\sqrt{2}}{4}(1-a)+\frac{\sqrt{2}}{4}(a+3)=\sqrt{2} .
\end{array}
$$