CBS Inc. and the Justice Department are on the verge of ending the government's costly eight year effort to secure from the network more competitive policies in the production of television programming, sources said yesterday.

If, as is expected, the agreement is signed by a federal judge in Los Angeles soon, the consent agreement would bring to a close a Justice Department lawsuit against CBS that originated in 1972 during the Nixon administration.

When originally filed, the suit also included the other two major networks, NBC and ABC. NBC, however, settled it case four years ago.

Industry sources, particularly those involved with motion picture production companies, say the NBC settlement did little to alter programming practices. The CBS agreement is much the same and falls far short of the stated intentions of the original lawsuit, sources said.

Although the suit is still pending against ABC, observers say submission of the consent agreement with CBS effectively would end the Justice Department's third largest pending antitrust suit. It is only surpassed in terms of the size of the target company and the stakes by the government's landmark antitrust suits against International Business Machines Corp. and American Telephone & Telegraph Co.

"The guts of it is that they (the Justice Department) haven't accomplished anything," said one industry source. "The government began this investigation in the Sixties. The net result of the NBC decision and the CBS decision if they are similar is that the government has accomplished very little."

The nation's film production companies, such as Columbia Pictures Industries Inc. and Warner Brothers and their trade group, the Motion Picture Association of America, have repeatedly complained that the options and talent agreements used by the networks in contracting for their programming are anticompetitive, limiting the firms' ability to develop and market new shows.

"The success of some producers today comes largely from a small number of hit theatrical motion pictures and other entertainment ventures," said the association and its most powerful members in 1977 at a proceeding before the Federal Communications Commision.

"Production of new television programs for the network market, however, remains a risky no-win proposition. If a show is a hit the network recoups all the profits. If a show is a failure, the producer absorbs the loss."

These option and talent arrangements allow the networks to maintain essential control over a television series and its stars effectively for the life of a program. With only the three major networks as vehicles for their work program producers would prefer a more competitive system which would allow them to maintain a greater degree of control over the programs after the "pilot" or try-out stage of program development.

Almost all of the key provisions in the NBC consent decree are included in the government's agreement with CBS, sources said although the ultimate fate of the NBC case is dependent on the resolution of the CBS and ABC cases.

A provision of the agreement with NBC stipulates that NBC can apply to the court to alter the terms of its deal if the network is placed at a "competitive disadvantage" as a result of the relief in the other two suits.

Unlike the NBC agreement, however, the CBS consent agreement effectively permits CBS to maintain permanently its options on prime time programming, with renewals every year. The NBC decree, in essence, allows only a one-year option after a four-year initial contract.

The other key provision of the CBS settlement reportedly involves "talent" contracts. The agreement, sources said, allows a 90-day lag period before stars of network shows, after their program is cancelled, are also released from their pacts with the network. There is no similar clause in the NBC consent decree.

Word of the pending consent agreement caught even broadcasting and motion picture insiders by surprise.

CBS officials and representatives of the other two networks would not comment on the pending agreement.

Assistant Attorney General Sanford Litvack, who is the head of the antitrust division, and other top officials would not comment either.

It is expected that the agreement will be presented to U.S. District Judge Robert J. Kelleher within several days, barring last minute snags in either receiving final Justice Department clearance or finding time on the judge's calendar to schedule the presentation, sources said.

The suit was originally filed in 1972, amid charges that the case was an attempt by Nixon administration officials to harass the networks. CBS, in particular, charged that the suit was an attempt to inhibit criticism of then President Nixon.

The original suits were dismissed by Kelleher in November, 1974, without prejudice after a legal fight about the alleged political motivation of the suit.

But the Justice Department refiled the case one month later after Gerald R. Ford became president. The claim that the suit was motivated by Nixon administration political concerns was then, for all practical purposes, put aside.

The case has moved along slowly, although the government has devoted significant resources to the prosecution of the networks.

Although precise figures on the cost of bringing the case could not be obtained, sources said that at least six Justice Department attorneys had worked on the case full time and the government also hired outside consultants to assist with the highly complex discovery process.

Sources said that a conservative estimate of the cost of the case would be at least $2 million.