Protesting farmers reached a compromise with D.C. police yesterday that allowed the farmers to parade 135 tractors around the White House -- a caravan that fouled part of the evening rush hour, but left most streets and expressways open for commuters.

The agreement came after hours of meetings between top police officials and a fluctuating number of "wagon-masters" selected from the hundreds of farmers in the American Agriculture Movement's protest for higher farm prices.

The resulting parade temporarily defused a tense situation on the Mall where farmers were bitter after their 560 tractors were surrounded by a ring of dump trucks and buses and police were determined not to allow a repetition of Monday's enormous traffic snarl.

John Crafton, a farmer from Piggott, Ark., called the late-afternoon tractorcade "a great success. It's the best thing that's happened so far," he said.

Deputy Chief Robert W. Klotz, who is directing police tactics during the protest, called the parade "a test" and "a calculated risk," but said "I'm optimistic about working things out..."

Klotz agreed last night to allow a tractorcade at 9:30 a.m. today from the encampment on the Mall to the Agriculture Department, at 14th Street and Independence Avenue NW. The farmers will rally at the department, Klotz said. Their parade route was not announced.

There were some traffic problems in the evening rush because the tractor parade started late, finished after 5 p.m. and tied up hundreds of motorists along 14th Street NW and Constitution Avenue NW. Traffic officials estimated that the rush hour in that area was extended at least an hour because of the parade.

Other major arteries moved about as usual during the evening rush, and yesterday morning's rush hour went more smoothly than a normal day, with the tractors remaining penned behind the barricade.

Klotz said that, during the parade, the tractor drivers "were playing with me, but I had a certain tolerance" when the tractors slowed down on Pennsylvania Avenue in front of the White House.

D.C. Highway Department officials were more concerned about the predicted major snowstorm than the tractors as far as traffic today is concerned. Emphasizing that concern, they took back 72 snow emergency vehicles that were part of the Mall barricade and replaced them with 83 chartered Metrobuses.

Feelings of good will expressed by both sides early last night came after a day of increasing frustration for the farmers who expressed their discontent in various ways.

Someone, presumably from the farm movement, entered an office at the Agriculture Department and lifted confidential files on negotiations preceding the 1977 Farm Act. agriculture officials said.

A variety of street theater scenes were played out on the Mall. A tractor was burned; farmers let the air out of all four tires on a police car; three tractors were driven into the Reflecting Pool west of the Capitol grounds.

One tractor driver was arrested yesterday for driving on a sidewalk, and another farmer was charged early this morning with disorderly conduct in the Mall area. That compared with 19 arrests during Monday's demonstrations.

Farmers were also upset with Agriculture Secretary Bob Bergland, who said on ABC television yesterday morning that the farmers in Washington were not representative of farmers generally.

Bergland conceded that some farmers did have problems, then went on to say that "there are others who have made bad business judgments. They've paid too much money for land... Others are seeking publicity and others are driven by just old-fashioned greed."

Gerald McCathern, AAM's national wagonmaster, said last night in a television interview that Bergland's statements were regrettable. "Some of the statements he made are unmitigated lies," McCathern said.

Earlier, Terri Banman, 29, a farmer from McPherson County, Kan., said: "I thought he [Bergland] was here for us. It doesn't look like that now." Banman, one of several farmers who tried to talk to Agriculture Department officials, said she felt "put off" by being shuffled from one office to another.

Don Wilson, a farmer from Champaign-Urbana, Ill., said he had visited his congressman, Rep. Edward R. Madigan (R-Ill.) to express his concern about rising costs and lower prices.

"I'm not going to tell you I'm broke, because I'm not," Wilson said. "But costs are taking an increasing amount of my gross every year." Wilson said that he was planning to have his wife join him during a week-long stay in Washington, but that he called her Monday and told her to cancel after the confusion, chaos and violence of Monday.

That had been resolved temporarily when Klotz devised the tactic of encircling the tractors, campers and pickup trucks on the Mall and holding them there.

The barricades would be opened, Klotz said only if the farmers identified leaders and if the leaders accepted certain guidelines for protests.

Klotz and a group of farmers met during the morning in a small auditorium at the National Gallery.They agreed, according to committee member Tommy Kersey, that wagonmasters would control parade routes, instead of drivers themselves; that tractors would avoid freeways; that all parades would take place between 9 a.m. and 5 p.m.; that tractors would obey traffic rules, and that the police would seek toilet facilities and trash collection services for the Mall encampment.

Last night, Park Police said, a flatbed truck carrying portable toilets was abandoned near the barricaded area by its driver when several persons tipped one of the toilets off the truck and set it afire. Police moved the truck and said they would try to arrange delivery of the toilets this morning.

Officials allowed protesters to use restroom facilities in the nearby Agriculture Department and opened some offices there for use as sleeping quarters last night.

While a stream of persons moved into and out of the Agriculture building about midnight, several farmers took turns driving tractors the length of the Mall and back. They said they intended to continue until daybreak. "We don't want the police to try to barricade us in a small section of the Mall," one farmer said.

Yesterday's meeting that resulted in the various compromises was described by Kersey, a Georgia farmer, as "a satisfying meeting on both sides."

Police wanted to limit parades to 100 tractors, but Klotz agreed to let about 135 participate in the afternoon parade. That left about 425 tractors inside the barricades on the Mall, along with 227 campers and 122 trucks.

The tractorcade actually got under way about 3:30 p.m. as tractors were permitted out of the barricades at Third Street and Constitution Avenue NW. They proceeded on Pennsylvania Avenue, past the White House, then returned to the Mall via 17th Street NW and Constitution.

The lead tractor in the parade had a giant shovel with five farmers sitting in it, including one wearing a Jimmy Carter face mask. Like many other tractors, it was festooned with American flags. Others carried Confederate and state flags.

Slogans on the tractors included "If You Like to Eat, Support Me"; "No More Peanuts"; "Don't Bite the Hand That Feeds You," and "Don't Blame Farmers for High Food Prices. We Don't Get Union Wages."

John Woodham, a farmer from Ozark, Ala; told a reporter as he drove around the White House that "We didn't come to cause trouble, but to make a point. If we go under, the American public is going to starve or pay three to four times what they now pay for food, and most people can't afford to do that."

Although the tractors had a police escort, they slowed down considerably at 17th Street when they moved into single file from two and three abreast. They continued in single file along Constitution Avenue, just as the evening rush hour was getting heavy, and effectively closed 14th Street for about 35 minutes.

Commuters waiting for buses along 14th Street were cold and angry. "I don't care about their costs," said a woman who said she works for the Commerce Department. "I care about rush hour traffic. If they're going to block every street they choose, it's ridiculous."

However, some people along Constitution Avenue cheered the farmers as they passed by, and other groups in buildings waved through the windows.

In the lobby of the Smithsonian Museum of Science and Technology, a group of 64 senior citizens had to wait 90 minutes for their chartered bus to Hagerstown. One member of the group, Esther Geesey, complained that "they just staged this parade to tie up Washington traffic."

But Esther Winghart said, "I'm not against the tractors. I think they ought to get what they want. It's really true, they need their money. They're good American people too. If we didn't have farmers, we wouldn't have much of a country. They're good, solid citizens."