Democrat Charles S. Robb was sworn in today as Virginia's 64th governor, promising in his inaugural address to cooperate with President Reagan while reserving "the right to disagree honestly and vigorously" if federal budget cutbacks prove too costly and difficult for his state.

Robb, son-in-law of the late President Lyndon B. Johnson, paid homage to the state's political traditions in his address but also spoke out on international and domestic issues, suggesting that he might use the governorship as a steppingstone to national office.

With his wife Lynda and mother-in-law Lady Bird Johnson beaming on the platform behind him, the 42-year-old ex-Marine Corps officer pledged to help Virginia "reclaim the leadership in national affairs she once had."

The new governor, the first Democrat in 16 years to win Virginia's top office, focused on the state's public school system as the major test of his leadership. "The hour has come, the urgency is acute, for us to do whatever we must to reclaim for Virginia national pre-eminence in education," said Robb, who called education "the greatest and most important of our tasks . . . Nothing we do will be more important. No other effort will have as profound and lasting an impact on our future."

In his first day in office, Robb also sounded the theme of fiscal conservatism that he had pledged to honor during his campaign. His first major act as governor was to sign an order placing a three-month hiring freeze on state employes and setting the current level of 73,000 state workers as a ceiling for his four years in office.

"Government must now decide how to do more with less," said Robb, whose order would be even more restrictive than cost-cutting measures imposed by Gov. John N. Dalton, the conservative Republican whose term expired today. In his four years, Dalton held the growth in state employment to 1 percent a year.

Robb repeated his campaign promise to stimulate economic growth without damaging the state's environment. He avoided specifics, but pledged "a fresh, original strategy" that would "build new bridges between government, business and labor, creating a climate of cooperation and a new era of prosperity."

In pledging cooperation with Reagan, who had campaigned vigorously for Robb's GOP opponent, former state Attorney General J. Marshall Coleman, Robb said Virginia was willing to accept the fiscal challenge that federal budget cutbacks would bring, provided the state was given more discretion in managing its own affairs.

Robb was applauded when he said, "To the extent these (Reagan) solutions only seek to relieve the federal government of its financial problems at the expense of the states . . . we reserve the right to differ honestly and vigorously."

Robb said the nation's domestic problems include "a deepening recession, growing unemployment, increasing federal deficits, nagging inflation and a lack of confidence in our economic system." He said, "The federal government is attempting vastly different solutions to these problems. To the extent these solutions both reduce the flow of federal money to the states and relax the grip of federal control and regulation, we stand ready to accept the fiscal challenge and to cooperate with the president."

On foreign events, Robb ridiculed the communist government of Poland as "too inept even to feed its own people," denounced "the rapacious brutality of religious and political fanatics" in Northern Ireland, Italy and the Middle East and bemoaned "the political warfare of terrorism" which resulted in the assassination of Anwar Sadat and the wounding of Pope John Paul II.

Although Robb made clear he wants his voice heard beyond the boundaries of Virginia, he devoted most of his speech to public education within Virginia, promising to restore the state to "national pre-eminence" in a field where its teacher salaries have slipped to near the bottom among the states.

Robb boomed out the oath of office, administered by Virginia Chief Justice Harry L. Carrico, before a shivering crowd on the north lawn of the Capitol. His Democratic running mates, elected in the first Democratic sweep of the state's three top offices since 1965, were also sworn in. Richard J. Davis succeeded Robb as lieutenant governor and Gerald L. Baliles succeeded Coleman as attorney general.

It was a crowd that included political and entertainment celebrities who offered testimony to the star quality and national connections of the new governor. The Johnson contingent included Robb's sister-in-law, Luci Baines Nugent, and former Treasury Secretary Henry Fowler, who escorted Mrs. Johnson.

Also here for the festivities, which include a formal ball tonight, were West Virginia Gov. John D. Rockefeller IV; Sens. Strom Thurmond (R-S.C.) and Jennings Randolph (D-W.Va.); former Miss America Phyllis George, a CBS sports commentator and wife of Kentucky Gov. John Y. Brown.; actress Carol Channing; and Mayor Marion Barry of the District.

Barry was one of a large contingent of blacks on the platform, a presence which Barry noted "probably hasn't happened here before." Although Robb made no mention in his address of the overwhelming support he got from blacks in his election victory, their role appeared to be acknowledged by the participation of blacks in today's ceremonies.

Several of the high school bands which paraded past the reviewing stand represented predominantly black high schools, and in reciting the names of famous Virginians, Robb included that of black educator Booker T. Washington.

Robb's emphasis on education won praise from several Democrats who had been lukewarm about Robb's candidacy. Former Democratic Lt. Gov. Henry E. Howell, Robb's unsuccessful running mate for governor in 1977 who sat out the campaign last year, called Robb's speech "very vibrant," and said its emphasis on education "should be an incentive for the state's schoolteachers."

Former Arlington Del. Ira S. Lechner, a liberal who in the past often has found himself at odds with the new governor, called it "remarkable that he (Robb) concentrated that much on education. It was extraordinary."

His speech was interrupted by applause eight times, three of which came when he talked about education. He pledged to take steps to improve teacher salaries, which currently rank near the bottom third of teacher salaries nationwide. "Unless we accord those who teach . . . the esteem and livelihood they merit," he said, "we cannot hope to attract and retain in this most crucial profession those whose energies and abilities are so vital to the cultivation of our children's minds."

Robb gave no indication of where he would find new funds for schools at a time when the state faces a half-billion dollar loss because of federal cutbacks. "Where he'll get it I don't know," said Fairfax Sen. Richard L. Saslaw, a Democrat. "He shall wheel and deal."

Del. Richard Bagley (D-Hampton), chairman of the key House Appropriations Committee, said he is committed to helping Robb find additional money for schools. "We're going to look very hard at what we've got . . . it's better for us to set a goal and try to meet it, even if we have to phase it in over two or four years, than to continue to simply use a band-aid approach to education."

It was a day of pomp and circumstance, beginning with a prayer service at St. Paul's Episcopal, a pre-Civil War church across the street from the Capitol grounds, and continuing through a parade of marching bands and Virginia National Guardsmen following the swearing-in ceremony. Robb, Davis, Baliles and a select group of legislators wore morning coats, gray gloves and top hats. A 19-gun salute greeted the new governor, who spent more than an hour in the 26-degree weather reviewing the parade that followed his speech.

One of the first groups to pass was the Marine Drum and Bugle Corps from Washington, playing the Marine hymn. Robb, whose expressionless and unemotional demeanor is a personal trademark, stood stiffly at attention, but his lower lip quivered and he appeared moved almost to tears by the performance.

After his speech, Robb was joined at the podium by his wife and their three daughters, who bounced in time to the marching bands as they passed in review. Also on the reviewing stand were Robb's parents, James and Frances Robb, of Charles Town, W. Va., his sister, Trenny, of Vermont, and brothers David of Wisconsin and Wick of California. Mrs. Robb said her son's speech was "good, but a little long."