WASHINGTON — Hours after F.B.I. brokers searched the homes of two former Undertaking Veritas operatives final week, James O’Keefe, the chief of the conservative group, took to YouTube to defend its work as “the stuff of accountable, moral journalism.”

“We by no means break the legislation,” he stated, railing towards the F.B.I.’s investigation into members of his group for doable involvement within the reported theft of a diary stored by President Biden’s daughter, Ashley. “The truth is, one in all our moral guidelines is to behave as if there are 12 jurors on our shoulders on a regular basis.”

Undertaking Veritas has lengthy occupied a grey space between investigative journalism and political spying, and inner paperwork obtained by The New York Occasions reveal the extent to which the group has labored with its legal professionals to gauge how far its misleading reporting practices can go earlier than operating afoul of federal legal guidelines.

The paperwork, a sequence of memos written by the group’s lawyer, element methods for Undertaking Veritas sting operations — which generally diverge from normal journalistic observe by using individuals who masks their actual identities or create pretend ones to infiltrate goal organizations — to keep away from breaking federal statutes such because the legislation towards mendacity to authorities officers.

The paperwork present, for instance, Undertaking Veritas operatives’ concern that an operation launched in 2018 to secretly report staff on the F.B.I., Justice Division and different businesses within the hope of exposing bias towards President Donald J. Trump would possibly violate the Espionage Act — the legislation handed on the peak of World Conflict I that has usually been used to prosecute spies.

“As a result of intent is related — and broadly outlined — making certain PV journalists’ intent is slim and lawful can be paramount in any operation,” the group’s media lawyer, Benjamin Barr, wrote in response to questions from the group about utilizing the relationship app Tinder to have its operatives meet authorities staff, doubtlessly together with some with nationwide safety clearances.

In a separate July 2017 memorandum, Mr. Barr emailed a consultant of the group that the legal statute involving false statements to federal officers “continues to be an expansive, harmful legislation that inhibits Veritas’s operations.”

The paperwork give new perception into the workings of the group at a time when it faces potential authorized peril within the diary investigation — and has signaled that its protection will rely partially on casting itself as a journalistic group protected by the First Modification.

The F.B.I. final week searched the properties of Mr. O’Keefe and two former Undertaking Veritas operatives — Eric Cochran and Spencer Meads — as a part of the investigation into the reported theft of Ms. Biden’s diary. Mr. O’Keefe has acknowledged receiving a grand jury subpoena within the case.

Mr. O’Keefe and his lawyer, Paul Calli, revealed new particulars in regards to the diary investigation and F.B.I. search to Sean Hannity on Fox Information on Monday. Throughout the interview, Mr. Calli stated that Undertaking Veritas had paid for the precise to publish the diary however was unable to verify it belonged to Ms. Biden and in the end determined to not go forward with a narrative about its contents. Excerpts from the diary have been later revealed by one other conservative web site.

One of many crimes listed on Mr. O’Keefe’s search warrant was “transporting materials throughout state strains,” his lawyer stated. There’s a legal statute towards taking stolen items from one state to a different.

Mr. O’Keefe stated the F.B.I. took his telephones, which had confidential donor and supply data. He stated that neither he nor his group had accomplished something incorrect, and that the F.B.I. searches have been an assault on the First Modification.

The authorized paperwork obtained by The Occasions have been written a number of years in the past, at a time when Undertaking Veritas was remaking itself from a small operation operating on a shoestring funds to a bunch extra carefully modeled on a small intelligence-gathering group.

Throughout the Trump administration, the group noticed a flood of recent donations from each non-public donors and conservative foundations, and employed former American and British intelligence and army operatives to coach Undertaking Veritas brokers in spycraft.

In an announcement issued by one in all its legal professionals, Undertaking Veritas stated it “stands behind these authorized memos and is happy with the exhaustive work it does to make sure every of its journalism investigations complies with all relevant legal guidelines.”

The assertion stated the work “displays Undertaking Veritas’s dedication to the First Modification, which protects the precise to collect data, together with about these in energy.”

Undertaking Veritas is suing The New York Occasions over a 2020 story a couple of video the group made alleging voter fraud in Minnesota.

Most information organizations seek the advice of often with legal professionals, however a few of Undertaking Veritas’s questions for its authorized crew reveal an curiosity in utilizing techniques that take a look at the boundaries of legality and are outdoors of mainstream reporting strategies.

In a February 2018 memo, Mr. Barr stated he was writing in response to questions from the group about the usage of Tinder “to fulfill potential brokers of the ‘Deep State’ or these with nationwide safety clearances.”

The doc mentioned the perils of the Espionage Act at size, and warned that Undertaking Veritas shouldn’t attempt to receive or publish any data associated to nationwide safety. “As well as, as extra details and developments happen in these investigations, additional authorized session is suggested,” the memo said.

The Occasions previously reported that in the summertime of 2018, Undertaking Veritas had offered the cash to hire an expensive home in Georgetown, a handy base for feminine operatives happening dates with federal staff on the F.B.I., State Division and Justice Division, amongst different businesses. In September of 2018, Undertaking Veritas launched a video as a part of a sequence referred to as “Deep State Unmasked.”

One of many paperwork mentions “Richard,” a possible reference to Richard Seddon, a former MI6 officer. Mr. Seddon was recruited to affix Undertaking Veritas in 2016 by Erik Prince, the army contractor and brother of Betsy DeVos, who served as training secretary throughout the Trump administration.

In 2017, Mr. Seddon skilled Undertaking Veritas operatives at Mr. Prince’s household ranch in Wyoming, in accordance with coaching paperwork and former operatives. He helped oversee a surge in hiring, typically interviewing potential staff at an airport in Cody, Wyo., near the Prince ranch.

Mr. Seddon, who lives in Wyoming, left Undertaking Veritas in mid-2018 to conduct his personal political spying operations in Wyoming and Colorado towards Democrats and Republicans who have been thought-about insufficiently loyal to Mr. Trump. That operation was funded not less than partially by Susan Gore, a rich conservative and an heiress to the Gore-Tex fortune, in accordance with folks conversant in her function. (Ms. Gore has publicly denied funding the operation.)

She is the founding father of a conservative group referred to as the Pillar of Regulation Institute, of which Mr. Barr, the Undertaking Veritas lawyer, is president.

In one other authorized doc, one about attending marketing campaign occasions the place the Secret Service vets attendees, the group was instructed its operatives couldn’t use phony names or false pretenses.

“I imagine going backstage or to closed occasions that require identification to the Secret Service is an invite for a 1001 cost,” the memo stated, referring to the federal legislation towards mendacity to authorities officers, including that in some circumstances, the group would possibly be capable of prevail in court docket utilizing a First Modification problem.

The memo warned the Undertaking Veritas worker: “I don’t count on getting as near the road as you counsel, broadly talking, is an efficient alternative for a take a look at case.”

Mr. O’Keefe likes to explain himself as a crusading journalist exposing wrongdoing, concentrating on liberal teams and Democratic politicians. He has boasted on social media that he’s constructing the “next great intelligence agency.”

Mr. O’Keefe’s operatives use pretend identities and secret recordings to ensnare unsuspecting targets.

Within the authorized paperwork, Mr. Barr repeatedly refers to Undertaking Veritas staff as “operatives” or “brokers,” in addition to “journalists.”

In 2017, Undertaking Veritas started airing undercover footage of Occasions staff in a sequence referred to as “American Pravda.” In a single case, a Occasions editor in London was secretly recorded by two operatives who have been recognized by a former Undertaking Veritas worker as James Artherton and Thor Holt. Mr. Holt didn’t reply to a request for remark and Mr. Artherton couldn’t be positioned.

The paperwork present that Undertaking Veritas had sought authorized recommendation from a lawyer in London about conducting an undercover investigation utilizing “covert recording of audio and video.”

The lawyer stated there was “no downside” utilizing a pretend identify and stated the proposed operation would, “almost definitely, be lawful in England and Wales.”

The Occasions offered copies of a few of the authorized memos to Invoice Grueskin, a professor on the Columbia Journalism Faculty and former deputy managing editor of The Wall Road Journal and government editor at Bloomberg Information.

Mr. Grueskin, who has written about Undertaking Veritas, stated that a few of Mr. Barr’s memos offered “fairly good recommendation,” significantly about when it’s permitted to report cellphone conversations and different tactical suggestions.

He stated that the undercover nature of Undertaking Veritas’s work was extra problematic.

“It opens you as much as the cost that you just’ve been deliberately misleading and also you lose your ethical standing,” Mr. Grueskin stated. “Each newsroom I’ve ever labored in has principally stated undercover journalism was unacceptable. I’ve by no means had a reporter inform me he wished to pose as any individual they weren’t.”

In 2010, Mr. O’ Keefe and three others pleaded guilty to a federal misdemeanor after admitting that they had entered a authorities constructing in New Orleans underneath false pretenses as a part of a sting operation.

In 2016, a Undertaking Veritas operative infiltrated Democracy Companions, a political consulting agency, utilizing a pretend identify and fabricated résumé, and made secret recordings of the workers. In his ebook, “American Pravda: My Combat for Fact within the Period of Pretend Information,” Mr. O’Keefe stated the operative was “actually residing out her character in America’s capital metropolis a lot as People abroad did in Moscow throughout the Chilly Conflict.”

Democracy Companions later sued Project Veritas. In a ruling final month, a U.S. District Court docket choose stated that Democracy Companions may check with Undertaking Veritas’s conduct as a “political spying operation” within the upcoming trial.

Michael S. Schmidt contributed reporting.