A three-year investigation by FBI agents posing as lawyers has targeted at least three Cook County judges and more than 30 lawyers for indictment in what is believed to be the first federal attempt to infiltrate a large metropolitan judicial system, it was reported today.

The top-secret investigation, code-named "Operation Grey Lord" after the bewigged judges of the British judicial system, also could lead to the indictments of courtroom employes and political fixers, according to reports in the Chicago Sun-Times and Chicago Tribune.

Evidence has been presented to a special federal grand jury and the first indictments are expected in about two months.

Sources told the newspapers that the closely guarded investigation was set up in this manner:

Undercover FBI agents posed as lawbreakers to get arrested so they could investigate corruption from the criminal viewpoint. Once arrested, the agents tried to get out of trouble by bribing policemen, judges and court clerks.

When police discovered that the so-called "criminals" were really FBI agents, the bureau brought in other agents who are licensed attorneys from outside Chicago. These lawyer-agents established practices and joined in "hustling" cases to win the confidence of other lawyers and court workers with access to judges.

Once the covers were established, the agents used electronic recording devices to gather evidence of bribes allegedly accepted to influence the outcome of criminal cases. In some instances, the Tribune reported, defense attorneys and court aides unwittingly acted as go-betweens to bring FBI agents and judges together.

The "sting" operation covered almost every branch of the Cook County Circuit Court, including Criminal Court, Chancery Court, Traffic Court and Divorce Court.

Edward Hegarty, special agent in charge of the Chicago FBI office, who directed the investigation from a secret headquarters in the Loop, declined to comment on the investigation.

U.S. Attorney Dan Webb also refused to comment, apparently because the special federal grand jury is still sitting.

The operation first came into public view on March 25, 1982, in what appeared to be a botched robbery attempt. An undercover FBI agent's attache case was snatched by a second FBI agent outside Water Tower Place. The snatcher was apprehended by unsuspecting police and, under intense questioning, reluctantly identified himself as an undercover FBI agent.

The foul-up prompted the FBI to move into courtrooms as undercover lawyers.

FBI sources quoted in the Tribune said no judge had been targeted in the investigation unless there was reason to believe that the official already had been involved in bribe-taking or case-fixing.

If indictments are returned, they most likely will charge violations of federal laws against extortion, bribery, interstate racketeering and mail fraud, sources told the newspapers.