4. Let $a_{1}, a_{2}, \cdots, a_{n}, \cdots$ satisfy $a_{1}=a_{2}=1, a_{3}=2$, find for any $n \in \mathbf{N}^{*}$, $a_{n} \cdot a_{n+1} \cdot a_{n+2} \cdot a_{n+3}=a_{n}+a_{n+1}+a_{n+2}+a_{n+3}$, then $\sum_{i=1}^{2023} a_{i}=$
$$
\begin{array}{l}
a_{1} \cdot a_{2} \cdot a_{3} \cdot a_{4}=a_{1}+a_{2}+a_{3}+a_{4} \Rightarrow a_{4}=\frac{a_{1}+a_{2}+a_{3}}{a_{1} \cdot a_{2} \cdot a_{3}-1} \Rightarrow a_{5}=\frac{a_{2}+a_{3}+a_{4}}{a_{2} \cdot a_{3} \cdot a_{4}-1} \\
=\frac{a_{2}+a_{3}+\frac{a_{1}+a_{2}+a_{3}}{a_{1} \cdot a_{2} \cdot a_{3}-1}}{a_{2} \cdot a_{3} \cdot \frac{a_{1}+a_{2}+a_{3}}{a_{1} \cdot a_{2} \cdot a_{3}-1}-1}=\frac{\left(a_{2}+a_{3}\right)\left(a_{1} \cdot a_{2} \cdot a_{3}-1\right)+a_{1}+a_{2}+a_{3}}{a_{2} \cdot a_{3}\left(a_{1}+a_{2}+a_{3}\right)-a_{1} \cdot a_{2} \cdot a_{3}+1} \\
=\frac{a_{1} \cdot a_{2} \cdot a_{3}\left(a_{2}+a_{3}\right)+a_{1}}{a_{2} \cdot a_{3}\left(a_{2}+a_{3}\right)+1}=a_{1} \text {, similarly we can prove } a_{n+4}=a_{n}\left(n \in \mathbf{N}^{*}\right) .
\end{array}
$$

Then $a_{1}=a_{2}=1, a_{3}=2, a_{4}=\frac{1+1+2}{1 \cdot 1 \cdot 2-1}=4$, and $2023=4 \times 505+3$,
so $\sum_{i=1}^{2023} a_{i}=505 \times 8+4=4044$.