Bring a large pot of salted water to a boil. Add the beans and cook until tender, about 3 minutes. Drain and cut into 1-inch lengths.
In a large skillet, toast the mustard and cumin seeds over moderately high heat until fragrant and slightly darkened, about 2 minutes. Transfer to a plate.
Heat the oil in the skillet. Add the onion and cook over moderate heat, stirring occasionally, until golden brown, about 7 minutes. Add the beans, toasted seeds and the cilantro. Season with salt and pepper and serve.