The device, which unfolds into a Y-shape after being swallowed, is linked to the outside world via Bluetooth.
Scientists say it could replace jabs and detect infections or allergic reactions.
The robot, made using 3-D printing, is designed to last at least a month before it breaks into smaller pieces and passes through the digestive tract.
The current version is powered by a small silver oxide battery but researchers are exploring the possibility of alternative sources such as an external antenna or stomach acid.
Trials on pigs have already been carried out and tests on humans could begin in two years.
Prof Robert Langer, of Massachusetts Institute of Technology (MIT) in the US, said: “We are excited about this demonstration of 3-D printing and of how ingestible technologies can help people through novel devices.”
The robot, the result of several years’ research along similar lines, is also able to relay temperature information to a phone within arm’s length. Scientists say the patient’s body will stop other mobiles interfering with the signal.