The United States, Japan and the Soviet Union agreed yesterday to improve emergency communications for airliners over the North Pacific, an outgrowth of the shooting down of Korean Air Lines Flight 007 two years ago.

State Department spokesman Bernard Kalb said the three countries had exchanged notes in Tokyo yesterday. "This agreement provides for a new communications network between Anchorage, Tokyo, and Khabarovsk air control centers to coordinate action to assist civil aircraft in emergency situations," Kalb said.

He also said that the agreement "opens the door for discussions on all aspects of our civil aviation relationship, including a resumption of bilateral air service."

The Soviet Union has been eager for Aeroflot, its airline, to resume flights to the United States since they were suspended by President Reagan on Dec. 29, 1981, as partial retaliation for Soviet "repression in Poland."

Pan American World Airways once served Moscow but withdrew voluntarily. It lost money on the route partly because of the difficulty of selling tickets to Soviet citizens. Pan Am spokesman Jeffrey Kreindler said yesterday that "under the right conditions we're very interested" in returning.

The United States has insisted that resumption of service would depend upon improved security for airlines flying the North Pacific. KAL Flight 007 was 310 miles off course when it was shot down by Soviet fighters over Soviet territory on Sept. 1, 1983, killing all 269 people on board.

Kalb said that discussions will begin in Moscow this week to work out technical details of an improved alerting system for straying airliners. Sources said that a direct link would probably be established between controllers in Tokyo and Khabarovsk, who already have some direct communications.

Direct phone links already exist between the U.S. control center in Anchorage and Japanese controllers in Tokyo.