6. Let the function $f(x)=\frac{x}{x^{2}+3 x+2}$, point $A_{0}$ represents the origin, point $A_{n}$ has coordinates $(n, f(n))(n \in \mathbf{N}^{*})$, $k_{n}$ represents the slope of the line $A_{0} A_{n}$, and let $S_{n}=k_{1}+k_{2}+\cdots+k_{n}$, then $S_{n}=$ $\qquad$.
6. $\frac{n}{2 n+4}$ Detailed explanation: $k_{n}=\frac{f(n)-0}{n-0}=\frac{1}{n^{2}+3 n+2}=\frac{1}{(n+1)(n+2)}=\frac{1}{n+1}-\frac{1}{n+2}$.
$$
\therefore S_{n}=\frac{1}{2}-\frac{1}{3}+\frac{1}{3}-\frac{1}{4}+\cdots+\frac{1}{n+1}-\frac{1}{n+2}=\frac{1}{2}-\frac{1}{n+2}=\frac{n}{2 n+4} \text {. }
$$