All the old engines in the National Museum of History and Technology were running when the Smithsonian board of regents came to visit the other day. The oldest machine is a Baldwin steam engine built in 1829.

Then the regents themselves, led the chief justice, huffed and puffed to the third-floor "Hall of Musical Instruments" for leg of lamb, rose wine and musical refreshments played on cornets and saxhorns made in New York a century ago. The final offering was Richard Rodgers' "Fools Rush In," sung by baritone Roger G. Kennedy.

Kennedy is the museum's new director.

But he's no fool. In fact, he may be just the right man to turn on the motley machinery of his vast museum and then sing about it.

Kennedy is 54 years old, was graduated from Yale and the University of Minnesota and has worked as NBC Washington correspondent, government official, investment banker, vice president of the Ford Foundation for finance and vice president of the Ford Foundation for art.

"Astonishment turned to admiration," in the words of one Ford Foundation colleague, "as Kennedy moved light-footedly from the stock market to the arts, bringing to the cultural scene in New York and around the land a lively capacity for uncovering talent wherever hidden.

"He could walk down 42nd Street with his mind not on sex but on a daring scheme to build lucrative offices on top of financially needy theaters." The scheme, called "City of 42nd Street," has a 50-50 chance of making it.

An isometric drawing of the 42nd Street project, designed by architect Richard Weinstein, is displayed on the window sill of Kennedy's office in the History and Technology museum. It joins an eclectic collection -- an 1860 reed organ; a photograph of Mr. and Mrs. Alexander Graham Bell; a rendering of an unbuilt cathedral by H. H. Richardson; an original Pogo comic-strip drawing dedicated by Walt Kelly; an original Frank Lloyd Wright ornamental design; a book on regional dialects; books on economic history; more books, more drawings, more gadgets.

The morning of our interview, Kennedy burst in with a big 9-foot-by-4-foot Navaho processional rug on his shoulder and called on everyone in sight to help him find a place to hang it.

He does all this -- the rug hanging, the oddities collecting, urban renewal, investment banking and art funding, song recitals and museum directing -- with laughter, erudition and drama. Best of all, said Charles Blitzer, the > Smithsonian's top administrator for history and the arts, "Kennedy comes from a different world and simply does not know yet what can't be done in Washington."

Kennedy, who was appointed last October without much public notice, is the sixth director in the museum's 15 years of existence. This in itself is symptomatic of the museum's foremost challenge. It seems like a rudderless ship, rolling and tossing in the sea, that keeps throwing off its captain. With a cargo as diverse as first ladies' gowns and old locomotives, it needs new balance and direction.

"At the National Gallery of Art or the Museum of Natural History, everybody knows what it is all about. You are dealing with one discipline, and its various sub-disciplines, and the curators are well-trained in them and have other, similar museums as models," said Peter Marcio, who worked at History and Technology for 10 years and now directs the Corcoran Gallery of Art.

"The Museum of History and Technology is a unique amalgamation of all sorts of specialties. Few of them are traditional academic disciplines. So you tend to get high-minded collectors and antiquarians to run all these diverse shows -- good people but not trained in their field because their special field is not taught. Nor do they have others to talk to or publications to read or get published in. The curators are of a high intellectual level, but hard to pull together," Marcio said.

Kennedy is fully aware of this. His first move was to institute weekly meetings with all his 35 curators, which everyone seems hugely to enjoy. "Yes, he sometimes gets off the springboard," said Margaret Klapthor, curator of history, "but he readily comes down when you have good reasons to bring him down. He listens.

"What boosts morale most," Klapthor said, "is that, rather than summon you upstairs, he walks down from his fifth-floor office to our fourth-floor offices and talks to us and learns. And then he goes across the Mall [to the Smithsonian administration] and makes our case in a big tone of voice."

What with a shortage of staff and the high expense of mounting or changing exhibits in History and Technology, the sheer physical energy, flair and new thought Kennedy is bringing to the museum is not yet apparent to the public.

There is now decent food in the staff dining room. You can have wine for lunch. The china was designed by Frank Lloyd Wright for the Imperial Hotel in Tokyo.

The entrance from the Mall, with that tattered Fort McHenry flag and the Foucault Pendulum, looks less like a gloomy Amtrak terminal since Kennedy moved the information desk to the side. He is working on more changes that may seem sacrilege to some but are sure to make the place more inviting to most.

One of the more frustrating problems Kennedy is wrestling with is that of upper-echelon, curatorial positions for qualified black scholars. "The book says that you must have a curator's experience to get a curator job. But how could a black get museum experience, other than as a guard?" Kennedy said with a trace of anger.

What Kennedy and the Smithsonian hierarchy are primarily engaged in, however, is a thorough review of the museum's exhibition policy, its underlying philosophy, and methods of implementation. New clarity of purpose, greater unity and interrelation between the many isolated displays and collections and, most of all, more dramatic and attractive displays will lure the crowds back again.

History and Technology attendance has declined from 7.1 million a year in 1975 to 4.3 million a year in 1979.

Much of this has to do with the greater attraction of the new Air and Space Museum and the sensation of I. M. Pei's East Building of the National Gallery. They exhaust the tourists, no doubt, before they get to Kennedy's marble shoe box.

On the other hand, many visitors now brave the Mall by subway and the History and Technology museum is closest to the Metro station.

Kennedy, at any rate, seems convinced that clearer focus will give his museum a better opportunity to offer more enlightenment and enjoyment to a larger audience. His aim is to place technology in the service of history, where it belongs, and make and name the institution a "Museum of American History."

That means that it would no longer try to be a science museum and all things to all people. Obsolete and lackluster exhibits will be closed, pruned or given less emphasis.

The first, full-blown demonstration of this new direction is likely to be a major exhibition on George Washington, to open in 1982 on the occasion of the first president's 250th birthday anniversary.

"We thought of a Washington exhibit for the Bicentennial," said history curator Klapthor. "But 1976 was an antiheroic time, so we did 'Nation of Nations' instead. By 1982 we should be ready for heroes again.

"This is not to say that we want to turn the man into a monument. We will try to show him as he was -- vain, ambitious, no great intellectual, but yet a very strong personality and leader."

Kennedy hopes to create exhibitions in his Museum of American History that become a force in the history of America like important events or books (Henry Ford's invention of the assembly line, Harriet Beecher Stowe's "Uncle Tom's Cabin," Rachel Carson's "Silent Spring," or Jane Jacobs' "Death and Life of Great American Cities").

"We want to show how America's historic development is constantly moved along by technological development," he said.

"The George Washington show, or any other show, will thus draw on all the departments and collections of this museum -- musical instruments, fashion, engineering, coins, what have you. We hope to make all of this more relevant to more people."

Its relevance obviously is its hold on the past as a guide to the future.

"The Museum of History and Technology is the most important museum in town," said Peter Marcio. "It has long needed a barker and someone like Kennedy who can give it dramatic interest. It also needs more unity and harmony.

"At the same time, I would hate to have it lose its wonderful, almost chaotic incongruousness."