The technology could reduce the time it takes to detect a pollutant from weeks to just seconds, the scientists said in a statement. It could also aid underwater security, diver monitoring and search and rescue efforts.
Funded by the European Union, the SHOAL Consortium deployed its test robots at the northern Spanish port of Gijon on Tuesday.
The fish -- 5 feet long and costing about $31,600 each -- are designed to swim like real fish and have sensors to pick up pollutants.
They swim independently but coordinate their actions and send data back to a shore station more than a half mile away.
"Chemical sensors fitted to the fish permit real-time, in-situ analysis, rather than the current method of sample collection and dispatch to a shore-based laboratory," Luke Speller, a SHOAL scientist who led the project, said in the statement.
Through artificial intelligence software, the fish can avoid obstacles, map their location and return to base when their eight-hour batteries run low, SHOAL stated.
"Significantly," SHOAL added, "the robotic fish have been developed to blend into the marine environment in such a way that marine life is neither disrupted nor impacted in any negative way by their presence, but carries on naturally."