Mayor Marion Barry agreed, yesterday to let protesting farmers of the American Agriculture Movement hold one final tractorcade this morning in return for their pledge to send most of their tractors home by Sunday night.

As the mayor was announcing the agreement in his office at 9 a.m., more than a dozen flatbed trailer trucks began arriving at the Mall to be loaded with tractors. They were to take the machines back to the farms across the country from which they had come to Washington en masse more than three weeks ago.

Many farmers vowed to remain to continue pressing Congress for farm legislation. "The fact that the tractors are leaving doesn't mean the farmers are leaving," said Tommy Kersey of Georgia, one of the protest leaders.

But some of them seemed relieved to be going home as they moved their tractors from the waterlogged, rutted lawn of the Mall in rare, springlike sunshine. "I haven't seen my back door since Jan. 13, and I can't wait to," said Floyd Kirkpatrick of Forgan, Okla., as he lashed his tractor to a flatbed. "We've got to go back to the farm and do our work."

The agteement that will permit the famers to keep about 50 tractors parked indefinitely along the 100 block of Pennsylvania Avenue NW came out of an hour-long meeting in Barry's office that the farmers had requested. The mayor, top city aides, D.C. and federal police force chiefs and half a dozen farmers participated.

Barry told reporters afterward that the meeting was "very productive" and said of the agreement with the farmers, "I have their personal commitment that it will be carried out."

Today's tractorcade, which will be limited to 150 vehicles, is scheduled to go to the Federal Reserve building at Constitution Avenue and 20th Street NW after the morning rush hour.

Since their arrival here Feb. 5 was marred by scuffles and arrests, the farm protest leaders have had an on-and-off rapport with D.C. police, whose ability to control the tractorcades around the city has had varied success. The relationship crumbled entirely last Friday when a tractorcade to the White House ended with four arrests and a massive traffic jam that snarled evening rush hour all the way into Virginia.

Until Barry interceded yesterday, police had said there would be no more tractorcades because of that. Police officials were guardedly optimistic after yesterday's meeting. "I can live with it," Deputy D.C. Police Chief Robert W. Klotz said of the tractorcade.

By yesterday, police estimated there were 300 tractors on the Mall, down from 400 Tuesday and 470 last week.

As part of the agreement, the farmers began yesterday to reduce their numbers on the Mall, where Klotz created an impoundment by surrounding the area with trucks and buses Feb. 5. Tractors moved from the scarred, churned-up lawn that Interior Department officials say will cost $500,000 to repair, to the pavement between First and Seventh streets. By Sunday, the encampment is supposed to be concentrated in the Mall area between first and Third streets.

D.C. Police Chief Burtell Jefferson termed the barricade of the past weeks a "police line" and declined to say whether it will remain around the smaller encampment.

Barry, who toured the Mall yesterday to chat with farmers, estimated that the protest will end up costing the city more than $2 million, but said a final figure won't be available until next week. "We know it's the nation's capital but we have to absorb this," he said.

The mayor took his first ride in a police helicopter yesterday, surveying the Mall area. Upon landing he said it looked as though the farmers were honoring the agreement. "It's progress," he said. "A little rough edges here or there, but is working."