if we're talking about Agent Stone, then lemme tell you what he was doing: in the first movie, there really wasn't much he could do other then say modern things to everyone else that couldn't understand the doctor's big words and make a latte with steamed austrian goat milk
however in the second movie he was a lot more active, since we see him waiting for the doctor in the coffee shop, turn said shop INTO a supercomputer for Robotnik, stayed behind to keep things under control, joined the doctor inside of the Eggmech, used the mustache of said mech to destroy Tails' plane, and survived the whole crash disguised as one of the agents, suggesting that (if Jim Carrey doesn't return) he's gonna be working with Shadow in the third film
and what did luigi do? get his ass caught at the start of the movie, stop Bowser's fire using a sewer lid, and used the super star to help his brother
luigi might as well have been left out of the movie because there was NOT enough of him at all