Soap nut
The soap nut comes from the soapnut Tree (Sapindus mukorossi). The trees produce the small black berry, approximately one inch (2-2.5 cm) in diameter, that are deseeded and the shell is dried prior to use.
The shells used for detergent contain something called saponin, which works as a natural surfactant. Surfactants reduce the surface tension of the water, essentially making it wetter and easier to penetrate into soiled fabrics. This combined with the agitation of your machine or hand washing removes the dirt or particles, and then keeps them away from your clothing until rinsing occurs.