Ed Smith, his wife, Kathy, and their three children, Dwayne, Dan and Denice, waited patiently here today for President Reagan, an unexpected bonus on the educational vacation they began planning three years ago at home in Northern California.

They had seen the USS Constitution -- or was it the Constellation, they weren't too sure now it was the Constellation -- in Baltimore and had traveled to Valley Forge. Now they were seeing historical Colonial Williamsburg with a real live president thrown in to boot.

"I don't know how it's going to affect me," said Ed Smith, referring not to the vacation but to the sweeping tax code changes Reagan was here to promote in the land that spawned the Stamp Act protests and other indignities to the British. "We know its supposed to be a big change."

Smith, a 39-year-old traveling salesman, wasn't worried about it, though. Like most of the crowd, he's a Reagan man.

"He's the sexiest old man I've ever seen," one young woman exclaimed to her friends.

"I came all this way; I've got to see him," another tourist said as she edged her way forward in the crowd that had to pass through the metal detectors that are now standard security measures at such events.

So it was in the land of patriots and polyester-clad tourists here today, with Reagan working his magic on a crowd estimated at more than 4,000 persons -- about a third of the total Colonial Williamsburg officials said they could accommodate on the week's notice they were given.

Few in the crowd seemed to know the details of how the Reagan tax plan would affect them, and few seemed to dwell on the subject as they lolled in the sunshine, took pictures of their families, Reagan and the traveling press horde.

"I'm 56 years old and I've never been to a president's speech," volunteered Marcus Cordrey, a local, as he set up a telephoto lens for his camera.

The wide expanse of green space that spread out from the rebuilt House of Burgesses was big enough for school children to romp around the carefully cut lawn and bushes that mark this antiseptic re-creation of a colonial town -- minus the rutted roads and open drainage ditches.

Even the portable toilets -- PeeDee's Potties -- were shrouded in Williamsburg-beige burlap screens lest they detract from the outdoor decor.

It was Reagan's third visit here as president. He celebrated the victory of Colonial Yorktown in 1981 and returned in 1983 to be host of an economic summit of industrialized nations.

There were only a few signs of discontent in this fantasy land of fifes and drums that entertained the crowd before his speech.

The crowd applauded when a ceremonial British flag was replaced by an early American flag -- but then, the good-natured crowd also had applauded earlier when technicians counted backward to test the sound system.

A small group of protesters stood quietly more than a block away, their signs warning of dangers in Central America and South Africa.