A.L.I.E. 2.0, also known as the Spirit of the Commander, was an artificial intelligence that resided in a cybernetic neural implant known as the Flame. Created by neuroscientist Becca Franko, the Flame was designed to allow the AI to directly interface with a human brain and augment it. The Flame held the minds of all its previous hosts (a.k.a. the Commanders).
The Flame was central to the Grounder faith such that the Grounders were usually loyal to whoever possessed the Flame, bestowing them the title of Commander. Due to its importance, a spiritual order known as the Flamekeepers was tasked with keeping it safe. The Flame was used to pass experience and wisdom from one Commander to the next. It also enhanced its user's mind and senses.
Those who have the Flame can communicate with the consciousnesses of past commanders while they are in an unconscious state or their mind is in the Flame
The Flame is sought by its predecessor, A.L.I.E., who wants to use it to delete her kill switch
A.L.I.E.'s ultimate goal was to save humanity by creating a safe and peaceful existence in a digital world, known as the City of Light. She believed this was the best way to preserve the human race, as she viewed the physical world as too cruel and unreliable. A.L.I.E.'s plan involved uploading human minds to her servers and leaving the physical world behind
Clarke wants to stop A.L.I.E. because the AI was using the City of Light to trap and control humanity's minds, erasing their memories and identities in the process. A.L.I.E. believes that the City of Light was the only way to ensure humanity's survival, but Clarke sees it as a dangerous path that deprived individuals of their free will and unique identities
Lexa was the commander who allied with and fell in love with Clarke.
Lexa's Flamekeeper, Titus, disapproved of their relationship believing Clarke made Lexa weak by convincing her to be more merciful and during an attempt to kill Clarke, shot Lexa by accident instead. Despite Clarke's desperate attempts to save her, Lexa died from her wound.
As with all of the Commanders before her, Lexa's consciousness continued to live on in the Flame upon her physical death. When Clarke takes the Flame to destroy A.L.I.E., her mind summoned Lexa's consciousness to aid her.