The Soviet Union reacted cautiously today to the assassination of Egyptian president Anwar Sadat, sending a courteous but cool message of condolences to Cairo. At the same time, President Leonid Brezhnev indirectly criticized Sadat's policy of "separate deals and capitulation."

The Russians clearly see Sadat's departure as providing new opportunities to reassert Soviet presence in the country they have always regarded as the key to the Middle East. Privately, Soviet officials say they do not expect a sudden shift in Cairo's foreign policy.

"This was an assassination not a coup," one Soviet source said.

Yet the Soviets expect Sadat's successor to continue his policies outwardly while gradually moving away from his strong pro-U.S. positions.

In contrast to the late Egyptian leader, with whom they had a distant and difficult relationship, the Soviets are familiar with his apparent successor, Hosni Mubarak, who spent several years here training to fly heavy bombers and jet aircraft. Mubarak also attended Moscow's elite Frunze military academy.

Informed opinion here is that Sadat's successors will not be able to sustain his policies for a long period. Because of his 1979 Camp David agreements with Israel, Sadat has found himself increasingly isolated in the Arab world as well as in the nonaligned movement which his predecessor, Gamal Abdel Nasser, had helped to found.

For the moment, however, the Russians seems to be watching developments in Egypt closely while reporting with approval comments by militant Arabs denouncing Sadat's "policy of betrayal and alliance with imperialism and Zionism" and expressing the hope that Egypt will rejoin "the Arab family."

The Soviet message of condolences was sent in the name of the Presidium of the Supreme Soviet, of which Brezhnev is chairman. He did not sign the message, however, presumably reflecting Soviet annoyance with Sadat, who expelled Russians from Egypt in 1972 and three weeks ago expelled the Soviet ambassador and six of his staff.

By contrast, Brezhnev sent a warm message to Syrian President Hafez Assad on the occasion of the first anniversary of the Soviet-Syrian friendship treaty.

In his cable, Brezhnev called the treaty "an efficient factor of consolidation" of the "patriotic forces in the Arab world" which "oppose designs of imperialism and Zionism and the policy of separate deals and capitulations." This was a reference to the Camp David peace process. Syria has been a major leader in the so-called rejectionist camp opposed to the Camp David process.