This is a community where politics is dominated by the bitterest of conflicts.

The city has a history of battles between town (the Irish, Italians and blacks) and gown (Harvard), and reformers and the "old guard." Over the past 40 years, the reformers have changed.

They used to be an alliance of Yankees and the propertied establishment that opposed property taxes, who attempted in the 1940s to mandate politics out of government. Now they are liberals using local government as a forum for a host of issues ranging from rent control to Third World policies.

By contrast, the old guard is made up of the ward politicians, who prefer to see well enough left alone, and much of the city's working class in North and East Cambridge who are suspicious of liberal experimentation. In recent years, they have been joined by landlords and many small businessmen.

But for some, it is a city with a capacity for loyalty and gentle judgment salted with political pragmatism.

"Tip is my friend. We have been friends for 25 years," John Kenneth Galbraith, the patrician economist emeritus of Harvard, says of House Speaker Thomas P. (Tip) O'Neill Jr. "Tip has given good solid expression to the basic traditions of the Democratic Party," says Galbraith, well-known for his ties to the "gown" of Cambridge.

For Walter J. Sullivan, who is maintaining the tradition of there being a Sullivan on the Cambridge City Council for the past 47 years, O'Neill is a man he started voting for in 1951 and has not stopped voting for since. A product of precincts to the south of Putnam Square, where success is moving out of a triple-decker apartment, Sullivan is almost at a loss for words when asked his feelings toward O'Neill:

"What can I say, he's done a great job. We're all fighting the same cause: to bring money to the city of Cambridge."

For Tip O'Neill, the past year in Washington has been a series of defeats, questioned leadership and suggestions that he has lost the ability to keep his finger on the pulse of the House, the essential element of influence, if not power.

There were times when O'Neill appeared lost during the Reagan offensive last year. At his daily, pre-session press conferences, O'Neill's grasp on the tax-cut numbers sometimes appeared to waver.

In contrast to his adversaries--not only budget director David A. Stockman but House Minority Leader Robert H. Michel (R-Ill.)--O'Neill never mastered the surface, much less the detail, of either the administration's budget and tax cuts or the counterproposals offered by his own Democratic-controlled committees.

At one key juncture, when Democrats had been struggling to line up votes for their version of the budget resolution, O'Neill took a junket to Australia and returned to find the battle lost in his absence.

Here, however, with only a few exceptions, Tip O'Neill is still The Speaker. The two words are spoken with a reverence to perceived power combined with deep affection for a North Cambridge pol who made it to the top.

"Here in Boston, he's a local legend," says John Marttila, a campaign consultant. "He's a friendly bear of a man who people think they can go up to and talk to. And he has been receiving very favorable local press coverage."

Not everyone in Cambridge, however, sings the praises of O'Neill. Bob Kuttner, editor of Working Papers, a liberal magazine published here, contends that the Democratic "alternative" budget and tax bills amounted to a program of "Reaganism with a human face."

Kuttner argued that the Democratic tax bill, which matched or bettered every special interest benefit proposed by the GOP, was a "metaphor of the way they approached being an opposition party . . . O'Neill is not doing a very good job."

On a different tack, Daniel Bell, professor of sociology at Harvard, active in Democratic Party policy work and a major figure in neo-conservative circles, believes that O'Neill and his staff did not demonstrate the intellectual ability to take on what Bell considers to be the fundamental contradictions in the Reagan program.

Citing the conflicts between a tight monetary policy, a huge tax cut, sharp defense increases and cutbacks in social programs, Bell said Reaganism amounts to an economic "two-headed monster pulling in two different directions." O'Neill, Bell said, has not demonstrated "he is concerned with that kind of problem," although Bell said the speaker has shown a capacity to present the "heart" of Democratic thinking.

Although the speaker is extremely uncomfortable on national television, Marttila noted that in the Boston area O'Neill's appearances on local television are in the comfortable role of national leader of the Democratic Party returning to his birthplace. "He is part of the landscape," Marttila noted, adding that "he's always been very nice to me."

In a reflection of the intensity of Massachusetts Democratic politics, Marttila has adopted a policy of not taking on any clients from within the state because the aftermath of personal vindictiveness from all sides is not worth it.

In this atmosphere, O'Neill has carefully avoided stepping into the thicket of local politics.

In Cambridge, he has maintained solid ties to the two key factions, the conservative Independents, and the Cambridge Civic Association. The CCA, once the bastion of Protestants attempting to restrict the political shenanigans of the Irish and Italians, is now the bastion of tenants' rights and anti-nuclear war strategies.

"He's obviously lost during the last year in Congress , but in general he's done the right kind of job," said Councilman David Sullivan, who describes himself as "one of the two or three most left politicians in the city . . . . I regard myself as an active member of the left wing of the Democratic Party."

Sullivan said he recently went to O'Neill to talk about nuclear arms control and was told by the speaker he was "one of the first people who ever talked to him about it. He was very receptive."

In the strange amalgam of communities in O'Neill's congressional district outside Cambridge--East Boston, Allston, Somerville, Watertown, Beacon Hill, Charlestown, Brighton, Belmont--there is some quiet grumbling that he makes few personal visits, but little questioning of the willingness of the speaker and his staff to look after local problems.

"As mayor, I have to take care of the people of my city. Reagan is concerned about fraud and if there is fraud, it must be eliminated, but there are people who need programs," Eugene C. Brune of Somerville said. "We call him O'Neill from time to time."

State Rep. Gus Serra of East Boston said, "O'Neill has been perceived nationally as a somewhat liberal Democrat, but what he is saying is going to be shown to be true in the long run."

In his duels with President Reagan, O'Neill is recognized here as the beneficiary of an economy that has not only failed to respond with the vitality the administration predicted, but has gone further into recession.

Harry Spence, chief of the Boston Housing Authority, said O'Neill's early assessment of the Reagan program as a policy benefiting the rich at the expense of the poor has been borne out by the results and "vindicated by Stockman." He was referring to the skeptical comments about the Reagan program by budget director Stockman in Atlantic magazine.

But for all the generally congratulatory tone, politicians here, as in Washington, privately speculate that O'Neill, who will turn 70 next Dec. 9, will either chose not to seek reelection or win reelection and then retire.

This second option would give his son, Thomas, who is running for governor, a shot at taking over the congressional seat if he should lose. O'Neill, however, has consistently denied any such intention.