When Thomas Powers decided to write a biography of Richard Helms he set himself an elusive target.

After a long Central Intelligence Agency career ending with 6 1/2 years as director and including official and dinner-table contacts with all the powerful of Washington, Helms' name peppers the written record of his times, but his nature, his thoughts, his likes and dislikes have been as closely guarded as the secrets he so doggedly protected. As Powers writes in "The Man Who Kept the Secrets: Richard Helms and the CIA," Helms left few tracks.

Again and again Powers asked Helms' friends and former associates to tell a Helms story, to quote Helms' most characteristic saying, to give him something to color the Helms story with with what news-magazine writers call "quotes, jokes and anecdotes."

"A lot of them asked me, 'Why are you writing a book about Helms?' They'd tell me there were a dozen more interesting agency guys," Powers said in an interview.

The quotes, jokes and anecdotes are few and far between. After all, Helms is a man who seems to have gotten angry only once in his life with anyone watching, when he cursed TV correspondent Daniel Schorr.

For Powers, however, there was a stronger attraction than the good yarns the spice other CIA biographies.

"Helms was the only guy on whose head history fell," Powers said. Helms was involved in the whole course of the CIA's history, and he was standing in the spotlight when the roof fell in. "His career offers an ideal pathway through the secret history of 30 years." Powers writes.

Powers' book follows that pathway, and according to a number of reviews, does it well. John le Carre called the book "a splendid spy story, and all the better for being nonfiction." Ward Just wrote, "That we can understand (the real nature of the CIA) at all, and understand the CIA's role in American foreign policy since World War II, is due to this remarkable book." And John Leonard pulled out all the stops, calling it "the best book on the CIA ever written."

In the spring of 1979, Powers knew only one CIA employe, had never worked on stories about intelligence, but had become fascinated by the accounts of CIA misdeeds spilling out of Washington.

"These guys were doing a lot of things in my name and with my money," Powers said. Armed with a magazine assignment from Rolling Stone, Powers set out to satisfy his curiosity about what the CIA was really like.

"I honestly anticipated that I'd walk into an unbleachable stone wall," he said. Instead, Powers found that large numbers of the CIA's first generation had retired just before or during the upheavals that brought the ugly secrets which the agency had called "the family jewels" into the headlines.

These men had been reading the criticism of the agency and listening to the calls for reform and they'd been brooding. They thought the CIA was getting a bum rap.

"They were really quite open," Powers said. "CIA people are much easier to talk to than elected officials. They haven't had the endless practice in public prevarication.

The important thing wasn't the first meeting, but the second or third," Powers said. By then, his sources realized that what they told him was not going to be in print in a matter of days.

One of the worst moments he had trying establish his credibility came at his first interiview. He had called Thomas Parrot, a retired CIA officials, who invited him over the next day.

Powers arrived to find Parrot had been listening to radio broadcasts of a just-released Rolling Stone story by Howard Kohn that charged the CIA with a series of new misdeeds, including a gift of $1 million to former New York governor and Republican presidential candidate Thomas E. Dewey.

"I'm not sure I want to talk to you," Parrot said in greeting Powers. Parrot relented and so did dozens of others.

"Sometimes, I would be talking to one of these guys and I would notice that his wife or one of his children was listening, lurking in the background," Powers said. "They'd never heard this stuff before."

Neither, of course, had Powers, and if some of the stories had gone the rounds among CIA people, Powers was a fresh ear for old chestnuts.

After he had been working on the book for some time, Powers said, "I began to have something to offer besides an ear." Powers had learned a lot about personalities and feuds at the top of the CIA over the years. People would ask him what so-and-so was really like or why Helms and Richard Bissell didn't get along.

Powers, who like Helms began his career as a reporter for United Press International, has been a free-lance writer since 1970. He won a Pulitzer Prize for his reports on Diana Oughton, who was killed in 1970 in a bomb explosion that destroyed a New York town house being used by Weathermen. His first book was "Diana: The Making of a Terrorist." His second book was on the domestic impact of the Vietnam war, called "The War at Home."

As he began the reporting for his new book, Powers worried that the CIA might lead him down the garden path. At the end of his work, he thinks that some CIA people tried to misrepresent some things, but that there was no concerted plot to mislead him.

His book seems likely to disappoint both the Cia veterans who helped him write it and those foes of the CIA who find a drop of sympathy for the agency one drop too many.

It is by no means an all-out attack on Helms or the CIA, yet, Powers said many of his sources to whom he sent copies of the manuscript "thought it was implacably hostile to the CIA." Powers adds: "They didn't understand how come I didn't get on board after they'd spent all that time talking to me."

At the same time, Powers scorns those who would echo Sen. Frank Church's statement during the investigation he headed that the agency had been "a rogue elephant" out of control. Indeed, Powers takes pains to point out that the CIA operates at the direction of the president to serve the president.

"You're making a terrible mistake," a friend told him after reading the manuscript and anticipating the reaction to it. 'You're tying the CIA around your ankle and throwing it off a bridge."

Of Helms, Powers said: "I think he was a pretty able director of an intelligence agency. I know that means that people are going to jump down my throat and say you're in favor of Chile and everything else."

Powers is not in favor of the CIA's effort against Marxist President Salvador Allende or other agency covert actions.

"The reason for stopping them is we're doing a lot of harm to a lot of people and not doing ourselves any good," he said. Powers is astounded at the arrogance of Americans thinking they can run other countries, as if they could understand better than a Guatemalan or a Chilean or an Iranian the forces at play in his country and how to manage them.

"We've got to face up the attractions of power and the temptations of secrecy," Powers said. "To ask whether we should get rid of the CIA is to approach the problem from the wrong end. Since the world is militarized, since there are military threats, we've got the CIA. That's not the problem, the problem is all those arms."

Insofar as the sins and behavior of the CIA are becoming as issue in the 1980 presidential campaign, Powers' book is likely to help shape the debate. At least one candidate, Sen. Edward M. Kennedy, (D Mass) won't be happy with it. Powers concludes that President John F. Kennedy and Attorney General Robert F. Kennedy approved the CIA attempts to assassinate Cuban President Fidel Castro.

"I think you can say that presidents can get away with murder, Powers said. "There are no smoking guns on that one," Powers conceded, "but there is certainly a lot of cordite in the air."

Powers describes the unmasking of the CIA's darkest secrets and its years under scrutiny by the press, a presidential commission and special congressional committees as brutal process of self-examination necessary to redirect not only the CIA, but also U.S. foreign policy.

When history fell on Helms' head, President Nixon shipped him off to Iran and ambassador to the shah. Helms fumed at the attacks on the agency and took personally his successor William Colby's decision to cooperate with investigators.

In the book, it sometimes seems that Powers prefers "the man who kept the secrets" to Colby, but he said that wasn't intended. "All I tried to do is tell it flatly," Powers said. Helms, he added, was wrong to take personal offense and was wrong to think Colby had been improperly eager to yield the family jewels.

Again and again, Helms was called back to Washington to testify and through it all he had hanging over his head the threat to a perjury indictment for his denial under oath that the CIA tried to overthrow Allende's government.

He was often like an amnesia victim on the witness stand, as Powers writes. He had believed throughout his career at the CIA in what he told the American Society of Newspaper Editors in one of the few speeches he made while director:

"The nation must to a degree take it on faith that we too are honorable men, devoted to her service."

Powers is sympathetic about the perjury threat that Helms ended by pleading nolo contendere to two misdemeanors. The wheel had turned and Helms was being unfairly prosecuted by the standards of one era for what he did in another, Powers said of a general perception which he shares.

"The truth of the matter is it's very rare for liars to go to jail," Powers added.

Powers made a deliberate decision not to seek out stories of Helms' childhood, what he liked to eat, what movies he went to. "I wanted to talk about his professional life," Powers said. About half a dozen people told Powers to look up Helms' first wife, who was said to know where a lot of bodies were buried.

"What would I do with all the stuff she told?" Powers said, "and how can you report on a guy what his ex-wife says? None of that seemed important."

Powers spent three mornings interviewing Helms before he wrote his first draft and then sent the manuscript to the former director.

A couple of months went by and then Helms called and said he was coming to New York and could he visit Powers. At Powers' house, Helms offered a number of factual corrections, including that the car he acquired in 1952 was gray, not beige.

Helms stressed that the Bay of Pigs had not been the CIA's idea, but had wide backing inside the Kennedy administration, Powers said, and offered a couple of other stories.

Finally, he gave his personal response. "I'm surprised you learned so much," Helms, the man who does not reveal himself, said to Powers in what the author thinks was a deliberate attempt to say something nice.

"He did not expect understanding agreement or approbation and he didn't get it," Powers said.