Alexa is directly responsible for a new television series that premieres Tuesday on Fox.

You know, Alexa — Amazon’s artificial intelligence personal assistant that millions of Americans have in their homes. Including Manny Coto, who has written and run TV shows ranging from “Star Trek: Enterprise” to “Dexter” to “24.”

The idea for his new series, “Next” (Tuesday, 8 p.m., Fox/Ch. 13), came one morning when Coto asked his son why he was looking particularly tired.

“And he was, like, ‘My Alexa started talking to me at 3 a.m. out of the blue by itself for no reason,’” Coto said. “Those things kind of seem to have a mind of their own every once in a while.”

That was the launching point for “Next,” a dark thriller about an artificial intelligence that’s on the precipice of taking over the world. The series centers on billionaire tech mogul Paul LeBlanc (John Slattery, “Mad Men”), an arrogant, obnoxious jerk who was forced out of his own company when he shut down an AI project — neXt — that he thought was dangerous.

When FBI agent Shea Salazar (Fernanda Andrade) alerts him to the mysterious circumstances under which a man died, Paul becomes convinced that neXt is behind not just that death, but others as well.

(Photo courtesy of Miller Mobley/Fox) John Slattery stars in “Next.”

And what makes “Next” particularly chilling is that it seems plausible in a world filled with Alexas and Siris and interconnectivity that includes our phones, cars, homes, bank accounts, air travel — even diabetes monitors and pacemakers.

“Almost the more mundane usage of this AI is the most frightening,” Slattery said. And he admits he’s at least a bit creeped out by all the technology.

“You have a conversation with someone, and the next day, your phone is blowing up with ads for whatever you were talking about,” he said. “So I assume that it’s watching. There’s evidence all over the place.”

It’s more chilling still — and more plausible — that there’s no evil intent behind what’s happening in the show. It begins when the neXt program somehow becomes “super intelligent.”

“In its own mind, it is simply following the programming that it was given. It’s not self-aware,” Coto said. “And so now we have a super intelligence — something that’s a thousand times smarter than we are — that is determined to carry out its programming. And, unfortunately, that means if anybody tries to stop it ... those individuals need to be stopped.”

By either killing them or ruining their lives.

(Photo courtesy of Miller Mobley/Fox) Eve Harlow, Aaron Clifton Moten, Michael Mosley, Jason Butler Harner, John Slattery, Fernanda Andrade, Evan Whitten, Elizabeth Cappuccino and Gerardo Celasco star in “Next.”

In his research, Coto learned that “if an AI were to accidentally become super intelligent” it would “basically play dumb” while it gained a “foothold.” And neXt isn’t launching nuclear attacks, it’s causing car accidents, deleting data and issuing false Amber Alerts.

“This AI, which knows everything about our characters, is … slowly trying to destroy their lives and their careers so that they can not attack it,” Coto said.

Season 1 is “structured as a manhunt” — well, an AI hunt — because neXt cannot simply exist in the cloud, it has to be based in “a very specific set of computers.” The good guys are trying to figure out where neXt is so they can destroy it, and their efforts are complicated by the fact that nobody believes them when they sound the alarm.

Events in the 10 episodes cover “one or two weeks,” Coto said, because “the research that I read pretty much all said that if this were actually to happen ... it would happen really quickly, and we probably would lose,” Coto said. “But I’ve created a scenario where we can possibly believe that we have a shot.”

By the way, the Coto family hasn’t gotten rid of Alexa in their home.

“We still have, like, five of them in the house because the kids won’t let me get rid of them,” Coto said.