House leaders tentatively agreed late yesterday on a deal that would include roughly $3.5 million in humanitarian aid for Nicaragua's contra rebels in a stopgap spending bill due to come before the House next week.

House Speaker Jim Wright (D-Tex.) agreed to the request by House Republican leader Robert Michel of Illinois after cutting the amount down from the $8 million Michel had sought.

The money is intended to keep the contras in food, uniforms and medical supplies from Oct. 1, when the $100 million allocation for the current fiscal year runs out, to Nov. 7, the target date for a cease-fire to begin under a peace plan agreed to last month by the presidents of five Central American countries.

Wright, who has made the Central American peace effort a high priority, had insisted that no consideration be given to additional contra aid while the peace efforts are under way, fearing the debate would derail the talks.

But Michel signaled his intention Tuesday to include money for the contras in a short-term omnibus spending bill designed to keep the government running when the new fiscal year begins Oct. 1. The bill is to provide money to run federal programs through Nov. 10.

Michel said then that contra aid was the only item being eliminated from the spending measure, a sign that Democratic leaders of the House "want the contras to wither on the vine even before we can get a peace plan implemented."

Michel and Wright met yesterday to discuss the proposal, and the two arrived at the roughly $3.5 million figure as the proportion of a one-month aid allocation that would normally be spent for "humanitarian" uses.

President Reagan backs the compromise, White House spokesman Marlin Fitzwater said, and considers it a "fairness issue . . . in terms of continuing our aid to the resistance during that month the budget is under consideration. We do not consider it as a repudiation in any way of Speaker Wright."

"We're talking about a very small amount of humanitarian aid," said an aide to Wright, who spoke on condition of anonymity. "We're not going to do anything that would interfere with the peace process."

The peace arrangement worked out Aug. 7 calls for an end to regional hostilities on Nov. 7, an end to outside military aid and the restoration of democratic freedoms in Nicaragua.

Under the Wright-Michel agreement, the money will be put directly into the spending bill by the House Appropriations Committee without the need for a high-profile floor vote or debate. That measure is expected to be cleared by the committee today, and could come to the full House as early as Tuesday.