The FBI yesterday arrested one of its own agents on charges that he sold classified documents to a female Soviet KGB agent with whom he was having a personal relationship.

FBI Director William H. Webster, calling it "a very sad day for us," said it was the first case of an FBI agent being charged with espionage for a foreign government.

Webster said the FBI is still assessing what damage may have been caused to the U.S. intelligence apparatus. Asked what sort of information may have been turned over to the Soviets, he said: "We know certain things, but obviously we don't know if we know all the things."

An FBI affidavit said one of the documents "would give the KGB Soviet security police a detailed picture of FBI and U.S. intelligence activities, techniques and requirements."

The arrested agent, Richard W. Miller, 47, is a 20-year veteran and was assigned to foreign counterintelligence in the bureau's Los Angeles Field Office. On Tuesday, Miller was dismissed from his job for violating FBI regulations.

Also arrested in the case were Swetlana Ogorodnikova, 34, identified as a major in the KGB, and her husband, Nikolay Ogorodnikov, 51, also known as Nikolay Wolfson, both of Los Angeles. The FBI said they were born in the Soviet Union, emigrated to the United States in 1973 and are permanent resident aliens of the United States.

Washington Post staff writer Jay Mathews reported from Los Angeles that the two Soviet emigrants have been known there for distributing Soviet literature and claiming special influence with the Soviet government.

According to members of the large Los Angeles Soviet emigre community, the couple organized special Russian movie screenings, distributed Soviet magazines, offered to get emigre relatives out of Soviet prisons for a price and made several unusual trips back to the Soviet Union.

They were so open in their activity and so well known in both the Russian tea parlors of West Hollywood and the high-rise FBI offices of Westwood that emigre editor Alexander Polovets was stunned to hear them accused of being spies, Mathews reported.

"You would think the KGB could have found brighter people than those two," said Polovets, whose weekly Panorama circulates to about 50,000 Russian-speaking residents of the United States.

A federal magistrate in San Diego, where Miller's family resides, ordered him held without bond pending a hearing Thursday morning. Assistant U.S. Attorney Ray Edwards said authorities felt "flight is a real strong risk" in Miller's case. No plea was entered.

The Ogorodnikovs were arraigned in Los Angeles. U.S. Magistrate Volney V. Brown Jr. ordered both held after Assistant U.S. Atorney Richard Kendall warned that they would be out of reach of U.S. law the minute they entered a Soviet consulate.

Justice Department sources said they believed Miller's motive was related to "money and sex." They said Miller has eight children and an annual salary of about $40,000. Miller was reported to have been reprimanded for a weight problem and was described as a "fallen-away Mormon" by one government source.

A court affidavit released by the FBI said the arrests followed court-approved electronic bugging of the Soviet couple's apartment, a search of Miller's residence to which he agreed, interviews with Miller and Ogorodnikova and physical surveillance of all three persons.

The affidavit said that Miller acknowledged to the FBI's top polygrapher in interviews last Sunday and Monday that he had demanded $50,000 in gold, $14,000 in cash and $1,000 in expenses in return for providing secret documents to the female agent.

The affidavit said Miller had discussed his "personal, professional and financial problems" with Ogorodnikova and that "she seemed sympathetic." It said Miller acknowledged having "numerous personal meetings with Swetlana Ogorodnikova" between late May and late September. Eventually, it said, she told Miller she was a KGB major and asked him to work for the Soviet organization and supply secret documents.

In the second or third week of August, the affidavit said, Ogorodnikova took Miller to meet her husband, whom she identified as Nicolay Wolfson, who was to approve the KGB payments to Miller. It said Miller told Wolfson that "he was not interested in a long-term relationship but rather wanted to receive a large amount of money in a short period of time."

According to the affidavit, Miller finally gave her a secret FBI document entitled, "Reporting Guidance: Foreign Intelligence Information," which Miller had copied in the Los Angeles FBI Field Office.

"Discovery of this document would give the KGB a detailed picture of FBI and U.S. intelligence activities, techniques and requirements," the affidavit said.

It said that last Friday the FBI, with Miller's permission, searched a house he has in the Los Angeles suburb of Lynwood and found "FBI classified documents concerning foreign counterintelligence investigation and activities. Many of the classified documents were originals and were clearly stamped 'Secret.' " They were dated from 1980 to 1984, the affidavit said, and included one complete, classified original file.

The FBI said in a separate written statement that the documents Miller agreed to deliver to the Soviet couple dealt with positive intelligence tasking, which was described by FBI sources as information about the assignments of U.S. intelligence agents and the nature of the information the United States is seeking.

The affidavit said another FBI agent had interviewed Ogorodnikova in 1982 after a Soviet defector said she had tried to persuade him to return to Russia. In subsequent interviews, it said, she detailed numerous meetings with Soviet officials, including Soviet Consul General Aleksandr Chikvaidze and Vice Consul Viktor Zonov in San Francisco, for whom she had handled various assignments.

It said she also told the FBI that in 1980 she was sent by a Soviet consular official to deal with a "possible mutiny" aboard a Soviet ship in San Pedro and claimed to have successfully ordered a ship's lieutenant to arrest the executive officer.

In response to questions from reporters, Webster said that it is usual procedure for the FBI to conduct interviews with Soviet emigres and that he did not consider Ogorodnikova a double agent.

The FBI said its agents separately trailed Miller from the FBI's Los Angeles Field Office and Ogorodnikova from her home on Sept. 12 to a rendezvous in a Los Angeles parking lot where he got into her car and handed her a legal-size envelope. It said Miller acknowledged last Friday that on that occasion he had met her to discuss traveling together to Vienna "in order for him to meet a person whom Swetlana Ogorodnikova described as an important person in her government.