Gotfrid (also Gotefrid, modernized Gottfried; Latin: Gotfridus or Cotefredus; (c. 650-709) was the Duke of Alemannia in the late seventh century and until his death. He was of the house of the Agilolfing, which was the dominant ruling family in the Frankish Duchy of Bavaria.
In a document dated to the year 700 in Cannstatt, Gotfrid at the request of a priest named Magulfus donated the castle of Biberburg to the monastery of Saint Gall.
Gotfrid fought a war over his de facto independence with the mayor of the palace Pepin of Heristal. The war was unfinished when Gotfrid died in 709. His sons, Lantfrid and Theudebald, had the support of Pepin and succeeded him.
It has often been stated that Gotfrid married a daughter of Theodo of Bavaria, but there is no conclusive evidence to support this assertion. It is largely based on conjecture, due to the fact that his third son, Odilo, later ruled in Bavaria. Furthermore, Gotfried died several years before most of Theodo's children are believed to have been born. Even if he had been betrothed to Theodo's daughter, whose name is unknown, she would have been little more than a child and unable to consummate such a union before his death, let alone bear him multiple children.
One theory suggests that he had a Merovingian wife, based on the fact that several of his descendants bore Merovingian names, including the sons of his 2nd great-granddaughter Hildegard of the Vinzgau, wife of Charlemagne. The Agilolfings were, in fact, ruling Bavaria and Alemannia under the suzerainty of the Merovingian dynasty at this time, so such a union is not improbable. However, there is currently no further evidence to confirm this.
From his son Huoching (Huocin, Houchi, or Hug) came the later stock of the Ahalolfings. His daughter Regarde married Hildeprand of Spoleto, and he left a youngest son named Liutfrid.