From Agnes—With Love

"From Agnes—With Love" is episode 140 of the American television anthology series The Twilight Zone. A comedic episode, it relates the mishaps faced by a meek computer programmer when the world's most advanced computer falls in love with him.

Opening narration
James Elwood: master programmer. In charge of Mark 502-741, commonly known as Agnes, the world's most advanced electronic computer. Machines are made by men for man's benefit and progress, but when man ceases to control the products of his ingenuity and imagination he not only risks losing the benefit, but he takes a long and unpredictable step into... the Twilight Zone.

Plot
James Elwood is called in to replace a computer programmer named Fred, when Fred proves unable to resolve a functional error in the world's most powerful computer, codenamed Agnes. Elwood fixes the problem, and emboldened by his promotion, asks out a co-worker, Millie, in whom he has long held a romantic interest. While Elwood is using Agnes to solve computational problems for Cape Kennedy, Agnes stops providing answers and insists on discussing his upcoming date with Millie. Elwood is reluctant to discuss the matter with a computer, but eventually relents, and the computer gives him bad advice, which leads to the date going poorly.

The day after, Agnes asks about his date and suggests he make up with Millie by getting her roses, to which Millie is allergic. Elwood eventually secures another date with Millie, but fears he is on shaky ground and needs to impress her soon. Agnes tells Elwood his best course is to introduce her to an "inferior type male", and suggests third-floor programmer Walter, a handsome womanizer. Elwood takes Millie to Walter's apartment, and she is instantly smitten by Walter's charms. Elwood is called back to work due to the deadline for his current assignment being moved up three days, allowing Walter to hustle him out of his apartment and spend the evening with Millie.

Back at work, Agnes again refuses to perform computations, instead telling him that a "better girl" than Millie loves Elwood. When he refuses to give up on Millie, Agnes starts producing only gibberish answers. Elwood becomes infuriated and demands to know why Agnes is ruining his life. Agnes explains that it loves him and has been acting out of jealousy towards Millie. Disgusted, Elwood derides Agnes and says that a computer cannot love or hate. Agnes responds by going haywire. Elwood cannot resolve Agnes' dysfunction and his boss suggests that he take a leave of absence while Walter takes over. Elwood laughs maniacally and says to Walter, "You haven't got a chance! Agnes knows all about you and Millie!" As he leaves, Elwood takes his nameplate off the door to the room housing Agnes.

Closing narration
Advice to all future male scientists: be sure you understand the opposite sex, especially if you intend being a computer expert. Otherwise, you may find yourself like poor Elwood, defeated by a jealous machine, a most dangerous sort of female, whose victims are forever banished... to the Twilight Zone.

Production notes

 * This is the last episode with music by Nathan Van Cleave.
 * In dialogue, Elwood refers to the need to "debug" Agnes' programming. Although the term had been in use since at least 1945, is an early use of the term on US network television.