I found A question similar to this, but the answer wasn't clear to me and I'm not supposed to ask for further clarification in the answer section.

Let $L$ a semi simple local system defined over an algebraic variety. I have seen the following decomposition

$$L \cong \bigoplus_\rho \rho\otimes L_\rho$$

where $\rho$ runs over a set of representatives of the set of irreducible representations of the endomorphism algebra, and $L_\rho=Hom(\rho,L)$.

I have several doubts concerning this decomposition. For example, I think $\rho$ should be consider in this case as a local system, (because $L$ is one) but then the sum should be done over the set of irreducible representations of the fundamental group of the variety. I'm not quite sure what $Hom(\rho,L)$ means either (Is it the functor $U\mapsto Homp(\rho_{|U},L_{|U})$ where again we see $\rho$ as a local system). I don't understand either how to build the isomorphism. I hope someone can give a hand. A good reference would be great. Thank you very much.