From Halopedia, the Halo wiki
Loki was a Planetary Security Artificial Intelligence in service with the United Nations Space Command. He was stationed aboard the Phoenix-class Colony Ship, UNSC Skidbladnir  until it landed on Harvest.
Avatar and Role
Loki and Mack actually shared the same data center and processor; however, only one AI could use it at a given time. In Mack's data center, there were two matrices; it is assumed that one was for Mack and the other was for Loki. When the swap was needed, Mack would send the relevant data to Loki's matrix before Loki assumed control of the data center (and by extension everything Mack had influence over on Harvest). The AI moving out would then be fragmented among the JOTUNs, allowing the two AIs to function for some time without the threat of rampancy.
Besides a few minor variations of the avatar, mainly the eye color (Mack's eyes were gray, Loki's were red) and cleanliness (Loki's avatar was clean whereas Mack's was dirty from "working in the field"), both AIs' avatars were identical.
When the Tiara was boarded by Covenant forces, Sif sent a distress signal intended for Mack. However, by that point Loki had already switched places with Mack. Mack had told Loki to keep Sif safe; however, Loki believed it would be better to destroy Sif to protect all other human colonies. He unleashed a powerful virus upon Sif that purged her code throughout all her clusters save one, which he kept operational to monitor the invaders. When Lighter Than Some began repairing the Tiara's data center, he found Loki's fragment and they developed a makeshift plan to lure the Covenant warship Rapid Conversion in range of the planet's mass driver. Loki succeeded in executing the plan, disabling the warship and commencing the evacuation of Harvest's surviving population. However, he hadn't anticipated a counter-assault by the Covenant, and was saved only by Mack, who was inhabiting the JOTUNs. However, Loki's data center was damaged by a spike grenade, weakening him.
Having learned that Loki intended to destroy the Tiara and Sif, Mack then turned on Loki, using his JOTUN "all-in-ones" to hack the maser dish and destroy Loki's fragment in the Tiara (his attempt to protect what little was left of Sif). During the evacuation, Loki, in his weakened state, was unable to rebalance the Tiara's load after the collapse of the number seven strand, but he received help from a rampant Sif who had been repaired enough by Lighter Than Some that she was able to help complete the job. After the evacuation was complete, Loki sought to finish the job he had started (destroying Sif) but was once again faced with stiff resistance from Mack's army of JOTUNs. However, Mack did concede to Sif's agreement that her destruction was the best thing for humanity, and Loki fired a mass driver round directly into her data center, completely obliterating her.
The full details of the nature of Loki's own destruction are not known; Mack later does reveal that Loki was destroyed in an explosion that consumed Harvest's reactor (which housed Mack/Loki's data center). From Mack's transmission though, the reactor went critical, possibly due to the firing of the mass driver twice in quick succession again which Loki had to work hard to keep from causing an overload the first time and in his weakened state, may not have been able to prevent a second time. Also, he may have chosen to destroy himself like he did with Sif in order to prevent the Covenant from getting their hands on him.
List of appearances