The origins of these societies date back 3,000 years.1 Hammurabi’s Code of Laws (1,780 B.C.E.) are often cited as an origin:

188. If an artisan has taken a son to bring up, and has caused him to learn his handicraft no one has any claim.

189. If he has not caused him to learn his handicraft, that nursling shall return to his father’s house.

The Oldest Code of Laws in the World, the Code of Laws Promulgated by Ḫammurabi, King of Babylon, B. C. 2285-2242, Translated by C. H. W. Johns. Scotland: T. & T. Clark, 1903, 1903. Print.

Given their ancient origins, many names have arisen to identify them.2

He distributed them [the body of the people] accordingly, by arts and trades, into musicians, goldsmiths, carpenters, dyers, leatherworkers, curriers, braziers, and potters. the remaining trades he grouped together, and made one body out of all who belonged to them.

Plutarch, Life of Numa 17

Plutarch made a similar reference to the Laws of Solon, where a son was not required to care for his father, if the father failed to teach the son a trade.3

The earliest law recognizing the rights of the collegia occurs in Table VIII of the
Twelve Tables:

Guild members shall have the power … to make for themselves any rule they wish provided that they impair no part of the public law.

(Johnson 1961:12)

“THE COLLEGIA AND ROMAN LAW: State Restrictions on Voluntary Associations, 64 BCE–200 CE.” Voluntary Associations in the Graeco-Roman World. Routledge, 1996. 90–105. Web.

Numa Pompilius is a legendary Roman leader, credited with defining different trades, including goldsmiths, carpenters, dyers, leatherworkers, curriers, blacksmiths, and potters.5  The collegia opificum diversified into many different guilds by the end of the Roman empire.  After the Western Roman Empire collapsed, its collegia traditions were maintained for centuries more in the  Byzantine Christian empire.  Leo VI is credited with the Book of the Prefect, a manual of government probably drawn up  in the year 900.

From this ancient context arose the guilds: the “first and original basis for the theory and practice of popular democratic government in Europe” and the first to give worker organizations a role in the polity.6

1 David B. Weisberg: Guild structure and political allegiance in early Achaemenid Mesopotamia. Bulletin of the School of Oriental and African Studies , Volume 32 , Issue 2, June 1969, pp. 379 – 381

2 Terminology is complicated due to the time period covered as well as the different languages involved. For example, the modern term (and spelling) of “guild” has many antecedents. The historical accounts referring to guilds can use the following terms, in Latin: gildonia, confratriae, convivial, fraternitas, confranternitas, consortium, societas, solidatum, convivium, unio, conjuration, or collegia; in English: guild, gild, fraternity, confraternity, mystery, mistery, corporation, brotherhood, company, commonalty, livery company, trading corporation, municipal corporation; in Swedish: gilda, gille, skrå, and ambete; and in German: gilde, zeche, gaffel, genossenschaft, association, verien, einung, and zunft, to list a few of the variations.
Workers, Collectivism and the Law, Chapter 1: Guilds: brother[sister]hood, friendship, and mutual aid, footnote 3.

3 Plut. Sol. 22.1 c.f.

4 Jones, Peter. “Ancient and Modern.” The Spectator (London. 1828) (2017): n. pag. Print.

5 Roger B. Ulrich. “The Roman Woodworker.” Roman Woodworking. Yale University Press, 2007. 6–. Print.

6 Guild & State: European Political Thought from the Twelfth Century to the Present. Antony Black, p. xvii