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".