The present invention relates to a waterless composition and foam as a vehicle in which an active pharmaceutical or cosmetic agent, when added is stable or stabilized by or its destabilization is impeded by the presence of a modulating agent. The pharmaceutical or cosmetic composition and foam, includes: a waterless solvent, a modulating agent and one or more active pharmaceutical or cosmetic agents. The present invention also relates to a method of treatment administering the waterless composition and foam.