President Carter and Ronald Reagan agreed yesterday to hold their only head-to-head debate of the campaign next Tuesday, a week before Election Day, at 9:30 p.m. in Cleveland.

The high-stakes debate will last 90 minutes and somewhat resemble the form of the 1976 debates between Carter and then-President Ford, but there will be more time for the candidates to rebut each other directly.

Representatives of the two men reached agreement on the debate's time, place and format about 6:30 p.m. yesterday after a second day of negotiations. White House press secretary Jody Powell and senior Reagan adviser James Baker each said that compromises had been made, but refused to be specific.

The candidates will be questioned by four panelists presided over by a moderator, said Ruth Hinerfeld, head of the League of Women Voters Education Fund, the debate sponsor. The league will select the panelists and moderator, but it has not yet decided whether they will be journalists, as has been the case in past debates, Hinerfeld said.

In the first 40-minute segment of the debate, panelists will be able to ask follow-up questions and each candidate will be permitted time to rebut his opponent. In the second 40-minute segment, the panelists will not be permitted to ask second questions, but the candidate asked a question will be able to speak to it a second time to counter any points made in rebuttal by his opponent.

The remaining debate time will be taken up by introductions and brief final statements by each candidate.

Hinerfeld said the debate questions will be on all major issues, domestic and foreign.

Yesterday's agreement -- reached at league headquarters here by Carter campaign chairman Robert Strauss and Powell for the Democrats and Reagan representatives Baker, Dean Burch and Bill Carruthers -- ends a wrestling match over debate arrangements that began with the formal start of the campaign after Labor Day.

Initially, Reagan insisted -- and the league agreed -- that independent candidate John B. Anderson be included in any debate.

Carter refused to have a three-man debate head-to-head. Polls showed that Anderson drained far more votes from Carter than from Reagan, and a major Carter campaign goal was to weaken the Anderson candidacy.

Rather than possibly boost Anderson's standing by debating him, Carter risked negative voter reaction by shunning the first debate, which Anderson and Reagan held Sept. 21 in Baltimore.

Reagan then took a similiar risk by refusing to meet Carter head-to-head, and it appeared there would be no further debates this year. However, Carter eventually got what he wanted when his erosion of Reagan's early lead in the polls led the Republican challenger to reverse himself last week and agree to meet Carter in a debate without Anderson.

Now, with polls indicating a very close election, Tuesday's debate looms as potentially the most significant event in a campaign landscape pocked by crises and dramas now little remembered in the blur of a contest that has been seriously joined for more than a year.

Carter and Reagan alike are confident of their debating abilities, and their negotiators stood before television cameras yesterday like boxers' managers at a contract signing, each predicting a good debate.

Neither side got the date it preferred. Carter wanted Sunday night and Reagan wanted Nov. 3, election eve. Their Oct. 23 settlement was the date proposed by the league.

Strauss and Baker insisted that the negotiations, which were interrupted frequently as one side or the other left the room to make telephone calls, were cordial; Strauss said they took a long time because the stakes are high and there was "a lot of detail."