Disclosed are the ERK inhibitors of formula (I) and the pharmaceutically acceptable salts thereof. Also disclosed are methods of treating cancer using the compounds of formula (I). This invention also provides a pharmaceutical composition comprising an effective amount of at least one compound of formula (I) and a pharmaceutically acceptable carrier. This invention also provides a pharmaceutical composition comprising an effective amount of at least one compound of formula (I) and an effective amount of at least one other pharmaceutically active ingredient (such as, for example, a chemotherapeutic agent), and a pharmaceutically acceptable carrier. This invention also provides a method of inhibiting ERK (i.e., inhibiting the activity of ERK2) in a patient in need of such treatment comprising administering to said patient an effective amount of at least one compound of formula (I).