Former CIA agent Edwin P. Wilson, charged with exporting explosives and training terrorists for Libyan ruler Muammar Qaddafi, said yesterday that he was working with the CIA and supplying it information while he was in Libya.

Several Wilson associates have claimed Wilson's operation in Libya was CIA-sponsored. The agency consistently has denied that claim, and a spokesman yesterday again denied that Wilson worked for the CIA while in Libya.

Wilson's statements filed in U.S. Court of Appeals here yesterday are the first time that he has said publicly that he was working with the CIA. While he was still in Libya, he told news reporters that he did not work for the CIA.

Wilson's lawyers, asking the appeals court to reduce the $20 million bond on Wilson, who now is in federal custody, said "a crucial fact this court should take into consideration . . . is that Wilson's defense that he was working with the CIA while in Libya" would bar his return there.

His lawyers, Herald Price Fahringer and John A. Keats, argued that "the safest place for Edwin Wilson to remain is in the United States."

Wilson did not come back to the United States after his indictment, his lawyers said in their brief, because he was "in a key position to gain information for the government and that remaining in place would be useful in supplying them that vital information."

The lawyers wrote that Wilson "was gathering the kind of information they government officials were interested in and that is why no efforts were immediately made to return him to the United States. The government was content with the arrangements that were extant."

Sources said Wilson has claimed that after his indictment here in April 1980, he gave information to the CIA regarding Libyan efforts to acquire a nuclear bomb. He has also argued that he gave information to prosecutors at a meeting in Rome in July 1981, regarding illegal aircraft parts shipments to Libya and the whereabouts of two fugitives wanted in connection with the 1976 assassination of Chilean Orlando Letelier.

Prosecutors have categorized Wilson's information as worthless or simply designed to harm business competitors.