The way patients receive drug and cell therapy could change drastically thanks to the invention of a tiny box by Johns Hopkins University engineers.

Researchers there have devised cube-shaped containers smaller than specks of dust that could be inserted into the human body. The cubes are metal and coated with gold, which makes it possible for doctors to track and move the devices via magnetic resonance imaging, says David H. Gracias, assistant professor of biomolecular and chemical engineering and the leader of the lab team.

“What makes this technology unique is that it is metal instead of plastic,” Mr. Gracias says. “There are others working on this technology, but doing it with plastic. With metal, it can be controlled from the outside.”

The three-dimensional shape also is promising. The cubes are able to dispense medication or cell therapy from all sides. The cubes can be injected by a syringe directly into tissues, Mr. Gracias says.

“We’re talking about a new encapsulation and delivery device that could lead to a new generation of smart pills,” Mr. Gracias says. He says the long-term goal is to be able to implant a collection of the therapeutic containers directly at the site of an injury or illness.

This kind of nanotechnology is crucial to the future of medicine, says Ray Kurzweil, a futurist, inventor and author. Mr. Kurzweil has long been predicting that by 2030, tiny robots implanted in the body will be able to reverse the aging process by rejuvenating cells from within the body.

Mr. Kurzweil says the use of gold makes the Hopkins project stand out. The challenge for the teams of scientists everywhere that are working on similar technology is to “deliver the medicines to the right tissue.”

“You need more than just a container,” he says. “The containers have to go to the right place.”

In his recent book, “Fantastic Voyage: Live Long Enough to Live Forever,” Mr. Kurzweil says that in 20 or 30 years, science and nanotechnology will be developed enough to keep the human body healthy from the inside.

“We don’t understand all about the body, but we are making exponential progress,” he says. “We only mapped the genome two years ago. We will have the principles of biology in a few years to reprogram biology and repair what goes wrong.”

Mr. Gracias says the microcontainers developed in his lab someday could incorporate electronic components that would allow the cubes to act as biosensors within the body or to release medication in response to a remote-control radio signal.

One area where Mr. Gracias envisions the cubes making an impact is in patients with diabetes; the cubes could aid in insulin release. Another area is in treating epileptic seizures. Medication could be released on demand in an epileptic who was having a seizure.

To make the cubes, the Hopkins scientists produced six connected squares in the shape of a cross and etched small openings into each panel. The edges of each panel were soldered to make hinges. When the flat shapes were heated in a solution, the hinges melted. High surface tension in the solution then pulled the device into a cube shape. When the solution cooled, the hinges hardened again, and the device stayed in its boxlike shape.

“The self-assembly technique allows us to make a large number at a time — and at a relatively low cost,” Mr. Gracias says.

The cubes have not been tested on humans or animals yet, but lab tests have shown how they might work in medical uses.

Researchers used micropipettes to insert the cubes in a suspension containing microbeads that are used in cell therapy. Tests showed the beads could be released from the cubes using agitation. Researchers also inserted human cells into the cubes. Tests showed that the cells remained alive in the cubes and could be released easily.