Starfleet was the deep space exploratory and defense service maintained by the United Federation of Planets. Its principal functions included the advancement of Federation knowledge about the galaxy and its inhabitants, the advancement of Federation science and technology, the defense of the Federation, and the facilitation of Federation diplomacy.
As per its mandate of deep space exploration, its personnel were frequently brought into contact with cultures and sentient species whose existences were unknown to the Federation. Starfleet officers therefore acted as official representatives of the Federation in these cases. Starfleet vessels were also frequently used to ferry ambassadors on diplomatic missions.
New United Federation of Planets[]
With the fall of the United Federation of Planets, in 2414 Starfleet was officially disbanded. In 2416 the New United Federation of Planets was formed on Bajor with with Michelle Ortiz made the interim president. This necessitated the reformation of Starfleet in it's current form with Admiral William Riker serving as Fleet Admiral.