The Reagan administration, faced with a Democratic-led filibuster blocking the expected confirmation of Attorney General-designate Edwin Meese III, neared agreement last night with farm-state senators on their demand for emergency farm-credit relief.

Tentative terms were reached after a day of intense private negotiations and angry public outbursts, including a protest from President Reagan that the filibuster was "ridiculous" and a charge from Senate Majority Leader Robert J. Dole (R-Kan.) that it amounted to "blackmail."

Although the terms are subject to final agreement this morning, Dole and farm-state senators from both parties expressed optimism about the outcome, and Dole said a vote on Meese's nomination could occur today.

The accord appeared aimed at expanding opportunities for loans to financially hard-pressed farmers, thousands of whom are said to face possible bankruptcy in the customary financial squeeze of early spring.

Dole said key elements of the agreement include an assurance of "adequate resources for debt restructuring" through guarantees to allow farmers to refinance loans at lower rates, along with an assurance that existing operating loan obligations will be met.

But senators said several key points remain unresolved, including financial requirements that farmers must meet to qualify for loan guarantees. Dole indicated that a demand by farm-state senators for advance payment of price-support loans would not be met.

While the terms seemed less specific and far-reaching than the list of proposals circulated earlier by filibustering Democrats and farm-state Republican allies, Dole indicated that further relief may be necessary.

"I think we may have to do other things, but this expands the Band-Aid out there . . . . This won't be the end. This is only the first chapter," he said.

If the agreement holds up after senators check with farmers back home overnight, it appears to offer a little bit for everyone.

Reagan will get Meese confirmed as attorney general, Democrats can claim that they forced the administration to help financially desperate farmers and Dole will have survived his first serious test as majority leader.

For Democrats, who have been nursing their wounds after Reagan's landslide reelection, the filibuster was the first show of strong legislative initiative since the 99th Congress convened last month.

As Senate Democrats were forcing action on farm-credit relief, their House counterparts began moving their own bill.

Approved by an Appropriations subcommittee, it would provide $1 billion in farm-loan guarantees and additional funds to help process the relief. The measure is expected to be approved by the House Appropriations Committee today and is scheduled for floor action Tuesday.

For Dole, already mired in a difficult search for huge deficit reductions, it was an escape from an especially sticky situation. A farm-state legislator facing reelection in 1986, he was selected as majority leader largely because of his reputation as a skilled legislative manager who could bring order to the rambunctious, filibuster-prone Senate.

Appearing considerably happier in the evening than he was in the morning, Dole brushed aside suggestions that his leadership was at stake in bringing a quick end to the filibuster. Then he grinned and said, "We'll know that tomorrow."

The agreement is expected to be in the form of a "sense of the Senate" resolution to be approved after Meese is confirmed, ratifying in nonbinding fashion terms worked out yesterday with the administration, represented in the negotiations by Secretary of Agriculture John R. Block.

"Everyone could vote for the resolution and put out a press release," Dole said sardonically.

In accusing filibusterers of "blackmail" earlier in the day, Dole also had warned the Senate that it faced late-night and weekend sessions and a delay in action on a politically popular $7 billion highway bill until the Meese vote.

This hard-line approach appeared aimed at avoiding the pattern of filibusters that bedeviled his predecessor, Howard H. Baker Jr. (R-Tenn.).

Reagan, asked during an impromptu meeting with reporters what he thought of the filibuster, responded, "You know what I think of it. I think it's ridiculous."

Earlier, at a Senate Budget Committee hearing on Reagan's fiscal 1986 budget proposals for agriculture, Block came under heavy pressure from members of both parties to expand the administration's credit plan but gave no indication he would do so.

"I think you have to recognize how much we're doing . . . . I don't believe change is necessary. I believe it will work," Block said.

Block's reassuring words about prospects for success without change in the program did little to pacify angry farm-state lawmakers of both parties.

"We are in fact putting farmers out of business, good farmers, not marginal farmers," Sen. Robert W. Kasten Jr. (R-Wis.) said. "We are forcing farmers off the farm."