The Reagan administration, reversing the policy of the Carter administration, has given Egypt assurances of a U.S. military umbrella against the Soviet Union in case of an Egyptian attack on Libya.

Official sources described the assurances as falling short of encouragement to Egypt to attack its radical and nettlesome neighbor, an action that many American as well as Egyptian military commanders view as risky and perhaps impractical in current circumstances.

The sources emphasized that no such military clash is on the horizon.

There is no doubt, nonetheless, that the changed U.S. posture toward an Egyptian-Libyan war is a significant factor in the political and military equation as policymaking intensifies both here and abroad to counter the regime of Col. Muammar Qaddafi.

The secret U.S. commitment, which was given in definitive form to Egypt's then-vice president Hosni Mubarak the weekend before the assassination of President Anwar Sadat a month ago, is said to be similar to a commitment secretly provided Sadat by the Ford administration in the fall of 1976.

The Carter administration withdrew the Ford assurance of a superpower umbrella early in 1977, however. Officials of the Carter White House said the action was taken out of concern that such an open-ended commitment would give too much latitude and encouragement to Sadat, while reserving for Washington too little control over a potentially serious confrontation with the Soviets.

The Reagan administration's decision to renew the U.S. umbrella for an Egypt-Libya clash arose from broad and still incomplete policymaking about Qaddafi that has taken place intermittently since early this year.

Secretary of State Alexander M. Haig Jr. has publicly condemned Qaddafi as a leading sponsor of "international terrorism" and called for coordinated international action to deal with him. Privately, Haig was saying as early as last spring that Qaddafi resembles "a cancer" that may have to be cut out rather than cured through gentler methods.

The specific action to be taken has been affected by the surprise Libyan decision last week to order an immediate pullout of its 7,000 troops from the African nation of Chad.

Senior administration officials are wary of Qaddafi's sudden withdrawal, fearing he may be leaving troublemakers behind or that he fashioned some other booby trap to bring back the Libyan forces.

While the Reagan administration trains its attention on the Chad pullout, which would appear to ease the Libyan military pressure on neighboring Sudan, there is little likelihood of a final decision on elements of the anti-Qaddafi program.

One proposal is for a major policy statement detailing Libyan troublemaking in the Middle East, Africa and other parts of the world, perhaps in a speech by Haig or some other high official, including a strong condemnation of Qaddafi's activities.

Those opposing the proposal argue that a higher level of rhetoric, while popular at home, would only increase Qaddafi's already overblown stature in some parts of the world and underscore Washington's inability to do anything effective about the menace.

Also under consideration is a range of oil-related decisions, from a unilateral U.S. boycott of Libyan petroleum to a ban on spare parts for American-owned oil installations in Libya.

Growing political pressure to cut off the constant flow of American dollars, a major source of Libya's strength, was dramatized Oct. 21 when the Senate, voting 47 to 44, turned aside a measure to ban U.S. imports of Libyan crude oil and adopted instead a six-month administration study of "concrete steps" to counter Qaddafi.

The glut in the international oil market is reducing the dimensions of the problem without U.S. governmental action. U.S. imports of Libyan oil have dropped from the 650,000 barrel-a-day level of April, 1981, to a current level of about 200,000 barrels daily. This means instead of spending $26 million a day for the high-priced, high-quality Libyan crude, the United States is now spending about $7.6 million daily.

Related to the oil decisions is another range of unresolved proposals regarding the continued presence in Libya of about 2,000 Americans, mostly oil workers and their families, who could be harmed or taken hostage in event of U.S. action against Qaddafi. The risks to these Americans, officials of both the Carter and Reagan administrations said, has been a major consideration in the decision-making about Libya the past several years.

The State Department has issued several travel advisories against trips to or residence in Libya, but American companies have declined to withdraw employes. Officials said the administration legally could take stronger action to induce nearly all Americans to leave if this policy is adopted.

The extraordinary political, paramilitary and military activism of Qaddafi's Libya, a nation of only 2 million people, is made possible by generous deposits of petroleum beneath the vast expanse of Libyan sands.

Even after the oil wealth began to change the dimensions of Libyan power after the four-fold price increase of 1973, the United States and most other nations were inclined to view Qaddafi more as an eccentric nuisance than a serious threat.

Washington officials have compiled such a long list of troubles in which Qaddafi is said to be involved that its recitation can be numbing.

A State Department document circulating last week, for example, called Libya "the most prominent of all patron-state supporters of international terrorism," and charged "there has been a clear and consistent pattern of Libyan aid to almost every international terrorist group, from the Provisional Irish Republican Army (IRA) to the Popular Front for the Liberation of Palestine," among the most violent factions of the Palestine Liberation Organization.

A few of the far-flung operations under Libyan control have involved Americans, and these more than any other have attracted high-level Washington attention.

According to a former National Security Council official, the U.S. government had authoritative information early in 1977 that Qaddafi had assigned a "hit team" to assassinate U.S. Ambassador to Egypt Hermann Eilts.

The official said President Carter called Eilts home temporarily for security reasons, and sent a message to Qaddafi warning him to call off the assassins. The Libyan leader complied, but only after demanding a detailed account of the American allegations.

Only a few weeks ago, intelligence information that Qaddafi had ordered the assassination of U.S. Ambassador to Italy Maxwell Rabb figured in the decision to call Rabb home during the debate over the sale of radar planes to Saudi Arabia, according to widespread reports.

Since then, intelligence reports of remarks by Qaddafi have generated concern about Libyan terrorist attacks on U.S. diplomats in London, Paris and Vienna as well as Rome. American officials said they have no choice but to take Qaddafi's musings seriously in view of his record of sponsoring violence.

The current Washington policymaking about ways to thwart Qaddafi began with an interagency study by the Carter administration late last year, apparently touched off by the attempted assassination on Oct. 14, 1980, of a Libyan dissident in Fort Collins, Colo., allegedly at the hands of a Qaddafi agent.

For all the other Libyan activities around the world, the boldness of a shooting in the American heartland was the final straw for Washington officialdom.

The first interagency study by the Reagan administration early this year was a continuation of the Libya policy review, according to official sources. Out of this round of policymaking came, among other things, the decision in May to close the Libyan People's Bureau, in effect its Washington embassy, and to order a new warning to Americans against traveling or residing in Libya.

Also discussed last spring were intensified efforts to deny Libya the nuclear capability that Qaddafi long has been seeking, especially from western European countries. Another line of policy was the building of coalitions including Middle East, African and European countries to oppose Qaddafi's activities.

The most muscular thing to come out of last spring's anti-Libya planning was the decision to mount a new U.S. military exercise in the Gulf of Sidra, the Mediterranean waters just north of the Libyan coast, which Qaddafi claims as Libya's.

U.S. forces had conducted military exercises there three times since 1978, but an exercise planned there in September, 1980, had been called off by Carter out of concern for an incident that could complicate the return of the American hostages in Iran and appear to be a bellicose move on the eve of the U.S. presidential election.

The shooting down of two Libyan fighter planes by U.S. jets during the Gulf of Sidra exercise this August raised tensions between Washington and Tripoli. In the wake of the military action, consideration of further steps was deferred.

It was the assassination of Sadat, more than any factor, which brought the Libya problem back to the forefront of policymaking in Washington, according to official sources. The fate of the two men, once friends and later bitter enemies, had long been intertwined in Washington thinking.

Sadat's original plea to Washington for a military umbrella followed an Aug. 15, 1976, time-bomb explosion in an Alexandria, Egypt, train that killed eight people and was blamed on Libyan agents. Sadat, whose relations with Qaddafi had worsened drastically that year, vowed publicly after the explosion not to let Qaddafi "escape from my hands for his crime."

The Egyptian leader let Washington know he was considering an invasion of Libya to oust Quaddafi, but was concerned that the Soviet fleet in the Mediterranean could interdict his forces on their long and exposed trek over the Libyan desert.

He asked for, and obtained, Ford adminstration assurances that the Soviet Union would not be permitted to intervene, according to officials of that administration.

The Carter reversal of which Sadat was informed early in 1977 arose from two factors, according to officials who were in the White House. One was concern that unless such an invasion were immediately successful, which was considered doubtful, the effect would be to bring the Soviet Union into Libya in much greater force to undergird Qaddafi.

The other was concern that Sadat would think he had carte blanche to take any action he desired in the belief that Washington would support him against Moscow. Such an open-ended commitment, in the view of the Carter White House, was unwise.

The Reagan administration's assurances to Mubarak in Washington meetings on Oct. 2-3 were in the context of Sadat's concern about a possible Libyan invasion of the Sudan. According to informed sources, Mubarak made it clear that in such a case Egypt would not just send troops to the Sudan, its southern neighbor, but would also "go after Libya" militarily.

In the opinion of senior U.S. officials, the Egyptian forces in the western desert near Libya were insufficient to take on Qaddafi with confidence of quick success.

As in the past, concern about the consequences of failure precluded any encouragement to the Egyptians. But Sadat was also told, in the meetings here just before his death, that if the battle should come, the United States would deter the Soviet Union from intervening.