Dopamine agonists are a class of medications that mimic the action of dopamine, a neurotransmitter in the brain. They primarily work by stimulating dopamine receptors, which can inhibit the release of prolactin, a hormone produced by the pituitary gland.