President Carter has asked Speaker of the House Thomas P. (Tip) O'Neill (D-Mass.), a longtime friend and ally of Sen. Edward M. Kennedy (D-Mass.), to serve as permanent chairman of next August's Democratic National Convention, informed sources said yesterday.

O'Neill accepted the bid from Carter in a conversation during Wednesday night's World Series game in Baltimore, aides to the speaker confirmed.

The Carter offer was described by sources close to the president as a "gesture toward party unity by a candidate who is confident he will command a majority of the delegates when he enters the convention hall."

News of O'Neill's designation for the top spot at the convention opening Aug. 11 at New York's Madison Square Garden came as Kennedy confirmed reports that he will authorize an "exploratory committee" next week for his presidential bid and as Maine Democrats disclosed that Gov. Joseph E. Brennan will endorse Kennedy for the nomination at a press conference in Augusta today.

Brennan, who was one of four hold-outs last summer when 20 other Democratic governors backed Carter for the nomination, is apparently the first state executive to join the Kennedy camp, although outgoing Gov. Edwin E. Edwards of Louisiana has indicated leanings in that direction.

The creation of the Kennedy "exploratory committee" is the expected next step toward the senator's formal declaration of candidacy. It will come quickly after tomorrow's dedication ceremony in Boston for the John F. Kennedy Library, at which Ted Kennedy and Carter will share the platform.

Aides to the senator said they expect his brother-in-law, New York financier Stephen Smith, and Kennedy's former administrative assistant, Washington and Boston lawyer Paul Kirk Jr., to head the exploratory committee.

When it is created, Kennedy will become an official candidate in the eyes of the Federal Election Commission. The commission will then have to rule on the status of funds collected by the unauthorized draft-Kennedy committees that have sprung up in many states during the past few months.

Setting the stage for a contention that funds raised by those committees should not count against limits on spending or contributions, the senator's press secretary, Tom Southwick, said yesterday, "We disavowed those groups. We didn't control the money or the way it was spent."

In confirming plans to announce the exploratory committee "the first of next week," Kennedy said his formal decision on a candidacy would come later this year, but in ample time "to get involved in the Iowa situation," meaning the Jan. 21 caucuses that begin the 1980 delegate-selection process.

The choice of O'Neill as permanent chairman of the convention -- the person who presides at the actual balloting and can make crucial rulings on convention procedures -- caused interest in political circles because O'Neill has such close links to Kennedy.

The speaker said last month that he did not believe Kennedy "could be denied the Democratic nomination if he were to run." But yesterday, O'Neill's aides said he would "have no problem presiding in an impartial fashion," and Carter obviously believes that to be the case.

In picking O'Neill, Carter restored to the House speaker a traditional position of power Past speakers, including Sam Rayburn and Carl Albert, had been convention chairmen, but in 1976 the duties were assigned to Rep. Lindy Boggs (D-La.).

O'Neill's name will be formally recommended to the Democratic National Committee at its meeting in San Antonio on Nov. 9.

Speculation in party circles last night was that national chairman John C. White is eyeing Sen. Daniel K. Inouye of Hawaii for rules committee chairman, Connecticut Gov. Ella Grasso for credential committee chairman, and Detroit Mayor Coleman Young for platform committee chairman.