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.