The agreement will establish a task group between the three NATO countries to deal with mines that drift into their waters from the war in Ukraine.