Castanospermine is a tetrahydroxyindolizidine alkaloid that consists of octahydroindolizine having four hydroxy substituents located at positions 1, 6, 7 and 8 (the 1S,6S,7R,8R,8aR-diastereomer). It has a role as a metabolite, an EC 3.2.1.* (glycosidase) inhibitor, an anti-HIV-1 agent and an anti-inflammatory agent.