BackgroundLactose malabsorption occurs in around 68% of the world populations, causing lactose intolerance (LI) symptoms such as abdominal pain, bloating and diarrhoea. To alleviate LI, previous studies mainly focused on strengthening intestinal β-galactosidase activity but neglected the inconspicuous colon pH drop caused by gut microbes’ fermentation on non-hydrolysed lactose. The colon pH drop will reduce intestinal β-galactosidase activity and influence the intestinal homeostasis.ResultsHere, we synthesized a tri-stable-switch circuit equipped with high β-galactosidase activity and pH rescue ability. This circuit can switch in functionality between expression of β-galactosidase and expression of l-lactate dehydrogenase in respond to intestinal lactose signal and intestinal pH signal. We confirmed the circuit functionality was efficient using 12-hrs in vitro culture at a range of pH levels, as well as 6-hrs in vivo simulations in mice colon. Moreover, another 21-days mice trial indicated that this circuit can recover lactose-effected gut microbiota of mice to the status (enterotypes) similar to that of mice without lactose intake.ConclusionsTaken together, the tri-stable-switch circuit can serve as a promising prototype for LI symptoms relief, especially by flexibly adapting to environmental variation, stabilizing colon pH and restoring gut microbiota.