4. The sequence $\left\{x_{n}\right\}$ is defined as follows:
$$
x_{1}=\frac{2}{3}, x_{n+1}=\frac{x_{n}}{2(2 n+1) x_{n}+1}\left(n \in \mathbf{Z}_{+}\right) \text {. }
$$

Then $x_{1}+x_{2}+\cdots+x_{2014}=$
4. $\frac{4028}{4029}$.

By definition, $\frac{1}{x_{n+1}}=2(2 n+1)+\frac{1}{x_{n}}$.
Let $y_{n}=\frac{1}{x_{n}}$.
Thus, $y_{1}=\frac{3}{2}$, and $y_{n+1}-y_{n}=2(2 n+1)$.
$$
\begin{array}{l} 
\text { Hence } y_{n}=\left(y_{n}-y_{n-1}\right)+\left(y_{n-1}-y_{n-2}\right)+\cdots+ \\
\left(y_{2}-y_{1}\right)+y_{1} \\
=2[(2 n-1)+(2 n-3)+\cdots+3]+\frac{3}{2} \\
= 2\left(n^{2}-1\right)+\frac{3}{2}=\frac{1}{2}(2 n+1)(2 n-1), \\
\sum_{i=1}^{2014} x_{i}=\sum_{i=1}^{2014} \frac{1}{y_{i}}=\sum_{i=1}^{2014} \frac{2}{(2 i+1)(2 i-1)} \\
=\sum_{i=1}^{2014}\left(\frac{1}{2 i-1}-\frac{1}{2 i+1}\right) \\
=1-\frac{1}{4029}=\frac{4028}{4029} .
\end{array}
$$