The House Committee on Standards of Official Conduct yesterday formally retained Leon Jaworski to direct its investigation of Korean influence-buying in Congress and gave him nearly total power to proceed as he sees fit.

The committee approved a written agreement - worked out by Jaworski and House Speaker Thomas P. O'Neill Jr. (D-Mass.) - under which Jaworski will have final say over most aspects of the investigation, including issuing subpoenas. The members also agreed that Jaworski could not be fired except by vote of the full House.

Twenty-four hours earlier, the committee chairman, John J. Flynt Jr. (D-Ga.), had insisted he would "never" give up his authority over subpoenas and hiring and firing.

But whatever qualms Flynt and other members might have felt yesterday about the broad grant of power to their new special counsel were far outweighed by obvious relief at hiring a lawyer of Jaworski's stature to take over the troubled Korean investigation.

The committee's first chief investigator, Philip A. Lacovara, resigned last weekend after a series of disputes with Flynt about the scope and pace of the investigation.

That incident created turmoil in the House and provoked charges that the Korean investigation was being delayed for political purposes. Committee members and the House leadership were concerned the investigation might never recover credibility with the public.

But congressmen from both parties agreed yesterday that Jaworski should provide that needed credibility.

The 71-year-old Houston lawyer gained national acclaim during his tenure as Watergate special prosecutor.In a press conference Wednesday, after he accepted the Korean assignment, Jaworski promised he would report qucikly to the American people if anyone in the House tried to interfere with his investigation.

"If there's a crook involved, I want to bring him out because I despise crooks," Jaworski said. He added that he would report to the Justice Department anyone found to have violated criminal laws.

As outlined in the written agreement, Jaworski's task is to report to the committee any evidence that House rules or criminal statutes have been violated and to recommend punishment of House members will be up to the committee.

Jaworski will presumably be bound by a strict memorandum that he was prepared by Lacovara, and adopted by the committee, setting forth what conduct would be considered wrongdoing.

Jaworski heads a law firm that includes more than 200 lawyers at offices in Houston, Washington, and London. He said that prior commitments at the firm would prevent him from coming to Washington for committee work until Aug. 15.

Until then, he will be represented by Peter A. White, a 32-year-old partner in the firm's Washington office. Whate attended yesterday's committee meeting, and the members readily deferred to his suggestions regarding fine points in the committee's agreement with Jaworski.

The committee's resident gadfly, Rep. Bruce F. Caputo (R-N.Y.), was the only member to question the retention of Jaworski's firm. Caputo wanted to know if the firm had any dealings with agricultural interests that might do business with South Korea.

White replied that he could not entirely rule out that possibility. But he promised that Jaworski would immediately inform the committee if a potential conflict appeared.

Because White could not provide an unequivocal answer, Caputo voted "present" on the motion to retain Jaworski's firm. The other 10 committee members voted for the motion.

After yesterday's meeting, Flynt defended a trip he made to Africa in 1972 in which his wife's expenses were paid by a foundation supported by South African business interests.

"In the atmosphere of 1977, I probably wouldn't do that again," Flynt said. "But I saw nothing wrong with it then and I see nothing wrong with it now."