Disclosed are the ERK inhibitors of formula (1):and the pharmaceutically acceptable salts thereof, wherein: A is a five membered monocyclic heteroaryl ring; and B is a monocyclic heterocycloalkyl ring, or a monocyclic heterocycloalkenyl ring, or a bridged monocyclic heterocycloalkyl ring, or a fused (monocyclic heterocycloalkyl ring)cyclopropyl ring. Also disclosed are methods of treating cancer using the compounds of formula (1).