Reagan administration and congressional sources said yesterday that intensive negotiations have been under way in recent weeks for the release of Soviet dissident Anatoly Scharansky as part of an extensive East-West swap, but officials would not confirm reports that such an exchange is imminent.

Rep. Benjamin A. Gilman (R-N.Y.), who met in Berlin last month with two East Germans believed involved in the arrangements, said, "Some very complicated and sensitive negotiations are under way" but cautioned that it is "premature" to report a deal for Scharansky's release.

"We are hoping and praying for some good news," said Gilman, who met East German leader Erich Honecker and East German attorney Wolfgang Vogel on Jan. 10. Diplomatic sources said confidential discussions about a possible swap had taken place over the past four months in Washington, Moscow, Bonn and East Berlin.

Administration officials, led by Secretary of State George P. Shultz, declined to comment on reports that Scharansky will soon be freed. "We will have no comment period, top to bottom, no comment," White House spokesman Larry Speakes said.

One administration source said part of the "deal," as he put it, involved a pledge by all parties to make no comment until an exchange is consummated. This no-publicity agreement appears to have been the reason why administration officials were concerned -- one said he was "puzzled" -- by a report in the West German newspaper Bild yesterday that agreement has been reached on the swap involving Scharansky and East and West German spies.

The belief inside the administration is that the report to Bild came from Soviet sources, who have used that publication in the past for officially sanctioned leaks. But it remained unclear why Soviet authorities would deliberately generate international speculation about the delicate arrangements at this time.

One official said it is "a possibility" that the public comment could abort the swap.

West German sources reported last October that the United States was seeking the release of Scharansky, a Soviet Jew and computer scientist who has been jailed for more than seven years on espionage charges. At the time the negotiations, which reportedly involved Vogel, also involved the possible release of Nobel Prize-winning physicist Andrei Sakharov.

Hopes ran high that one or both of these dissidents would be released before the Nov. 19-21 summit meeting of President Reagan and Soviet leader Mikhail Gorbachev. Part of the difficulty, officials have indicated since, was that the Soviets refused to consider letting Sakharov leave for the West because of his role in developing the Soviet hydrogen bomb.

Another stumbling block was that the Soviets were discussing the release of Scharansky as part of a swap of spies. This was offensive to the United States, which has consistently said he was never an intelligence agent.

It is not clear how that concern has been eased in the latest negotiations, since the report in the West German paper said 12 West German counterintelligence agents being held in the East as well as several important East German spies being held in the West would be involved in the exchange, along with Scharansky.

Washington speculation about the freeing of Scharansky was further stirred by the departure yesterday of Sen. Edward M. Kennedy (D-Mass.) for Moscow. Kennedy, who has long taken an interest in Jewish emigration and the freeing of dissidents, is expected to meet Gorbachev and other high officials before returning to the United States late this week.

"Kennedy may return with someone," said a source close to the human rights situation. "I don't think he would go to Moscow unless something had been arranged."

Israel radio reported from Jerusalem yesterday that the United States has told Israel through diplomatic channels that Scharansky will be freed in three days as part of an East-West prisoner swap. The report said Scharansky's wife, Avital, will greet her husband in West Germany, possibly at the Glienicke Bridge linking East and West Berlin.

Several hours after the broadcast, it was officially denied by a spokesman for Israeli Prime Minister Shimon Peres, according to the Israeli Embassy in Washington.