GLaDOS

The Genetic Lifeform and Disk Operating System, abbrievated as GLaDOS, is the central core of Aperture Laboratories and is the antagonist of Portal. She was the antagonist of Portal 2, but became the protagonist's ally in the second half of the game.

Portal
GLaDOS first appeared as helpful, supportive as Chell progressed through the chambers, but during her progress into the central chambers, she starts to become more of a threat and starts deploying sentry turrets that fire live ammunition towards Chell. When she completes all the chambers, instead of giving her the proper reward, cake, GLaDOS sends her to a pit of fire.

Soon, GLaDOS is defeated by Chell, who uses her turret's bullets against her and pulls off pieces of her. As a last resort, GLaDOS fires rockets towards Chell. One of the portals malfunction and cause everything in her chamber to be teleported to the surface. Among being sucked into the portal, she is torn apart and shredded, rendering her dead, until she sings the closing song "Still Alive", signifying that she is still operational.

Portal 2
Upon Chell plugging Wheatley into the breaker room's core slot, GLaDOS is accidently rebooted and awakens. She sees Chell and picks up both her and Wheatley, crushing him while dropping her into an incinerator so she can force Chell to test for the remainder of her life.

Despite her hatred for Chell after she was torn apart, she helps her, such as rebuilding the chambers to make them possible and showing her where to go, as if GLaDOS forgot about her demise. After Wheatley helps Chell escape her wrath, GLaDOS pleads her to come back, like the events of Portal. Soon, she tricks Chell into coming to her chamber, where she doesn't realize that her turrets are defective and the neurotoxin generator is destroyed, thanks to Chell and Wheatley's handiwork.

Soon, GLaDOS becomes corrupt for slowly turning obsessed on killing Chell. Wheatley and her must perform a core transfer. After Chell resolves the stalemate between GLaDOS' denial for the transfer, her core gets dismantled and placed on the floor of now Wheatley's chamber. Power-mad Wheatley installs her into a potato battery. GLaDOS tells the truth about Wheatley, causing him to rage out on the escape lift, leaving GLaDOS and Chell to fall near-infinitely to the ruins of the previous versions of Aperture Science.

Finally, Chell reaches the second version of Aperture Science, Aperture, and rescues GLaDOS from being pecked to death by a crow. She makes a deal with her saying if Chell can deliver GLaDOS to Wheatley's chamber, she'll let her go free and live her normal life.