Robots may soon be taking over our brains — but not for the reason you think.

Mechanical engineers have developed a snake-like robot to navigate narrow pathways in the body — particularly blood vessels in the brain.

The scientists with the Massachusetts Institute of Technology (MIT) hope the invention, now in the prototype stage, can be used to break up blood clots or treat strokes and aneurysms.

A similar treatment called mechanical thrombectomy has been used for years, in which a metal wire had to be guided manually through vessels, starting all the way down in an artery in the upper thigh. But the treatment isn’t ideal — it requires a surgeon with specialized training, and involves using X-rays to guide the way, which could expose patients to tissue-damaging radiation.

MIT’s robots, detailed in this week’s Science Robotics journal, move instead with the help of magnetism and can be operated remotely, so they wouldn’t require X-rays.

The robot thread is made of a malleable nickel-titanium alloy, covered in a paste filled with tiny magnetic beads and, finally, coated in a smooth polymer to reduce friction in the artery.

The team at MIT successfully tested the device on a scaled-up models of the brain, and plan to continue testing on smaller versions. Eventually, they hope to saddle the bots with drugs or lasers to deliver treatments to fragile, hard-to-reach places in the body.

Study co-author Xuanhe Zhao, an associate professor at MIT, believes they could also help treat neurological emergencies faster and more safely.

“If acute stroke can be treated within the first 90 minutes or so, patients’ survival rates could increase significantly,” said Zhao in a statement. “If we could design a device to reverse blood vessel blockage within this ‘golden hour,’ we could potentially avoid permanent brain damage. That’s our hope.”