The Carter administration plans to ask Congress for legislation requiring a federal judge's permission to use wiretapping in investigations of foreign intelligence activities within the United States.

That request will mark the administration's first attempt at reforming the rules for intelligence investigations by erecting safeguards against federal police agencies violating civil liberties under the guise of national security.

Reliable sources said yesterday that the proposed bill is being worked out by the Justice Department, the Senate Intelligence Committee, the House Judiciary Committee and Sen. Edward M. Kennedy (D-Mass.). Kennedy tentatively has agreed to sponsor the bill in the Senate.

The legislation is being reviewed at the White House, the sources said, and Attorney General Griffin B. Belt has promised to deliver the proposed draft to Kennedy by April 15, and it is expected to go to Capitol Hill within the next few weeks.

It is intended to replace a bill that was prepared by the Ford administration under direction of former Attorney General Edward H. Levi and introduced into the Senate last year. Kennedy also acted as chief sponsor for that bill.

The bill proposed by Levi was approved by both the Senate Judiciary and Intelligence committees. However, the Senate leadership abandoned efforts to pass it after it ran into fierce opposition from civil liberaties forces who charged that it did not contain adequate safeguards against abuse.

Following the arrival of the Carter administration, Levi's successor, Bell, decided that, instead of attempting to revive the old bill, an attempt should be made to draft new legislation with a better chance of passage.

The aim is to substitute a judicial warrant requirement for the controversial present system that assumes the President's right under his "inherent constitutional powers" to authorize electronic eavesdropping in foreign intelligence cases. In practice, the President delegates to the Attorney General the decisions on when the FBI and other federal police agencies can use wiretapping or bugging methods.

In 1972, the Supreme Court ruled that a warrant is required for wiretaps in security cases where a purely domestic threat is involved. But it left unanswered the question of whether the President's "inherent powers" permits the use of warrantless wiretaps against foreign agents.

In its main features, the sources said, the proposed new law is similar to the Levi bill. It would require federal officials to demonstrate to a U.S. District Court judge that there is "probable cause" for believing that the object of a proposed electronic surveillance is the agent of a foreign power.

The government also would have to give the judge a sworn affidavit by an authorized representative of the President that the information being sought was related only to foreign intelligence matters and could not reasonably be obtained by other investigative techniques.

The sources said it was still unclear how the new bill will deal with the principal objection raised against the Levi proposal - the charge that the law would not prevent eavesdropping on the conversations of persons who have committed no crimes.

Kennedy, the sources said, wants to narrow the "probable cause" requirement to mean that the government must show "probable cause" that a crime is being committed. But the Justice Department so far apparently has been unwilling to go beyond language specifying a "probable cause" showing that the surveillance target is a foreign agent, they added.

Also still under discussion, the sources said, are two other points that caused criticism of the Levi proposal. One involves whether the new legislation should pick up a provision in the old bill stating that any situations not falling within the scope of the electronic surveillance law may still be covered by the President's inherent powers.

That was assailed by critics as providing too big a loophole for backdoor evasion of the law. Although this question has not yet been decided, the sources said, there is a good chance that any references to the "inherent powers" will be dropped in the new bill.

The other main undecided question is whether the scope of the bill should be broadened to cover electronic surveillance of U.S. citizens outside the United States, the sources added. The old bill's jurisdiction would have been limited to the 50 states, but critics have pointed out that some major abuses of wiretapping have involved surveillance by the military and intelligence agencies of Americans overseas.