We develop a systematic procedure for constructing quantum many-body proble
ms whose spectrum can be partially or totally computed by purely algebraic
means. The exactly solvable models include rational and hyperbolic potentia
ls related to root systems, in some cases with an additional external field
. The quasi-exactly solvable models can be considered as deformations of th
e previous ones which share their algebraic character.