3. $[a]$ represents the greatest integer not greater than the number $a$. For example
$$
[\sqrt{2}]=1,[-\sqrt{2}]=-2 \text {. }
$$

Then the sum of all roots of the equation $[3 x+1]=2 x-\frac{1}{2}$ is $\qquad$ .
3. -2

Solution: Let $[3 x+1]$ be an integer $t$. According to the definition of $[a]$, we have
$$
0 \leqslant(3 x+1)-t<1 \text {. }
$$

The original equation is $\quad t=2 x-\frac{1}{2}$,
which means $x=\frac{1}{2} t+\frac{1}{4}$. Substituting this into the inequality above, we get
$$
0 \leqslant\left(\frac{3}{2} t+\frac{7}{4}\right)-t<1 \text {. }
$$

Solving this, we get $-\frac{7}{2} \leqslant t<-\frac{3}{2}$.
$\therefore t=-2$ or -3.
When $t=-2$, $x_{1}=-\frac{3}{4}$,
$t=-3$ when, $x_{2}=\frac{-5}{4}$,
$\therefore \quad x_{1}+x_{2}=-\frac{3}{4}+\left(-\frac{5}{4}\right)=-2$.