Federation Starfleet, also known simply as Starfleet or Star Fleet, was the exploratory and defensive force of the United Federation of Planets. Starfleet's function was to explore unknown territory on the behalf of the Federation government, to defend the Federation and its allies from threats, to further Federation policies and interests throughout interstellar space, and, when applicable, to initiate first contact with newly-discovered worlds and to engage in diplomatic negotations on the behalf of the Federation.
The Federation Starfleet was chartered in 2161 with the founding of the Federation. A charter was written and an institution for the training of the Federation Starfleet officer corps, Starfleet Academy, was established.
In 2373 when the refuge era began and the federation was losing its grip on worlds. Starfleet began gathering prewarp civilizations and taking them to their own star system and giving them new homes on various Holoships orbitting planets. Two years later when the federation was split up again, starfleet merely became a rescue, Refugee Gathering and Security Force.