LIVORNO, Italy — For years, roboticists have yearned to develop a flexible machine that can explore tight spaces, repair dangerous equipment and potentially even conform to the human body.

Now one of the first members of this new breed of robots is almost here. It has sinewy arms, a powerful grip and the ability to work underwater without coming up for air.

Yes, it is an octopus.

Because octopuses can swim, crawl and manipulate objects, they make “the ideal underwater robot,” said Francesco Giorgio-Serchi, a scientist at the Research Center on Sea Technologies and Marine Robotics here, who is working on the project.

In a small seaside laboratory, he and others have been tinkering away on a prototype of a multiarmed robot they call PoseiDrone for the sea god Poseidon. Pieces of half-built arms are scattered about, and an inflatable kiddie pool sits between tables.