The Carter administration will test the validity of the secrecy oaths its intelligence agents sign by filing a breach-of-contract suit against Frank Snepp, the Central Intelligence Agency officer who wrote an unauthoirized book on the fall of Saigon.

Attorney General Griffin B. Bell said yesterday that the suit will probably seek to recover the money Snepp has made from the book, and might also request a court order barring him from further unauthorized disclosures.

The main purpose of the suit, though, Bell said, is to determine the validity of the agreement agents sign. "If you enter into a written solemn contract and breach it, that's a serious matter" he said.

Snepp's book, "Decent Interval," was published last fall without the prior review by the CIA required by the agreement he signed when he joined the agency.

In the book, the 34-year-old former analyst, who spent five years in the CIA's Saigon station, charges that major intelligence failures contributed to the hurried American evacuation that deserted thousands of loyal Vietnamese.

CIA Director Stansfield Turner has pushed for the Justice Department to take some action in the case. The legitimacy of the secrecy oath has been an especially sensitive one at the CIA because of the recent termination of some 800 agents from the agency's clandestine service.

Some of these agents have expressed great bitterness at the way Turnwere handled the firings, and have threatened to write books.

A White House spokesman saide yesterday that President Carter was not actively involved in the decision to go ahead with the suit.

Justice Department officials were caught by surprise by Bell's comments, made at a news conference at the American Bar Association convention in New Orleans, and were reluctant to discuss the specifics of the suit, which is not expected to be filed until later this week.

Bell said that he did not consider the secrecy oath to be a prior restraint of First Amendment rights of freedom of speech.

If Snepp didn't want to submit his book forn review, the attorney general said. "He didn't have to take the job. That's not censorship. There's no involuntary servitude in this country."?

If such contracts are not valid, he added, "We might as well know it."

The current legal precedent on the secrecy oath is based on a case involving another book, "The CIA and the Cult of Intelligence," by Victor Marchetti and John Marks.

In that case, the 4th U.S. Circuit Court of Appeals upheld the government's claim that secrecy oaths are constitutional, but restricted their scope to classified material.

The CIA was permitted to make 162 deletions in the Marchetti-Marks book after it got a restraining order stopping publication for the required review.

A CIA spokesman said yesterday that the agency had not yet completed its post-publication review of the Snepp book to determine whether classified material was included.

Thus it is possible that the Justice Department suit against Snepp may sidestep altogether the issue of whether he divulged confidential material.

RSnepp said in a telephone interview yesterday that he thought a court test of the issue would be useful. He repeated his contention that he didn't feel bound by the secrecy agreement because other CIA officials, including former director William E. Colny had leaked their versions of events in the closing days of Vietnam to selected reporters.

"Secrecy has to apply to all of us or none," he said. "It is not divisible. I was just doing what they had done for their own political purposes.

"Snepp said he believed in the need for secrecy. "It is very important, the pillar on which the agency exists."

But he said he had asked whether the CIA was involved in assassination plots before he signed the secrecy oath. "They said no, and I signed. I thought I was joining an honorable organization. But I didn't sign away my rights to protect things about which I knew nothing. "What kind of contract is valid if they lie to you about the terms?"

Snepp said he still contends that he did not divulge CIA sources or methods in hisbooks.