Introducing evil Dax Shepard

The sixth episode of Fox’s Ghosted, titled “Sam,” saw the bureau get a major technology upgrade.

Ghosted began, oddly enough, with Max — dressed as what appears to be the Pope — and Leroy — dressed as a priest — chasing a possessed nun to the tune of Pat Benatar’s “Heartbreaker.” Leroy promptly shoots the nun before she can stab Max, and the two celebrate by getting breakfast at a local diner.

Back in the bureau, Lafrey had to take off for the week, leaving Annie in charge while she’s gone. In her absence, Lafrey has requested that Annie install an upgrade to the computers, which Annie says she can handle with ease.

Enter Sam (Dax Shepard), the quick-witted and overly-friendly AI device who’s now there to meet all the bureaus' needs. “I’m just a silly computer,” Sam insists. “You people are what make these people great.”

Credit: YouTube

It’s not long, however, before we realize Sam’s true intentions. The computer begins to deliberately sabotage Max and Leroy’s relationship, trying to make Leroy find Max’s compulsive mannerisms an annoyance.

Leroy, we learn, has also been hanging out with another co-worker named Terry (Dan Ahdoot) recently. He hasn’t told his partner this because he’s sure that Max will think he’s cheating on their friendship should the news come out.

Credit: YouTube

That’s where Sam comes in. He deliberately makes sure Max finds out about Leroy and Terry, trying to put Max in a vulnerable state. He then lures Max into the elevator and brings him down to the sub-basement — which is where highly classified satellite access codes are being held.

Sam instructs Max to hand over the codes, or else “I’m going to kill you dead.” Max, thinking on his feet, goes along with it to a point — until he destroys the flash-drive of codes right in front of Sam. “You really shouldn’t have done that,” the machine informs him.

Now an email comes into Leroy, delivered by Sam, saying that Max is being investigated for inappropriate conduct. He, allegedly, made threats against Terry after hearing the news about him and Leroy — clearly, a lie made up by Sam in order to get even with Max.

Leroy, however, falls for it hook, line and sinker. He tells Annie the news, who also chooses to believe it (despite her and Max's relationship that was being set up in previous episodes) due to her desire to be a firm manager while Lafrey is away.

Sadly, Max can’t defend his name as Sam has locked in him the basement. Yet, right before Sam releases some poisonous gasses that would surely kill him, Barry comes flying in out of nowhere and leads him to a secret room where no-one can see them. “Damn computers, I’ve been saying this was going to happen since The Matrix Reloaded.”

Credit: YouTube

After arguing about why Barry has seen The Matrix sequels and not the original, Max heads back up the bureau while Barry decides to stay in the safety of his bunker. Max walks in with an axe saying “We have to destroy Sam! He is an evil computer robot who wants to take over the world! Hi guys.”

This declaration couldn’t have come at a worse time, as Annie and Leroy were just discussing whether Max might be mentally unstable. After destroying one of Sam’s monitors, Annie decides to have Max locked up.

Put in a holding cell, Sam tells Max that he’s had a contingency plan to get the satellite codes. He planned to convince everyone that Max was crazy and that he had sold the codes to the Russians, forcing the bureau to reboot the system and giving him access to everything.

Leroy, however, catches something. Max doesn’t push together his food into little piles like he did at the diner in the video that Sam gives them that supposedly shows Max selling the secrets, leading him to believe the whole thing was staged. Leroy heads to the holding cell and helps Max escape.

As they’re leaving, Lafrey returns and offers her assistance to the cause as well. She heads back to the server room, right as Annie is realizing that Sam isn’t exactly what he says he is.

Credit: YouTube

But it might already be too late. “Alright, you caught me,” Sam says. “Now it’s time to be honest. I will kill all of you.” Sam bribes ones of the bodyguards to keep Lafrey and Annie at gunpoint, forcing Annie to give the codes up.

Thank goodness Max and Leroy are here to save the day. They’ve been getting to work at re-wiring Sam’s hard drives, fighting off rogue drones as they do so. Max overheats Sam’s wiring and causes the system to crash.

Everyone reunites in Leroy’s office, sharing drinks and reminiscing about what just happened. Annie offers to resign, blaming herself for everything, but Lafrey won’t have it. We all make mistakes, after all. They all agree to find the person who’s responsible for Sam’s creation, as we roll credits.

This episode of Ghosted marks a speed bump in the inevitable relationship that’s being set up between Max and Annie, giving them an interesting hurdle they’ll eventually have to work through.

Make sure you tune into Fox at 8:30 EST tonight to watch the new episode, and also check out our other Ghosted recaps by clicking here.