An unprecendented anti-terrorism agreement that would cut off commercial airline service to or from any country that harbors airplane hijackers was agreed on here yesterday by the seven major non-Communist industrial nations.

Although the hastily developed accord raises many unanswered questions and has several potential loopholes the immediate reaction of airline specialists was that the new accord was by far the toughest stand ever taken in this field.

Officials here said it was the first time that such a powerful group of governments - that together virtually dominate commercial air travel and the airports used to connect with international flights - had acted together to try to combat air piracy.

The accord, if it works, would go well beyond various U.N. conventions that condemn hijacking but carry no penalties or binding pledges of action. It would also be in line with longstanding boycott demands of the International Airline Pilots Association.

The agreement among the leaders of Britain, Canada, France, West Germany, Italy, Japan and the United States was announced at the close of a two-day economic summit meeting here.

"The heads of state and government," the brief statement says, "concerned over terrorism and hostage taking, declare that their governments will intensify their common undertaking to fight international terrorism.

"In cases in which a country refuses to extradite or legally prosecute airplane hijackers and/or to give back such airplanes, the heads of state and government are unanimously agreed through their governments to take immediate action to cease all flights to that country.

"At the same time, their governments will implement steps to ban incoming flights from that country as well as flights by airlines of that country flying from any other country."

The signers said they would also urge other governments to join them in this commitment.

The unanswered questions about the accord's effectiveness are technical and political.

How long, for example, will the seven nations wait before they jointly decide that a country has refused to extradite or legally prosecute a hijacker? How will they coordinate their decisions and what happens if a radically oriented country agrees to prosecute hijackers and then gives them a little more than a slap on the wrist?

In addition, the use of the "and/or" terminology raises questions whether the countries would act if the plane is returned even though a country harbors the hijackers.

Politically, there are doubts among diplomats that France, for example, would join in economic action against its former colony Algeria, or that others with oil connections to Libya would take action against that country. These countries along with Iraq and South Yemen, are major targets of the anti-hijack measure, although no countries were named.

Officials here had no immediate answers for the technical questions. U.S. officials told reporters that the leaders at the summit here are expected to go back to their respective governments to figure out what needs to be done to carry out these pledges.

Nevertheless, an experienced European airline specialist said, "Just the fact that these countries have openly identified themselves as intent on doing this is of major importance."

Inclusion of the anti-hijack measure at the economic summit was unexpected. The matter, according to U.S. officials, was first raised informally by Japanese Prime Minister Iakeo Fukuda and then pursued in detail by Canadian Prime Minister Pierre Elliott Trudeau to the point where a document was developed in the course of the short meeting.