Cyrus Vance represents many of the best things in America. As secretary of state, he set us all an example of honor and nobility. So it is sad that he has had to resign -- especially in circumstances that make it plain the president was glad to see him go.

To a rare degree, however, Vance was the author of his fate. He framed policies that failed and dealt cards to his enemies. He placed total trust in a president unsteady in his bearings.

The imprint Vance made on events is curiously large. He enunciated no coherent world view, and he surrounded himself with associates who lacked weight in the world, and even in Washington.

But he legitimized the president's instinctive bent for moral righteousness as a guiding principle of American foreign policy. He lent his prestige to an emphasis on collective action through such bodies as the United Nations.

Most of the big foreign-policy events of the Carter administration represent Vance's handiwork. He pushed hard for detente with Russia and the arms control agreement known as SALT II. He laid the groundwork for the Camp David accords between Egypt and Israel. He dedicated himself to reconciliation between the United States and the Third World.

As these developments came on stream, all were duly celebrated. In retrospect they have turned to ashes. The Soviet invasion of Afghanistan has ended any early hope for another arms-control accord. The Egyptian-Israeli peace treaty is reaching a dead end. Relations with the Third World find their symbol in the ghastly display of American corpses by the revolutionary regime in Iran.

Partisans of the former secretary of state blame these unhappy endings on his bureaucratic rivals, notably the special assistant to the president, Zbigniew Brzezinski. As they tell it, Brzezinski delayed SALT II by dirty work on the inside while scaring off the Russians by overzealous courtship of the Chinese. He supposedly queered the Third World connection by exaggerating American setbacks. His ham-handed treatment of Israelis and Arabs is held responsible for killing chances of expanding the Camp David accords.

In fact, hard-line claims made by Brzezinski, or on his behalf, exaggerate his role way out of proportion. If even half of what is said of him is true, he is the most overruled senior White House official in living memory.

For in case after case, long after policies had run into the ground, the president stayed with the Vance approach. Carter hung in there for SALT II despite an unrelenting Soviet military buildup, compounded by truculent Russian behavior on Cuba and assertive moves by Moscow in Vietnam, Yemen, Ethiopia and southern Africa.

Carter and Vance kept moving in tandem on the Middle East despite recurrent failures highly costly in domestic politics. They talked up the Third World connection despite slaps from every quarter -- including even Mexico.

Events growing out of the seizure of the hostages finally forced the breach. Long drawn-out negotiations exposed both the ineffectiveness of mere moral rectitude and the emptiness of collective action at the United Nations, or even through the allies. With attention focused on Iran, it was impossible to gloss over the Soviet invasion of Afghanistan. The behavior of the Iranian regime exposed the true character of Third World politics.

Faced with that debacle, Vance was naked. He had ignored the realities of power politics as played by foreign adversaries and opportunistic colleagues. I do not for one minute believe the charge, made by defenders of Vance, that Carter is a closet cold warrior in the Brzezinski fashion. The record shows that he leaned heavily, perhaps fatally, toward the Vance view of the world.

But the record also shows that the president -- more even than most political leaders -- is what is called an unintegrated personality. He believes in his capacity to mix opposites and to have his cake after eating it. In the past he was repeatedly able to meld elements of Brzezinski with elements of Vance and not pay a price. In the same view, he went with Brzezinski for the Iranian rescue mission. Vance opposed it all the way -- a suggestion the plan was far more risky than suggested by the administration.

Long before, the play of events had begun to make Vance an irrelevant figure. He was starting to slip from sight. Disagreement on the rescue mission afforded him a chance to resign on what is called a matter of principle.

His successor, Sen. Edmund Muskie, is a splendid person and of much sterner political stuff than Vance. He can flick away bureaucratic rivals as if they were flies. He will surely ease the political heat now. But his foreign-policy instincts are those of accommodation, and it is hard to see what he can do in the next few months to redeem the Vance legacy of noble failure.