The Companion was an interactive holographic program developed by the Lanteans and was specifically used by Doctor Josua, who created a female hologram - whom he called Socius - that monitored his laboratory on Atlantis.
They were able to be programmed in the oversight of research, among other things, and their programming was complex enough that they were able to give an emotional response. Their holographic form was projected by a dais and were fixed into the surrounding structure which meant that these holograms were not designed for portability in mind. Despite this being the case, a Companion was able to manifest beyond the dais in the laboratory.
Doctor Meredith Rodney McKay believed that technology present within a Companion's designated laboratory allowed them to read the minds of their owners. Thus, they were able to anticipate their thoughts and worked to respond to their needs. The only known Companion was Socius that remained operational in Atlantis when the Atlantis Expedition arrived and demonstrated an obsessive desire to remain alone with its owner. (SGA: "The Companion")