President Obama said Monday that American politicians in an era of partisanship should try to carry themselves more like Edward M. Kennedy, as politicians from both parties lauded the late senator's collegial spirit at the dedication of an institute that bears his name.

The $79 million institute, built next to the John F. Kennedy presidential library on Boston's Columbia Point, envisioned by Kennedy before he was diagnosed with brain cancer in 2008. He died the following year.

Obama said it was appropriate for Kennedy to want "a monument not to himself but to what we the people have the power to do together." He said he hoped the institute could help restore confidence in government at a time of great cynicism, giving a young student a chance to debate in its full-scale replica of the Senate chamber.

"What if our politics, our democracy, were as elevated as he envisions it to be?" Obama said. Instead, he said citizens are cynical about government and disgusted by politicians' trivial pursuits and grandstanding for "cameras instead of colleagues."

"Fear so permeates our politics instead of hope. People fight to get in the Senate only to get afraid," the president told some 1,800 Kennedy friends, family and politicians from both parties gathered for the dedication. He said Kennedy was never afraid to compromise with Republicans, even if it would anger his supporters.

"What if we carried ourselves more like Ted Kennedy?" Obama asked.

Speaker after speaker spoke of Kennedy's outsized influence on the Senate, where he served for 47 years, and held his consensus-building up in contrast to the gridlock that has become the hallmark of the modern Congress.

Arizona Republican Sen. John McCain remembered Kennedy's "zest for political argument" and said they would often laugh together after fighting on the Senate floor. He said the Senate hasn't been the same without him. "That's mostly for reasons unrelated to losing Ted, but I have no doubt the place would be a little more productive and a lot more fun if he were there," McCain said.

"I miss fighting with him to be honest. It's gotten harder to find people who enjoy a good fight as much as Ted did," McCain said to laughter.

Vice President Joe Biden said Kennedy "treated me like a little brother" when Biden first arrived in 1973, helping him land choice committee assignments not generally available to freshmen senators. He said Kennedy introduced him around the Senate and was a master at generating trust and mutual respect.

"All politics is personal," Biden said. "No one in my life understood that better than Ted Kennedy."

Former Senate GOP Leader Trent Lott noted the irony of his inclusion on the institute's board of directors, along with former Senate Democratic Leader Tom Daschle.

"Yes, a Republican from Mississippi," said Lott, to laughter and applause, "is proud to be here today."

Lott said although the two disagreed and had "some fiery discussions," they came together sometimes in a bipartisan way. Lott recalled after he worked with Kennedy on an immigration bill that lost on a procedural vote in 2007, he told him, "Ted, every time I work with you I get in trouble man."

"But just think how different thinks would be now if we passed immigration reform in 2007," he added to applause.

Kennedy's widow, Victoria Kennedy, said her late husband hoped the institute would honor the nearly 2,000 who have served there and inspire future senators. She said he wanted visitors to feel the awe of walking into the chamber.

Guests, including student groups, will be able to role-play as senators and debate some of the major issues of the day. The facility also includes a re-creation of Kennedy's Senate office, virtually unchanged from how it appeared when he died.

"He believed in the majesty of the place and its ability to inspire," she said. She said he wanted visitors to feel "politics is a noble profession, even if it's messy, even if it's hard."