Barry Bosworth, the outspoken director of the Council on Wage and Price Stability, will leave his post at the end of July, according to Carter administration sources.

His deputy, Robert Russell, has also resigned, effective the same time, to assume a teaching position at the University of British Columbia.

The departures mean that COWPS is losing its two top officials at a time time when President Carter's voluntay wage and price standards are under increasing attack, particularly from organized labor. Revisions of the standards for the program's second year, which begins in October, are also under study.

President Carter last week warned Bosworth and presidential inflation adviser Alfred Kahn, who is chairman of COWPS, to be more careful in their public statements.

Bosworth had said that the administration might consider mandatory wage and price controls a "potential option" next year if inflation worsens. The White House quickly repudiated Bosworth's comment.

Bosworth's and Russell's resignations, however, are not directly linked to this flap, administration sources said. Personal reasons are more important in both cases, they said.

However, the COWPS director has been frustrated on numerous occations during his two years on the job in efforts to get the administration to take a sufficiently hard anti-inflation stance.

On such issues as the level of farm price supports, sugar prices, cotton dust standards and other policies, final decisions paid less attention to the inflationary implications than Bosworth wished.

An "inflation update" report issued by COWPS this week described one of Bosworth's greatest concerns: that the nation is on the brink of an industrial wage and price explosion brought on by workers' attempts to keep up with an acceleration of inflation for food, energy and housing.

One administration official involved in economic policy praised Bosworth's "courage" for insisting repeatedly that the administration recognize the inflationary consequences of its actions. "He'll be missed," he said.

Because of the pressures of the two top COWPS jobs, and the uncertain prospects for improving inflation, Carter could have difficulty finding replacements. "After all," said a COWPS source, "it's a thankless task."

While even insiders seemed uncertain about Bosworth's plans, he might return to the Brookings Institution where he was a senior fellow before going to COWPS in August, 1977.

Russell plans to teach in Canada for only one year and then return to his previous position as a professor of economics at the University of California, San Diego, a COWPS spokesman said. CAPTION: Picture, BARRY BOSWORTH . . . resigning in July