Amid some tears, some smiles and a great deal of nonpartisan conviviality, President Reagan and John F. Kennedy's family joined together last night to help raise $8 million for the late president's memorial library. It was an evening when emotions ran as high as the expectations that prompted it.

In a tribute to the slain president, as his widow Jacqueline and their children, Caroline and John, looked contemplative and somber, an almost poetic Reagan praised Kennedy as a man who "seemed to grasp from the beginning that life is one fast-moving train, and you have to jump aboard and hold on to your hat and relish the sweep of the wind as it rushes by."

Seated beneath a white tent on the grounds of Sen. Edward M. Kennedy's McLean home, the Kennedys seemed almost caught up in a spell being woven by Reagan, the veteran Hollywood trouper and storyteller, rather than by Reagan, the president.

Talking about the White House, he said, "Nothing is ever lost in that great house; some music plays on.

"I have been told that late at night when the clouds are still and the moon is high, you can just about hear the sound of certain memories brushing by," said Reagan, pacing his lines and emphasis. "You can almost hear, if you listen close, the whir of a wheelchair rolling by and the sound of a voice calling out, 'And another thing, Eleanor!'

"Turn down a hall," the president continued, "and you hear the brisk strut of a fellow saying, 'Bully! Absolutely ripping!' Walk softly now and you're drawn to the soft notes of a piano and a brilliant gathering in the East Room, where a crowd surrounds a bright young president who is full of hope and laughter."

Seated on the platform behind Reagan and never taking her eyes off his back as he spoke was the regal, extremely slender Jacqueline Onassis, wearing a midnight blue dress belted in shocking pink. Once or twice, John Kennedy Jr., seated between Ethel Kennedy and his cousin, Kathleen Townsend, leaned forward to look at his mother. His sister, Caroline Kennedy, like Townsend one of the speakers, sat next to Nancy Reagan, who wore a white dress with black dots and banding.

Both Nancy Reagan and Jacqueline Onassis broke into smiles when Reagan tempered his praise of President Kennedy by saying he hadn't voted for him.

"I was for the other fellow," he said, referring to Richard M. Nixon. "But you know, it's true: when the battle's over and the ground is cooled, well it's then that you see the opposing general's valor. Kennedy would have understood. He was fiercely, happily partisan, and his political fights were tough -- no quarter asked and none given. But he gave as good as he got, and you could see that he loved the battle."

Sen. Kennedy, in turn, praised Reagan, saying he "restored the presidency as a vigorous, purposeful instrument of national leadership on issues. I suspect the two of you would not have always agreed, but I know he would have admired the strength of your commitment and your capacity to move the nation."

Kennedy told Reagan that he had "reminded us anew of the enduring truth that we are Americans first and only then are we Democrats or Republicans." He said he had thought of the president often during the TWA hijacking-hostage crisis.

At the party as Kennedy's special guest was Arthur Targontsidis, 18, of Brockton, Mass., one of three hostages released in Beirut last week.

"The senator had been talking to Arthur's family since the day he was taken captive and he came to feel like he knew the family well," Bob Mann, Kennedy's press secretary, told reporters.

Targontsidis, wearing what appeared to be a new suit and admitting that he felt "a little nervous, I mean, about being here," said he had been "very honored to meet the president though we really weren't formally introduced. We did not exchange words."

Reagan's 15-car motorcade wound in and out of homeward-bound commuter traffic to arrive at Kennedy's home overlooking the Potomac about 7:15 p.m. It was his and Mrs. Reagan's first visit and they were met by Kennedy, a frequent critic of Reagan, in what Mann described as an "extremely gracious" atmosphere in which both showed "genuine respect and affection for one another."

Reagan was caught by surprise when Kennedy gave him a brass eagle statue that used to sit on John Kennedy's desk in the Oval Office. "I believe he would very much have wanted you to have it," the Massachusetts senator said.

Two dozen Kennedys including John Kennedy's sisters, Eunice Shriver, Pat Lawford and Jean Smith, were strategically scattered among the guests, some of whom reportedly paid as much as $25,000 and came from around the country. In the tent, pitched near the tennis courts, everybody dined on salmon named after French fashion designer Hubert de Givenchy (one of Jackie Onassis' favorite designers when she was first lady), veal in cream sauce and pears with chocolate sauce. According to one report, Givenchy became the salmon's namesake when he once ate in the now-defunct Bagatelle, sister restaurant of La Colline, which catered last night's meal.

The late Robert F. Kennedy's son Chris sat beside Massachusettt's junior senator, John Kerry. And Chris' table-hopping brother, Joseph Kennedy, told reporters that inviting Reagan to give the evening's keynote was "good to show a little bipartisan support. You know, what the heck, it's the spirit of a little patriotism . . ."

Jacqueline Onassis' dinner companions were House Speaker Thomas P. (Tip) O'Neill (D-Mass.) and her frequent escort, New York businessman Maurice Tempelsman. Across from her sat Occidental Oil chairman Armand Hammer.

At Ted Kennedy's table were Targontsidis, MCA's Lew Wasserman and 20th Century-Fox's Marvin Davis. Caroline Kennedy's dinner companions included Rep. Silvio Conte (R-Mass.) Seated elsewhere was her current beau, Ed Schlossberg. As a vice chairman of the John F. Kennedy Memorial Library Foundation, it fell to Caroline to get the evening rolling.

"Welcome," she said, "I'm Caroline" and as some of the guests moved restlessly to take their seats, she gave a nervous little laugh and added, "Oh, yeah, sit down."

She and her brother personally visited Reagan at the White House several months ago asking him to lend his support in raising money for the foundation's $8 million endowment drive. So far, $5.25 million has been raised.

Of their visit, Reagan said it was obvious that they cared about their father and his memory. "But I was also struck by how much they care about history. They felt strongly that all of us must take care to preserve it, protect it and hand it down for future sailors on the sea of scholarship."

Said Caroline last night: "The library is for people who want to learn more about my father and my uncle, but it also seeks, as they did, to inspire people to participate in the political process and to show them the joy and satisfaction public service can bring."

Reagan called it "the only presidential library without a full endowment" and foundation officials think that, as much as anything, may have attracted Reagan's interest.

"In recent times there has been a living ex-president to raise money for his own library," said Mark Roosevelt, a great-grandson of Theodore Roosevelt and manager of the JFK Memorial Library Foundation. "But in this case, there is none."