4. If $\triangle A B C$ satisfies $\cot A, \cot B, \cot C$ forming an arithmetic sequence, then the maximum value of $\angle B$ is $\qquad$ .
4. $\frac{\pi}{3}$.

From the problem, we know $2 \cot B = \cot A + \cot C$.
Also, from the trigonometric identity
$\cot A \cdot \cot B + \cot B \cdot \cot C + \cot C \cdot \cot A = 1$,
we get
$$
\begin{array}{l}
\cot B(\cot A + \cot C) + \cot C \cdot \cot A \\
= 2 \cot^2 B + \cot C \cdot \cot A = 1.
\end{array}
$$

Notice that,
$$
\cot A \cdot \cot C \leqslant \frac{(\cot A + \cot C)^2}{4} = \cot^2 B.
$$

Thus, $\cot^2 B \geqslant \frac{1}{3} \Rightarrow \tan^2 B \leqslant 3$.
It is easy to see that $\cot B$ cannot be negative.
Therefore, $\tan B \leqslant \sqrt{3} \Rightarrow \angle B \leqslant \frac{\pi}{3}$.