Purpose in the Machine is the second episode of the third season of the television series Agents of S.H.I.E.L.D. and the forty-sixth episode overall.
Fitz and the team enlist the aid of an Asgardian to unlock the secrets of the ancient Monolith that swallowed Simmons, and Agent May is at a crossroads in her personal and professional life.
In 1839 England, a meeting of lords and nobles were having a lottery; he who grabbed the white stone from the bag was to enter the room housing the Monolith. The chosen man was never seen again.
Presently, Bobbi Morse and Lance Hunter run past Daisy Johnson and Alphonso Mackenzie, telling them that Leo Fitz has entered the previously sealed room that contained the Monolith. They pull Fitz from the Kree stone. Phil Coulson, interrupted from installing a new hand, berates Fitz for his emotional breakdown, citing that he cannot afford to lose him; Fitz runs from the room after Morse removed sand from his cheek.
Fitz finds that the sand proves that Jemma Simmons was on another world, teleported by the Monolith. It is decided that she is to be found and returned to Earth. Coulson has Fitz and Morse accompany him to Norway to get Elliot Randolph, an Asgardian who has spent centuries on Earth, but was in prison for being drunk and disorderly.
Meanwhile, Andrew Garner arrives at the Playground and assesses Joey Gutierrez for the Caterpillars program. To Johnson's dismay, Gutierrez fails his interview.
Eventually, Johnson and Mackenzie take the Monolith to an English castle where they meet with Coulson's group. They open the portal but the machinery able to maintain it breaks. Fitz and Johnson realize that Johnson's vibrational powers can maintain the portal. When Johnson uses her powers, instead of sending a probe to investigate, Fitz jumps inside. He finds and retrieves Simmons before the portal explodes.
Grant Ward is not happy; he feels that HYDRA has squandered its potential for too long and he, as leader, will change that. To that end, he and Kebo find Werner von Strucker, the son of Wolfgang von Strucker, and eventually convince him to join their campaign.
Lance Hunter goes to Sun City, Arizona to recruit Melinda May to his campaign: revenge on Ward for the Kidnapping of Bobbi Morse. Initially, May refuses; she feels that her father needs her after his car accident. Hunter tells May that the real reason she is staying with her father is that she feels that Ward might target him. After a long conversation with her father, May changes her mind and joins Hunter.
Having returned to Culver University, Garner allows a new student to join his class, Werner von Strucker.