Engineers at MIT have developed tiny magnetic robots that could one day be used as biomedical devices inside humans.

The robots, which are about the size of a quarter coin, are made of a novel type of 3D-printer ink, infused with tiny magnetic particles arranged in such a way that when a magnet is passed beneath them, they constrict in a specially-designed pattern.

The engineers have enabled the bots to roll, crawl, jump, and even snap together like a Venus flytrap to grasp a pill and then roll away with it. The robots are unique for their versatility. Others have made similar structures that might stretch or bend, but the researchers say that the complexity of the shapes their robots can take could make them ideal for devices that might someday be inserted into or swallowed by a human.

“What we’ve shown is the potential application in biomedicine,” Yoonho Kim, the project lead and a doctorate student in MIT’s mechanical engineering department, told Quartz. “What if we could make a kind of catheter that can navigate blood vessels in the body; or smart drug delivery capsules which, on demand, could make the pill pop out of the device?”

Because they are 3D-printed, the robots can be rapidly replicated to near-perfect precision, and can assume an array of shapes, depending on the function they need to serve.