In vitro validation of retention and localization of the magnetic living hydrogel. a) Schematic illustration of the magnetic hydrogel movement propelled by intestinal peristalsis without any external magnet. Magnetic field, B. b) Schematic illustration of the magnetic hydrogel retention by the magnetic attraction force. c) Movement of a magnetic hydrogel (radius 10 mm, thickness 1 mm) in a transparent plastic tube (diameter 15 mm) driven by the fluidic flow without any external magnet. d) Retention of a magnetic hydrogel in a transparent plastic tube (diameter 15 mm) for 24 h with an external magnet (radius 25.4 mm, thickness 12.7 mm) placed 15 mm beneath the tube. e) Moving speed of a magnetic hydrogel (radius 1 mm, thickness 1 mm) against different fluidic shear stresses in a tube with dimensions similar to those of mouse intestines, with and without an external magnet (radius 5.6 mm, thickness 1.6 mm) at a vertical distance of 2 mm. f) Moving speed of a magnetic hydrogel (radius 10 mm, thickness 1 mm) against different fluidic shear stresses in a tube with dimensions similar to those of human intestines, with and without an external magnet (radius 25.4 mm, thickness 12.7 mm) at a vertical distance of 15 mm. g-i) Localization and retention of an integrated system consisting of a magnetic hydrogel (radius 10 mm, thickness 1 mm) and a miniature temperature sensor in a silicone phantom mimicking the human intestine, and the integrated system was pinned at the (g) small intestine, (h) ascending colon, and (i) descending colon by an external magnet (radius 25.4 mm, thickness 12.7 mm) placed 15–30 mm above the phantom. Scale bars in (g)-(i): 50 mm. j) Schematic illustration of oral intake of cold water to the GI tract and three locations (g)-(i) where the temperature was probed after water intake. k) Temperature variations after cold water intake measured by a miniature temperature sensor when the integrated system was retained at the three locations in the GI tract.