A Manhattan federal judge has ordered the NYPD to start work on a “pilot program” to determine whether it should be recording all police encounters with civilians — not just the serious ones.

Judge Analisa Torres said she wants the NYPD — along with the people suing it over its stop-and-frisk practices — to work together on a pilot program to record “low-level” police interactions — or those that are not spurred by suspicious activity.

The city shall bear the cost of the pilot program, the judge said.

The NYPD has been rolling out bodycams generally as a result of the legal settlement over its stop-and-frisk practices.

But officers only record what are known as level-three and level-four interactions, which tend to include stops that the police think might lead to an arrest. Spurring the change was the court-appointed “facilitator” hired to study the issue, who recommended in May that the NYPD document all police-initiated encounters — and not just the “third and fourth levels, as is currently required.”

The facilitator said documentation of all levels is needed to understand “the extent to which police are initiating encounters on the basis of race.”

The plaintiffs in the stop-and-frisk case have largely supported supported the facilitator’s recommendations, with some minor tweaks, while the NYPD has rejected them, saying that they are “neither practical nor feasible.”

“The court concludes that further study on this recommendation is necessary,” the judge said Thursday in ordering the pilot program.