Gastrointestinal agents are classified into different groups based on their mechanism of action. These include acidifying agents, antacids, adsorbents, laxatives, cathartics, purgatives, and protective agents. Acidifying agents like dilute hydrochloric acid are used to increase acid levels in the stomach. Antacids like aluminum hydroxide gel and magnesium hydroxide are used to neutralize excess stomach acid in conditions like hyperacidity. Laxatives, cathartics and purgatives help promote bowel movements and treat constipation.