Michael Connelly writes his bestselling novels in real time, setting them in the year they’re published. His latest, “The Proving Ground,” seems so ripped from the headlines it feels as if he’s writing it as you read it.

This is the part-time Tampa resident’s 41st novel and his eighth featuring Mickey Haller, aka the Lincoln Lawyer. In 2023’s “Resurrection Walk,” Haller’s high-powered career as a criminal defense attorney took a sharp turn when he accepted a pro bono case to get a woman he believed was wrongly convicted of murder out of prison.

That experience moved him to switch to civil law. He doesn’t even ride around in Lincolns anymore — although his second ex-wife, Lorna Taylor, and her second husband, Cisco Wojciechowski, are still on his staff.

Also on board for this case is investigative journalist Jack McEvoy, a character featured in several previous Connelly books, most recently in 2020’s “Fair Warning,” which revolved around criminal uses of DNA data. McEvoy wants to write a book about Haller’s current case and be a “fly on the wall” as it happens. His expertise will prove invaluable.

Haller has a most sympathetic client. Brenda Randolph is a hard-working single mom whose only child, 16-year-old Rebecca, was shot to death in her high school’s parking lot by her ex-boyfriend, Aaron Colton.

Colton is awaiting trial for murder, but Randolph isn’t suing him, nor are his parents (Colton used his father’s gun), nor the school, nor the gun manufacturer.

Haller is mounting a high-profile case against Tidalwaiv, a billion-dollar tech company whose products include an artificial intelligence program called Clair. Colton was an avid user of Clair’s chatbot capability, which he used to create a chatbot he dubbed Wren, and then developed an emotionally intimate relationship with it.

Police believe that in Colton’s conversations with Wren, the bot encouraged him to kill Rebecca — and almost persuaded him to kill himself. Haller’s case is built on the argument that Tidalwaiv was negligent in marketing its product to teens.

Haller is braced for an all-out battle in the courtroom — but not for the death of one of his star witnesses and the growing reluctance of another to testify.

At home, he’s dealing with his first ex-wife, Maggie McPherson, who experienced a traumatic loss. She should be riding high on her recent election as the county’s district attorney, but the wildfires in Los Angeles destroyed her home. She’s moved back in with Haller, who welcomes her, but she’s struggling mightily.

Connelly keeps the tension and the stakes rising in this all-too-plausible story of the power and perils of AI.

Michael Connelly will be in conversation with mystery writer Lori Roy (“The Final Episode”) in a Tombolo Books event at 7 p.m. on Oct. 28 at Nova 535, 535 Dr. Martin Luther King Jr. St. N., St. Petersburg. Tickets are available at tombolobooks.com/events-book-clubs/events.

Here are three more thrillers inspired (but not written) by AI.