In a significant relaxation on travel restrictions by a Communist country, Hungary has agreed to abolish visas with neighboring Austria.

The agreement, which is to come into force next January, will complete the transformation of what was once one of Europe's most heavily-guarded frontiers into the most open and relaxed of East-West crossing points. Austrians and Hungarians will be able to cross from one country to another merely by showing their passports, although most other nationals will still need visas.

Less than 20 years ago, the Hungarian side of the frontier was protected by barbed-wire fences, ploughed land, and minefields. Border guards frequently shot people trying to flee illegally to the West via neutral Austria.

The abolition of visas is expected to encourage as many as 1.5 million Austrians to visit Hungary next year for day trips or weekend excursions. At present visas can be obtained at the frontier, but the sometimes lenghty formalities deter many would-be tourists.

It could be also severely test Hungary's already strained facilities for recieving foreign tourists - one reason advanced by Hungarian officials for not lifting the visa requirements earlier. Tourist accommodation is particularly scarce in Budapest, the capital, with some hotel reporting that they are fully booked until October.

The abolition by Hungary earlier this year of mandatory foerign currency exchange regulations (most Soviet bloc countries require foreign tourists to exchange at least $10 per day at official rates) has already boosted border tourism considerably. At weekends the border city of Szombathely is overrun by Austrians seeking a good Gungarian meal or buying up relatively cheap Hungarian meat and salami.

A Hungarian newspaper recently reported that some Australian ever come to Hungary to get a mancure or visit the dentist.

The visa agreement, which still needs to be formally signed by the two governments after its initialling Friday by diplomats, will have less impact on Hungarians wishing to visit Austria. They will still need special permission from their own authorities to travel to the West and this is usually only given once every two or three years.

Even so, Hungary imposes fewer travel restrictions on its citizens than any other Soviet bloc country - a fact recognised by U.S. officials reviewing compliance with the 1975 Helsinki declaration at the recent Belgrade conference.

Package tours abroad have become one of Hungary's biggest-growing industries with a four-fold increase in the number of Hungarians traveling abroad over the last 10 years. Last year some 400,000 Hungarians (out of a total population of 10 million) traveled to the West.

After Hungary, poland is probably the next most liberal Soviet bloc country in allowing foreign travel. At the other end of the spectrum come East Germany, Romania and Czechoslovakia, which very rarely grant permission to their citizens to spend holidays in the West.

Outside the Soviet bloc, Yogoslavs are free to travel abroad as often as they wish and there are hardly any restrictions on foreigners entering the country.

U.S. citizens need visas for all East European countries. But in the case of Yogoslavia and Romania they can be obtained at airports and border crossing points. Bulgaria and Hungary issue transit visas to Western tourists at the border.

Yogoslav officials say they would be prepared reciprocally to abolish visas with the United States altogether but they say that visa requirements maintained at U.S. insistence.