The band played "Camelot," fireworks flared and nostalgia reigned supreme last night as 450 faithful raised their champagne glasses to the memory of John F. Kennedy.

Jacqueline Kennedy Onassis, who wore a forest-green velvet blazer and a black calf-length skirt, arrived at the new John F. Kennedy Library here with her son John. They strode arm in arm through the library foyer, greeting old friends and former aides. Sen. Edward M. Kennedy (D-Mass.) arrived a little later with his wife, Joan, and their three children, activating the usual flashbulbs. A mammoth, brightly lit American flag visible from at least a mile away hung from the library ceiling.

The guests dined in the exhibition hall, surrounded by JFK memorabilia. Dave Powers, the library curator, joked to some of the guests that he had raided Rose Kennedy's attic so often that he thought he was winterizing it.

The dinner was a prelude to today's dedication of the library.For almost everybody it was a trip in nostalgia. And for many watching the film documentary of the late president's life, it was difficult to hold back the tears. The film traced Kennedy's life from his childhood through his political career.

"It was absolutely beautiful to me -- I lived through the whole era from the first day he was elected to office to the day he died," said Speaker of the House Thomas P. (Tip) O'Neill. "I had a tear in my eye, a lump in my throat.I really loved Jack Kennedy."

It was a tribute echoed and re-echoed as names and faces from the New Frontier emerged from the spectacular building that architect I. M. Pei conceived at the request of the Kennedy family as a permanent monument to John Kennedy's presidency.

"It was very emotional," said Pamela Harriman, wife of the former ambassador. "People were very quiet because for people to suddenly see it on film, it seemed so far away. I think of it as only yesterweek. Can we be so old?"

"It was very moving," said Ethel Kennedy as she left the party with George Stevens, director of the American Film Institute. "And it was great for all the children to see."

Among the other guests were Lady Bird Johnson with Liz Carpenter, actress Angie Dickinson wearing scarlet evening pants and a matching streamer in her straight blond hair, former JFK aides McGeorge Bundy and Lawrence O'Brien, former HEW secretary Joseph Califano, columnist Art Buchwald, Sens. Henry Jackson (D-Wash.) and Abraham Ribicoff (D-Conn.) and former senator John Tunney.

The only speech of the evening wasn't really a speech but a toast given by Ted Kennedy. Guests raised glasses engraved "J.f.k. oCtober 19, 1979" as Kennedy spoke of family and friends who were not present. Foremost in his tribute were his parents Rose and the late Joe Kennedy, whom he said were "very much involved in the life of this great city and state and party."

When Kennedy finished, Peter Dycrin and his band struck up "Happy Days Are Here Again." Outside the library dozens of workers scampered around until well past midnight preparing the chrysanthemums and greenery that will flank the stage at today's ceremony.

"They just got me out of bed," said John Folco, who was reinforcing the scaffolding on the stage."I worked all day. I got home late and I was sound asleep by 10:15, then the phone rang."

Folco and the others could see their breath as they worked in 45-degree weather. But the air smelled good, spiced with the scent from the pine, the yellow mums and the salt breeze from the bay. A New England mist hung over everything.

Earlier the Grucci family, who shot off the fireworks, had posed for pictures in front of the library. After the snapshots, they said they were a little perturbed.

"We were going to have a big fireworks display of JFK's face on the front lawn," said Felix Grucci. "We brought it all the way from New York and then somebody scratched it at the last minute. It cost us a fortune to do it." $ but obviously delighted with the way the evening had gone was former HEW secretary Wilbur Cohen, who grabbed his wife and started dancing in the lobby while others were leaving. He said he hadn't thought about any rebirth of Camelot, "but it's rebirth of Teddy Kennedy for president."

Meanwhile, the irresponsible generation of Kennedy and Shrivers clustered around outside trying to decide what to do for a little night life after the big party.