| Warning: The following description may contain major plot spoilers. |
In Portal, players control Chell, a test subject in the Aperture Enrichment Center that wields the Handheld Portal Device and attempts to escape from the enrichment center and the deranged AI, GLaDOS.
The game begins with Chell waking up in a stasis bed and hearing instructions and
warnings from GLaDOS about the upcoming test experience. As Chell makes her way through the first few chambers, GLaDOS's announcements serve not only to instruct Chell and help her progress through the game, but also promise cake and grief counseling as her reward, if she manages to complete all the test chambers.
Over the course of the game, GLaDOS's motives are hinted to be more sinister than her helpful demeanor suggests via her actions and speech. For example, GLaDOS boasts about the fidelity and importance of the Weighted Companion Cube, a weighted storage cube with a single large pink heart on each face, for helping Chell to complete the chamber. However, GLaDOS then declares that it "unfortunately must be euthanized" in an "emergency intelligence incinerator" before Chell can continue.
After Chell completes the final test chamber, GLaDOS congratulates her and prepares her "victory candescence" by maneuvering Chell into a pit of fire. Chell escapes using of the portal gun and makes her way through the maintenance areas within the Enrichment Center to find and kill GLaDOS. Becoming panicked, GLaDOS insists that she was only pretending to kill Chell and a "party associate" will take her to her reward.
Chell continues forward, despite GLaDOS' messages to dissuade her with threats of physical harm and misleading statements claiming that she is going the wrong way. Eventually, Chell reaches a large chamber where GLaDOS's hardware hangs overhead and proceed to incinerate all of GLaDOS' personality core spheres.

As the cores are destroyed, GLaDOS reveals that Chell has destroyed the morality core, which the Aperture Science employees allegedly installed after GLaDOS flooded the enrichment center with a deadly neurotoxin, and goes on to state that now there is nothing to prevent her from doing so once again.
After she has destroyed the final piece, a portal malfunction tears the room apart and transports everything to the surface, including Chell. The passed out Chell is then dragged away from the scene by a "party associate". The camera then zooms through the bowels of the facility and reveals the Black Forest cake and the Weighted Companion Cube. The nearby shelves, which contain dozens of other personality cores, begin to light up before a robotic arm descends and extinguishes the candle on the cake.
As the credits roll, GLaDOS delivers a concluding report: the song "Still Alive", which declares the experiment to be a huge success despite her attempted "murder".
Decades have passed since the events of Portal, in which time GLaDOS has remained dormant as her Personality Cores and other automated systems maintain the facility without her guidance.
Upon the start of the story, Chell is awakened by Wheatley in a decaying Extended Relaxation Chamber and the two make their way through the deteriorating facility in an attempt to escape. However, Wheatley accidentally restores power to GLaDOS, who displays intense bitterness toward Chell, whom she says "murdered" her.
GLaDOS resumes her role as test monitor until Wheatley convinces Chell to perform a core transfer, putting him in charge of the facility and detaching GLaDOS from the mainframe. Power-crazed, he celebrates his newfound power by humiliating GLaDOS further, attaching her to a potato battery capable of powering only her consciousness and most basic functions.
However, GLaDOS proves she is still not entirely helpless: she quickly goads Wheatley into a rage, causing him to turn against Chell in a fit of anger and paranoia. He attacks both GLaDOS and Chell, accidentally knocking them into the bowels of the facility.
As they make their way through old testing chambers, learning the history and beginning of Aperture Science, the pair trigger a number of pre-recorded messages from Cave Johnson and his assistant Caroline. As they continue to climb their way through the facility, GLaDOS begins to remember her previous life as Caroline, Cave Johnson's assistant, whose consciousness was uploaded into an A.I. network, possibly against her will, in an attempt to allow her to run Aperture forever in accordance with Johnson's dying wish.
By the time the two make their way to the main facility, Wheatley's incompetence has caused the building to deteriorate to ruins and become on the verge of a reactor meltdown. GLaDOS attempts to kill him with a paradox, but Wheatley survives due to his incapability to understand logical contradictions. The plan having failed, Wheatley recaptures the two of them and forces them back into the test chambers. GLaDOS and Chell complete several chambers, then escape Wheatley's "surprise" attempt to kill them and make their way into his central chamber.
In order to defeat Wheatley, GLaDOS provides corrupted cores for Chell to attach to Wheatley, attempting to trigger another core transfer due to corruption. With the Enrichment Center moments from self-destruction, Chell points the Portal gun at the ceiling, which has breaken open, and shoots a portal onto the Moon, sucking herself and Wheatley out into space and allowing GLaDOS to restore herself to the Aperture Science mainframe. Rrestabilizing the reactors, GLaDOS pulls Chell back to safety before closing the portal and leaving Wheatley stranded in space.
When Chell awakens, GLaDOS expresses what seems to be genuine relief and tells her that while she once considered Chell her greatest enemy, she now realizes Chell was actually her best friend all along. She then adds that these positive emotions are due to the conflicted effect of Caroline's personality and quickly deletes it, seemingly reverting to her old sociopathic self. Despite this, GLaDOS explains that while she intends to rid herself of Chell once and for all, she has concluded that the easiest way to be done with her is by simply releasing her; as attempting to kill her has proven far too troublesome. She places Chell on an elevator heading up to the surface, making sure to remind her never to return.
As Chell steps out into a sunlit field, GLaDOS makes the unexplained decision to return her old Weighted Companion Cube from Portal (which is charred but intact) as well before slamming the door shut behind her.


