6. The general term formula of the sequence $\left\{a_{n}\right\}$ is $a_{n}=\tan n \cdot \tan (n-1)$, and for any positive integer $n$, there is $a_{1}+a_{2}+\cdots+a_{n}=A \tan n+B n$ holds, then $A=$ $\qquad$ ,$B=$ $\qquad$
6. $\frac{1}{\tan 1},-1$
$$
\begin{aligned}
a_{1}+a_{2}+\cdots+a_{n} & =\sum_{k=1}^{n} \tan k \tan (k-1)=\sum_{k=1}^{n}\left(\frac{\tan k-\tan (k-1)}{\tan 1}-1\right) \\
& =\sum_{k=1}^{n} \frac{\tan k}{\tan 1}-\sum_{k=1}^{n-1} \frac{\tan k}{\tan 1}-n=\frac{\tan n}{\tan 1}-n .
\end{aligned}
$$

Thus, $A=\frac{1}{\tan 1}, B=-1$ satisfy the requirements of the problem.