House-Senate conferees appeared near agreement last night on energy legislation permitting the federal government for the first time to play a role in how electric utilities set rates for customers.

In an effort to find a compromise between their flatly opposed positions, House conferees agreed to give up the mandatory rate-setting rules that President Carter proposed his energy bill and the House adopted.

But the Senate, which had opposed and federal role in rate-setting, appeared ready to agreed to a first step that would require state regulatory agencies at least to consider standards that would be listed in the bill.

These utility rate provisions passed the House with almost no trouble. But by the time the bill reached the Senate the utility com anies had been alerted and worked hard to kill them. Senators said the utilities object to the delay they think would be cause by court appeals and the uncertainly that would result as to their capital needs. Senators also opposed it on grounds that there has been little experience with the standards proposed and that states should be permitted to deal with these issues.

The House bill would have required utilities to sell power, in most cases, at not less than cost. This would cases at not less than cost. This would also have been required to offer seasonal rates and rates for service that might be interrupted.

The Senate bill provided only that the government could intervene in a state rate case to urge the regulatory commission to order power companies to follow these standards. The conferees have been trying to find agreement during three days of discussions.

Finally yesterday afternoon, the House group caucused and came back with a proposal that would require state regulatory agencies to consider these standards, but leaving it to the state agency to decide whether to put them into effect. For seven years after enactment only the 200 largest power companies in the country would becovered by whatever is agreed to.

The house has given up mandatory compliance and enforcement in federal courts. Rep. Harley O. Staggers (D-W.Va.), chairman of the House conferees, called the House offer "almost capitulation."

But House members who had worked most closely on the issue were most concerned with winning assurance that state regulatory agencies consider these proposals and start thinking about putting them into effect.

After the senaotrs caucused for nearly an hour, Sen. J. Bennett Johnston (D-La.), said he believed the two sides were getting close to agreement and asked for an overnight recess to permit Senate aides to put their reply on paper.

"Most of these concepts we can accept," Johnston told the House members. "But we have some substantive changes, some of semantics and style that need to be perfected."